[GSOC] GPIO API

Alan Cudmore alan.cudmore at gmail.com
Tue Jun 24 12:07:01 UTC 2014


This looks good to me.. But we welcome feedback from those with more
experience on different processors/BSPs.

Andre, I updated to your latest repository, rebuilt, and ran the GPIO test
with an LED and button. it worked just as described. I'm going to try this
with a couple of extra buttons and LEDs on my setup.  Great job!

Alan



On Sun, Jun 22, 2014 at 11:22 AM, Andre Marques <
andre.lousa.marques at gmail.com> wrote:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140624/bed21e8a/attachment-0002.html>


More information about the devel mailing list