diff --git a/src/lib.rs b/src/lib.rs index 6d8d366cdd..dfc5e5226e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -319,10 +319,12 @@ macro_rules! tasks { { let hw = $crate::$P::hw(); if hw != 0 { - _nvic.set_priority - (::$krate::interrupt::Interrupt::$Interrupt, - hw, - ); + unsafe { + _nvic.set_priority + (::$krate::interrupt::Interrupt::$Interrupt, + hw, + ); + } } } )*