cpu/saml21: avoid the use of bitfield in register call#20708
cpu/saml21: avoid the use of bitfield in register call#20708dylad merged 1 commit intoRIOT-OS:masterfrom
Conversation
benpicco
left a comment
There was a problem hiding this comment.
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 = ABCDtofoo->bar.reg &= ABCDfor 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