diff --git a/embassy-extras/src/macros.rs b/embassy-extras/src/macros.rs index e57b89ec7..5ce14a76d 100644 --- a/embassy-extras/src/macros.rs +++ b/embassy-extras/src/macros.rs @@ -122,7 +122,7 @@ macro_rules! std_peripherals { impl Peripherals { pub fn take() -> Option<(Peripherals, Clocks)> { - match unsafe {GLOBAL_CLOCKS} { + match unsafe {GLOBAL_CLOCKS.take()} { Some(clocks) => { let dp = unsafe { pac::Peripherals::steal() }; let peripherals = Peripherals {