Hi all, I want to use the sd_event_add_io API to monitor a GPIO pin status change. This pin supports intrrupts(echo both > edge). And it works using the epoll code at https://gist.github.com/jadonk/2587524: The callback function will be called if there is data change on the pin.
However, the sd_event_add_io does not work: the callback will always be triggered(without pin status change). I am using this example: http://0pointer.net/blog/introducing-sd-event.html. Just replace the fd = open("/sys/class/gpio/gpio34/value", O_RDWR | O_NONBLOCK); and replace EPOLLIN using EPOLLPRI. Any suggestions/comments? Thanks, Yong _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel