Skip to content
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

Wait on multiple GPIO pins/Expose PinFuture #1546

Closed
jounathaen opened this issue May 8, 2024 · 1 comment
Closed

Wait on multiple GPIO pins/Expose PinFuture #1546

jounathaen opened this issue May 8, 2024 · 1 comment

Comments

@jounathaen
Copy link
Contributor

I'd like to have a task, which waits on any of x GPIO pins falling edge. I'm not super deep into async Rust, so please forgive me if I'm overlooking something fundamental here.
There is the embassy-futures function select, which does what I want, but I can't call it on wait_for_falling_edge, as this function does not return a future. Internally, it uses a PinFuture and I think if it returned that future instead, it'd be possible to select multiple GPIO events.

@jounathaen
Copy link
Contributor Author

Ok, apparently this is possible. Don't know what I did wrong in the first place, but this already works.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant