-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Epoll::IN prevents epoll_wait an interrupt from GPIO #120
Comments
There is other precedent for making However, we should also consider if such an abstraction should be exposed on other platforms. |
In |
|
Extension traits is what you can do, it's common in winit, so you should be familiar. |
When possible, I generally prefer exposing a cross-platform abstraction. Something like this would definitely be possible for event ports and Windows; unfortunately it looks like |
As of #133 it is now possible to wait on HUP and PRI specifically. |
well, it still isn't possible to remove |
You can do this to only select PRI events: Event::none(key).with_pri() |
polling/src/epoll.rs
Line 277 in e2129ea
I'm trying to use this crate to poll GPIO interrupt in Linux (Raspberry Pi 4) via
/sys/class/gpio/
. But asread_flags
above always includeEpoll::IN
, it always return a readable event for the exported gpio file (i.e./sys/class/gpio/gpioN/value
) , and hence cannot detect the interrupt.In my testing, removing
Epoll::IN
(or only useEpoll::PRI
) fixes this case and enables the poller detects the GPIO interrupt. However, the current poller.add()
API does not accept custom read flags. I'm wondering if such issue has been considered before, and is there any plans to support custom read flags for epoll?The text was updated successfully, but these errors were encountered: