Add atomic XOR/set/clear access
Opened this issue · 3 comments
hmvp commented
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 commented
I think I see something similar here in svd2rust
richardanaya commented
I opened an issue upstream rust-embedded/svd2rust#535
ithinuel commented
For reference the rp2040-hal currently implements it via the atomic_register_access
module