-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add new InterruptNumber trait #241
Conversation
r? @korken89 (rust_highfive has picked a reviewer for you, use r? to override) |
I like it! I'm also a big fan of 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.
LGTM. Haven't seen the Into<X>
supertrait thing anywhere before, but I don't mind it.
I've updated to fix the failing CI (due to the use of some |
As discussed in todays meeting this should be adjusted to lose the |
00467cd
to
b5ad45c
Compare
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.
Missing CHANGELOG entry. ;)
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.
Thank you! Let's land this then.
bors r+
Build succeeded: |
241: Fix unused doc lint firing on `#[pre_init]` and add a test r=adamgreig a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
This is a first go at the new trait needed for rust-embedded/svd2rust#455 since we removed
Nr
from bare-metal.In this case I've written it as
unsafe trait InterruptNumber: Into<u16>
rather than providing a conversion method inside the trait; I think this is neat and idiomatic but please correct me if there's a reason to not do it like this.Here's a playground link showing an example implementation.