I for one would like to see this included so I hope the maintainers see fit to 
do so.

This could be used to create drivers that are more generic for add-on devices 
(bit-bang buses/LCD screens) that otherwise sometimes find their way into HAL 
because pin platform specific pin macro definitions are needed somewhere to 
actually act on the hardware. A common GPIO interface could allow a driver to 
be written for a device without knowing or caring exactly what the pin 
assignment will be and what HAL macros are needed to change the pin states. 
Obviously this would need to be defined somewhere board specific instead but at 
least then the driver code will work for more than one board.

Might slight concern is that checking or changing a pin state often might incur 
an extra stack push/pop overhead (over the HAL macros) if the get/set functions 
are not inlined.

Steven

Reply via email to