I want to access some features of an STM32’s ADC peripheral, that are not exposed by the
periph_adc module. I’m toying with a few ideas and am seeking opinions on best practice for doing this kind of thing with RIOT.
I could omit the generic ADC driver and just make my own as a module under
drivers/. This feels wrong because
drivers/ are really meant for off-chip devices and should make use of the generic peripheral drivers.
Another approach is to extend the implementation of peripheral driver of the MCU I am concerned with. This leaves the generic API in-tact and allows anything using it to continue to function. This has the drawback that I would be modifying existing code, making it difficult to update RIOT in the future as I would have now forked code.
Is there a sensible approach to providing access to peripheral features that can’t be exposed in a generic way. I’m thinking about