From d9300f01f8caf619c65de15f2bbe76672bde9980 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 12 Apr 2017 10:16:56 -0500 Subject: [PATCH] fix the tasks! macro NVIC.set_priority now requires unsafe --- src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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, + ); + } } } )*