stm32-data
stm32-data copied to clipboard
Support for rc_w0 registers
Some registers, eg. TIMx_SR on stm32f0 are marked as rc_w0.
This means that in order to clear specific bit we need to write all others as ones.
Is there any chance we get native support for "set all as ones except selected"?
you can do it with
regs.some_reg().write(|w| {
w.0 = 0xFFFF_FFFF;
w.set_something(false);
});