Use critical_section crate

This commit is contained in:
Dario Nieuwenhuis
2021-05-11 00:57:52 +02:00
parent f817f374b6
commit 7fa0e57172
17 changed files with 41 additions and 157 deletions

View File

@ -51,7 +51,7 @@ macro_rules! peripherals {
#[no_mangle]
static mut _EMBASSY_DEVICE_PERIPHERALS: bool = false;
cortex_m::interrupt::free(|_| {
critical_section::with(|_| {
if unsafe { _EMBASSY_DEVICE_PERIPHERALS } {
None
} else {