Skip to content
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 atomic XOR/set/clear access #25

Open
hmvp opened this issue Jul 25, 2021 · 3 comments
Open

Add atomic XOR/set/clear access #25

hmvp opened this issue Jul 25, 2021 · 3 comments

Comments

@hmvp
Copy link
Contributor

hmvp commented Jul 25, 2021

While I suspect this is something that might be added through svd2rust I still think its useful to mention here:

According to 2.1.2 from the datasheet most registers allow XORing, setting or clearing of individual bits by writing to offset 0x1000, 0x2000 or 0x3000 from the base register. This is useful in a lot of cases to circumvent a read/modify cycle.

Afaik this is not supported by the pac at the moment..

@richardanaya
Copy link
Contributor

@richardanaya
Copy link
Contributor

I opened an issue upstream rust-embedded/svd2rust#535

@ithinuel
Copy link
Member

For reference the rp2040-hal currently implements it via the atomic_register_access module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants