[RTEMS Project] #2390: GPIO API bug

RTEMS trac trac at rtems.org
Thu Aug 13 15:12:30 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 Asuol):

 Although the BSP function rtems_gpio_bsp_get_value() may return the
 register value directly with the pin masked, the API function
 rtems_gpio_get_value() which is used by applications should still return 0
 for logical low, 1 for logical high or -1 if the value could not be
 obtained. This allows for a more logical and constant behaviour of
 applications across multiple platforms/BSPS.

 I have attached a new patch which updates the rtems_gpio_bsp_get_value
 doxygen documentation stating that a BSP may return 0xDEADBEEF if it could
 not get a value for the given pin, and also updates the raspberry pi
 implementation of the API to account for the rtems_gpio_bsp_get_value
 return type update.

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


More information about the bugs mailing list