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

x/exp/io: support for interrupt pins #15821

Closed
mattetti opened this issue May 24, 2016 · 3 comments
Closed

x/exp/io: support for interrupt pins #15821

mattetti opened this issue May 24, 2016 · 3 comments

Comments

@mattetti
Copy link
Contributor

In a lot of cases polling a pin for its state is sub optimum, being able to rely on interrupts is kind a convenient way to reduce the latency of change detection and avoid potential bugs. While this is not needed everywhere, I think it would be great to have that in the x/exp/io package.

This approach was implemented in the embd package using the following interface:
https://github.com/kidoman/embd/blob/master/gpio.go#L37

And implementing it on linux using epoll:
https://github.com/kidoman/embd/blob/master/host/generic/interrupt.go

@rakyll how do you feel about supporting such an approach?

@minux
Copy link
Member

minux commented May 24, 2016 via email

@mattetti
Copy link
Contributor Author

I agree about avoiding a callback API and a using channels + blocking API

@rakyll rakyll self-assigned this May 25, 2016
@rakyll rakyll added this to the Unreleased milestone May 25, 2016
@rakyll
Copy link
Contributor

rakyll commented Sep 28, 2016

Closing because we have removed the gpio package from io. We should discuss the design on a different medium.

@rakyll rakyll closed this as completed Sep 28, 2016
@golang golang locked and limited conversation to collaborators Sep 28, 2017
@rsc rsc unassigned rakyll Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants