as some of you might know, I am working on integrating the TU Braunschweig's board (sensor node) "INGA" into RIOT. There is one common platform (common/inga) and four+1 versions (inga red, green, blue, white and a compatible version inga inphase). And additionally a specialized version for energy harvesting (REAPer).
Both the blue version and the REAPer platform run an algorithm called "IdealVolting" to automatically adapt the core voltage to the MCU. This code is therefore board dependent to both boards, but also application specific, because you might not want to use it in all cases.
My question is, where do I put this type of code? We could put it into common/inga/idealvolting/ and create a Makefile for it and then boards/inga-blue and boards/inga-reaper could add DIRS += common/inga/idealvolting/ so it is build and the application selects it using USEMODULE += idealvolting.
The second idea was to create a pkg. However then we'd require a separate git. Additionally, you should know, that the idealvolting uses a bare-metal implementation for the attiny and runs RIOT on the atmega platform. Therefore not all code in this pkg/module would be for RIOT only, but also for the tiny part.
So ... any hints what is the right way to implement it?
Best Regards and Thanks, Robert