[GSOC] GPIO API
Andre Marques
andre.lousa.marques at gmail.com
Sun Jun 22 15:22:13 UTC 2014
Hello,
The GPIO API has been updated with doxygen documentation and code
comments, along with a blog post that explains the current API work flow
[1], and another blog post explaining how the API can be tested using
the Raspberry Pi [2], both containing links to the actual code.
Currently this API is only implemented for the RPi BSP, where it succeds
at performing digital I/O.
Changes to the API itself are:
- It no longer stores memory addresses, as this is BSP specific;
- Removed the interface setup functions (for UART, SPI, JTAG, ..) and
replaced with a function that setups any GPIO pin configuration by using
a struct. A BSP may define a number of specific GPIO
interfaces/configuration on a header file, to be used by an application.
The current way of using the API is to include the header file,
initialize the API and call its directives to operate the GPIO pins,
which can be used directly by an application or through a driver.
Because the GPIO API itself only provides digital I/O directives (as any
other type of I/O, such as SPI, is BSP specific), doing it directly
using the API directives or using a digital I/O driver is almost the
same, I am not sure if the said driver is useful at this point.
For the API to become generic the implementation must go to cpukit too,
and each BSP should provide low level functions to operate their
specific hardware. Then a generic digital I/O driver can be created that
should work with any BSP, as the high level functionality would be in
cpukit. Comments to this idea are welcome.
[1] - http://asuolgsoc2014.wordpress.com/2014/06/22/the-current-gpio-api/
[2] - http://asuolgsoc2014.wordpress.com/2014/06/22/testing-the-gpio-api/
--André Marques.
More information about the devel
mailing list