From 8e8ec9b7b879adae8d4de6cb2320b9b19290a7e0 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 12 Dec 2020 23:24:54 +0100 Subject: Monotonic codegen now passing compile stage --- macros/src/codegen/timer_queue.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'macros/src/codegen/timer_queue.rs') diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs index f219eef..dc29835 100644 --- a/macros/src/codegen/timer_queue.rs +++ b/macros/src/codegen/timer_queue.rs @@ -67,6 +67,8 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec Vec Vec>(); let bound_interrupt = &monotonic.args.binds; + items.push(quote!( #[no_mangle] unsafe fn #bound_interrupt() { use rtic::Mutex as _; - while let Some((task, index)) = rtic::export::interrupt::free(|_| #tq.dequeue()) + while let Some((task, index)) = rtic::export::interrupt::free(|_| #tq.dequeue( + || rtic::export::NVIC::unmask(you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml::#enum_::#bound_interrupt), + )) { match task { #(#arms)* -- cgit v1.2.3