-
Notifications
You must be signed in to change notification settings - Fork 238
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
Remove Deref from peripheral singletons #2956
Conversation
0a8a879
to
7deaba6
Compare
f64e0e6
to
62d7531
Compare
5efbe85
to
55db8da
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.
LGTM, thanks!
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! Thanks! Left a small detail that can be ignored.
Also, we discourage abbreviations, are we ok with regs
? I think is well understood, but just in case, I bring it up.
Thanks for bringing that up! I think this abbreviation is fine in this instance. |
This PR removes the Deref implementation from peripheral singletons. Instead, a
register_block(&self)
and aregs()
method (both of them public-unstable) are provided by the peripheral singletons. Drivers usually wrap these in a.regs(&self)
. This change removes stable exposure of PAC types through the Deref trait.cc #2525