Fix locks, basepri writeback error

This commit is contained in:
Emil Fresk 2023-01-07 14:38:04 +01:00 committed by Henrik Tjäder
parent 569a761122
commit 5606ba3cf3

View file

@ -237,7 +237,7 @@ pub unsafe fn lock<T, R, const M: usize>(
let current = basepri::read(); let current = basepri::read();
basepri::write(logical2hw(ceiling, nvic_prio_bits)); basepri::write(logical2hw(ceiling, nvic_prio_bits));
let r = f(&mut *ptr); let r = f(&mut *ptr);
basepri::write(logical2hw(current, nvic_prio_bits)); basepri::write(current);
r r
} }
} }