RTEMS | dev/gpio: A generic GPIO API as a device node and ioctl (!1499)
Amar Takhar (@amar)
gitlab at rtems.org
Tue Sep 22 23:24:02 UTC 2026
Amar Takhar commented on a discussion on cpukit/include/dev/gpio/gpio.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159805
> + *
> + * What a pin reads as before rtems_gpio_pin_configure() is called on it,
> + * and what it returns to after rtems_gpio_pin_release().
> + */
> + RTEMS_GPIO_DIRECTION_NONE = 0,
> +
> + /**
> + * @brief This enumerator indicates that the pin is an input.
> + */
> + RTEMS_GPIO_DIRECTION_INPUT,
> +
> + /**
> + * @brief This enumerator indicates that the pin is an output.
> + */
> + RTEMS_GPIO_DIRECTION_OUTPUT
> +} rtems_gpio_direction;
That suggestion was from Christian, I wasn't paying too close attention.
Before using \``` RTEMS_GPIO_DIRECTION_NONE` `` we should at least think about what it means to build in disable/low power mode into that setting because maybe someone will want to say there is no direction but not put it into low power mode? Maybe there isn't a use case I'm just not a fan of baking too much into one setting especially an enum.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159805
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-5flm26hzi50wzje8x4l2ky1iv-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260922/6752f15c/attachment.htm>
More information about the bugs
mailing list