Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Replace synchronous interrupt handler with async stream #7

Open
mycognosist opened this issue Jan 4, 2021 · 0 comments
Open

Replace synchronous interrupt handler with async stream #7

mycognosist opened this issue Jan 4, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mycognosist
Copy link
Collaborator

The gpio-cdev crate now offers a "Stream interface for consuming GPIO events in async code within a tokio runtime". This should allow a much more resource-efficient implementation of peach-buttons, which currently relies on a synchronous interrupt handler which polls the pins in a loop (very CPU-intensive).

Async example code.

@mycognosist mycognosist added the enhancement New feature or request label Jan 4, 2021
@mycognosist mycognosist self-assigned this Jan 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant