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

Fix Wio Terminal ButtonController #627

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

pabigot
Copy link
Contributor

@pabigot pabigot commented Aug 23, 2022

Summary

If debounce isn't enabled pinstate always returns zero, so the code treats every event as a down state.

Fixes #620.

Comment on lines 45 to 51
11 as ExternalInterruptID,
12 as ExternalInterruptID,
3 as ExternalInterruptID,
4 as ExternalInterruptID,
5 as ExternalInterruptID,
10 as ExternalInterruptID,
7 as ExternalInterruptID,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see the problem. The ExternalInterrupt trait is not defined in a reasonable way anymore. This is probably a problem introduced by the migration to gpio::v2. I think I have a way to fix it, so that you can use .id() again. Let me see if I can implement that first, before we resort to manually specifying all the ExternalInterruptIDs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bradleyharden That'd be great; thanks. I hope to be back on wio/rust by the end of the week, when I'll take another stab at #628 and can update this too.

pabigot added a commit to pabigot/atsamd that referenced this pull request Dec 4, 2022
@pabigot pabigot changed the title Fix Wio Terminal ButtonController (#620) Fix Wio Terminal ButtonController Dec 4, 2022
@pabigot
Copy link
Contributor Author

pabigot commented Dec 4, 2022

Updated now that #641 is in-place.

@jbeaurivage jbeaurivage merged commit f773aa3 into atsamd-rs:master Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wio Terminal: ButtonController doesn't report release events
3 participants