[En-Nut-Discussion] Implementation of the GPIO API as defined in RFA_4

Philipp Burch phip at hb9etc.ch
Sun Nov 11 00:19:17 CET 2012

Hi everyone,

as stated in 
the GPIO API should now follow the outline from RFA_4:

At the moment, I'm cleaning the LM3S code somewhat and have now updated 
the GPIO implementation according to the new API. It is located in the 
branch devnut-lm3s and the code resides in 
nut/include/arch/cm3/lm3/lm3s_gpio.h and 
nut/arch/cm3/dev/lm3/lm3s_gpio.c. I'd greatly appreciate it if someone 
could have a look at it and tell me if this is the way to go. At least 
it looks sensible to me and seems to work basically (I haven't done 
extensive testing yet).

What I haven't implemented yet is the interrupt handling. Something is 
not clear to me at the moment: Is the implementation supposed to allow a 
distinct interrupt handler to be registered for every single bit? This 
would then require a typedef for GPIO_SIGNAL, which can hold eight 
pointers to the handlers and a dispatcher function which checks which 
bit fired the interrupt and the invokes the correct handler. Is this 


More information about the En-Nut-Discussion mailing list