Introduction of callbacks in periphAL
There is a major issue with periphAL 1.x, if an interface (e.g. a GPIO) can not be accessed directly bu only via further devices (e.g. a GPIO extender with I2C interface). Such scenarios can not be represented by periphAL.
This issue can be solved by introducing individual callback function pointers for each interface instance. All interface structs need to feature dedicated function pointers for all interface functions (e.g. read GPIO, write GPIO, etc.), which can be set individually per instance. Since this modification would fundamentally change how periphAL works and cause vast incompatibilities, this enhancement will most probably entangle a major version upgrade to v2.0.
For the example given above, the callbacks of a GPIO can still point to the "native" functions and replicate the same bahavior as the current version of periphAL. In case a device is accessed via a GPIO extender, however, the callback can be used to execute any required code transparently. Such callbacks could even be nested for complex setups (e.g. MCU/SoC --SPI--> I2C driver --I2C--> I2C multiplexer --I2C--> GPIO extender --GPIO--> target device).