From be74469ab71341da9a564ce1bc3e0e3f17009688 Mon Sep 17 00:00:00 2001 From: Henrik Tjäder Date: Sun, 22 Jan 2023 03:03:24 +0100 Subject: Enable at least masking out a Monotonic Simplest case working, but leaves a lot to ask as shown by examples/cfg-monotonic.rs Current `rtic-syntax` is unable to validate and handle the `cfgs[]` which limits the usefulness of this. --- macros/src/codegen/timer_queue.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 32e288c5..f5867dc4 100644 --- a/macros/src/codegen/timer_queue.rs +++ b/macros/src/codegen/timer_queue.rs @@ -13,7 +13,6 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec Vec Vec = rtic::RacyCell::new(rtic::export::TimerQueue(rtic::export::SortedLinkedList::new_u16())); )); @@ -88,6 +89,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec> = rtic::RacyCell::new(None); )); } @@ -126,6 +128,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec>(); + let cfgs = &monotonic.cfgs; let bound_interrupt = &monotonic.args.binds; let disable_isr = if &*bound_interrupt.to_string() == "SysTick" { quote!(core::mem::transmute::<_, rtic::export::SYST>(()).disable_interrupt()) @@ -136,6 +139,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec