aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2017-04-12 10:16:56 -0500
committerJorge Aparicio <japaricious@gmail.com>2017-04-12 10:16:56 -0500
commitd9300f01f8caf619c65de15f2bbe76672bde9980 (patch)
treedc41b77acdefea68f50546af9685ce611fb464ee /src
parent67881bc7f552a58a2a373fc3b7f59f5775d3eaec (diff)
fix the tasks! macro
NVIC.set_priority now requires unsafe
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 6d8d366..dfc5e52 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,
+ );
+ }
}
}
)*