This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
RE: Generic GPIO framework
- From: Steven Clugston <steven dot clugston at newcastle dot ac dot uk>
- To: "ecos-devel at ecos dot sourceware dot org" <ecos-devel at ecos dot sourceware dot org>
- Date: Fri, 28 May 2010 23:05:57 +0100
- Subject: RE: Generic GPIO framework
- References: <4BFFD7CC.4020204@intefo.ch>
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