How to deal with multiple Hardware on your Platformio libraries

You have different pieces of code that you have to include or not depending on specific configurations on Platformio :thinking: ?
This tutorial is made for you :ok_hand: !

In this video, I use Platformio advanced scripting features to provide a configuration interface to your code libraries.

Example code available here: GitHub - Luos-io/luos_engine: Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

I’m sure you guys have other solutions, let’s talk about it!

3 Likes

Nice!! Im noting this down. I do like when a library has no dependency at all and you can pass callbacks or implement undefined prototypes in your implementation, but I get its not always possible. Thanks!

In this lib we have a lot of different hardware access. that is why instead of exposing a lot of callbacks we choose to allow users to create a folder with their HAL code in it.

Ok yeah its actually a very good idea

1 Like