Use volatile write operation for 'set_mask_raw' function
The other methods had previously been updated to use volatile memops, but due to an oversight this method was missed. Fixes avr-rust/ruduino#31. Thanks to @MalteT for reporting this issue.
This commit is contained in:
parent
41967edeb2
commit
79dd2543a1
|
@ -52,7 +52,7 @@ pub trait Register : Sized {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn set_mask_raw(mask: Self::T) {
|
fn set_mask_raw(mask: Self::T) {
|
||||||
unsafe {
|
unsafe {
|
||||||
*Self::ADDRESS |= mask;
|
core::ptr::write_volatile(Self::ADDRESS, core::ptr::read_volatile(Self::ADDRESS) | mask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue