I am re-factoring a bunch of Adafruit Arduino libraries for the Raspberry Pico SDK “baremetal” platform, with the intention of submitting PRs once completed.
My goal is to submit a PR with minimal changes, so no re-writing their base classes or other extensive refactoring with funky static templates that place a heavy burden on the maintainers.
The libraries only have a “
library.properties” for each, which how I assume PIO decides it’s an Arduino only library? I ask because I need to use
lib_compat_mode = offto test compile them. Is a
library.jsonthe way to go without breaking existing Arduino compatibility?
Most of the
.hfiles are fine and can be fixed with a few
#ifdef #define, but they do need new
.cppimplementations. Assuming no clever CRTP et al, I basically want “build time polymophism” for want of a better expression. I need to be able to change the
library.jsonbased on the platform so I can select the implementation files via a simple
Are there any docs or existing libraries I can look at that will help me here?