-
Notifications
You must be signed in to change notification settings - Fork 214
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
GPIO: do not overwrite interrupt handler #2486
Conversation
I'm not sure I understand these changes, it seems to solve one problem while creating another. As far as I can tell, if you do not want to bind the interrupt handler you can no longer call |
In which case do you explicitly not want to bind any interrupt handlers? |
When using e.g. RTIC and using hardware tasks involving GPIO. This was the reason the |
RTIC seems to be working for me now, please take another look. If the user doesn't want our handler, they will be able to disable it using the interrupt APIs. We are now detecting whether the peripheral interrupt is bound to any CPU interrupt, so it shouldn't be possible for us to overwrite any early bound interrupt handlers. Later the users can swap ours with anything they want using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm things are working as expected again, thanks for taking care of that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Another idea I'd want some feedback on. Closes #2009 I hope.
Why not keep this in
Io::new
? I intend to move the Pins out into Peripherals so that users don't need to createIo
- unless they want to handle user interrupts. That is a bigger change, though.