avr-rust/ruduino

Shouldn't all IO registers use volatile operations?

shepmaster opened this issue · 0 comments

    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.