-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/saml21: avoid the use of bitfield in register call #20708
Conversation
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 for undertaking this, might even save a few bytes here and there.
Do you have a plan how to switch to the new vendor files? AFAIK they not only drop the bitfield access, but also change register names.
I am planning to wrap all registers call into some macro to keep compatibility with out of the tree boards and stuff. However, on the new Microchip vendor files, we have: Maintaining compatibility with these changes will be tricky. We could go with only using |
Regarding the wrapper I was thinking about something like this:
As long as |
fa5a19d
to
c7f2b3a
Compare
Signed-off-by: Dylan Laduranty <[email protected]>
c7f2b3a
to
bc188c5
Compare
Contribution description
This PR replaces all calls of
foo->bar.bit.xyz = ABCD
tofoo->bar.reg &= ABCD
for instance.This should not have much impact on the code.
This is the first step of a long serie in order to support new Microchip vendor files.
I plan to do the same to all SAM0-based CPU and boards.
Testing procedure
A careful review.
CI should catch most of the failure but feel free to run some tests on hardware.
Issues/PRs references
see #20457