Shouldn't all IO registers use volatile operations?
shepmaster opened this issue · 0 comments
shepmaster commented
fn toggle_raw(mask: Self::T) {
unsafe {
*Self::ADDRESS ^= mask;
}
}
As I understand it, without using volatile operations, the compiler can see something like port = on; port = off; port = on
and optimize that to just port = on
.