[RTEMS Project] #2390: GPIO API bug

RTEMS trac trac at rtems.org
Fri Aug 14 15:24:50 UTC 2015


#2390: GPIO API bug
---------------------+---------------------
 Reporter:  ketul    |       Owner:
     Type:  defect   |      Status:  new
 Priority:  normal   |   Milestone:  4.11.1
Component:  General  |     Version:  4.10
 Severity:  normal   |  Resolution:
 Keywords:           |
---------------------+---------------------

Comment (by beng):

 Personally I am not in favour of a magic constant such as 0xDEADBEEF. Who
 is to say hardware couldn't return such a magical value as a GPIO mask?
 Slightly nicer would be to at least define the constant in gpio.h as
 GPIO_IN_FAIL or something like that, so bsp's can use that constant to
 return it to gpio.c. I'd rather have the bsp functions return -1, 0 or 1
 to indicate fail, low, high, but ok. That is my E0,02.

 Either way I'm in favour of having this patch merged so the beagle bsp can
 merge its gpio implementation too. I think this also actually fixes bug
 with the invert logic feature I noticed while reading gpio.c..

--
Ticket URL: <http://devel.rtems.org/ticket/2390#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list