fix the tasks! macro

NVIC.set_priority now requires unsafe
This commit is contained in:
Jorge Aparicio 2017-04-12 10:16:56 -05:00
parent 67881bc7f5
commit d9300f01f8

View file

@ -319,12 +319,14 @@ macro_rules! tasks {
{ {
let hw = $crate::$P::hw(); let hw = $crate::$P::hw();
if hw != 0 { if hw != 0 {
unsafe {
_nvic.set_priority _nvic.set_priority
(::$krate::interrupt::Interrupt::$Interrupt, (::$krate::interrupt::Interrupt::$Interrupt,
hw, hw,
); );
} }
} }
}
)* )*
// TODO freeze the NVIC.IPR register using the MPU, if available // TODO freeze the NVIC.IPR register using the MPU, if available