RTEMS | dev/gpio: A generic GPIO API as a device node and ioctl (!1499)
Sam Price (@TheSamPrice)
gitlab at rtems.org
Tue Sep 22 15:19:09 UTC 2026
Sam Price commented on a discussion on cpukit/include/dev/gpio/gpio.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159790
> + *
> + * The pin must already be configured with a trigger other than
> + * #RTEMS_GPIO_TRIGGER_NONE.
> + *
> + * @param fd is the descriptor for the controller's device node.
> + *
> + * @param pin is the logical pin whose interrupt to deliver.
> + *
> + * @param handler is the handler to call.
> + *
> + * @param arg is the argument to pass to the handler.
> + *
> + * @retval 0 Successful operation.
> + * @retval -1 An error occurred. The errno is set to indicate the error.
> + */
> +int rtems_gpio_pin_irq_enable(int fd, uint32_t pin,
I think the interrupts were an oversight. I drafted a possible version of this and need to look at it more tonight. You probably don't want to call ioctrl calls from ISR routines. So we would need the isr pin set/get calls also.
https://gitlab.rtems.org/TheSamPrice/rtems/-/merge_requests/12/diffs#7e0742779af6c8bf2bf16c86f8e5f41b092a249d_864_899
If it helps this is the esphome fully wired into this rtems api.
Which would keep it board generic.
https://github.com/thesamprice/esphome/blob/e6e0d939542f2d7b77f3c418ddff5686f8c7ddd4/esphome/components/rtems/gpio.cpp
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159790
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-1lil7zpstq09y0tseh9o4p4mp-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/a88a8678/attachment-0001.htm>
More information about the bugs
mailing list