aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/pre_init.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2021-08-16 15:37:39 +0200
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2021-08-16 15:38:31 +0200
commitbc3eb5c54784c32ccfff404dba58a27d5a47f04e (patch)
tree73d4d91075f06a35149ee3b5303bde465d881a64 /macros/src/codegen/pre_init.rs
parent74b396497861ad69dcab0414851ddb8b5c624036 (diff)
downloadrtic-bc3eb5c54784c32ccfff404dba58a27d5a47f04e.tar.gz
rtic-bc3eb5c54784c32ccfff404dba58a27d5a47f04e.tar.zst
rtic-bc3eb5c54784c32ccfff404dba58a27d5a47f04e.zip
Remove linked list impl - use heapless, linked list init now const fn
Diffstat (limited to 'macros/src/codegen/pre_init.rs')
-rw-r--r--macros/src/codegen/pre_init.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs
index ae628f6e..5b1fdf3e 100644
--- a/macros/src/codegen/pre_init.rs
+++ b/macros/src/codegen/pre_init.rs
@@ -77,18 +77,10 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
);));
}
- // Initialize monotonic's interrupts and timer queues
+ // Initialize monotonic's interrupts
for (_, monotonic) in &app.monotonics {
let priority = &monotonic.args.priority;
let binds = &monotonic.args.binds;
- let monotonic_name = monotonic.ident.to_string();
- let tq = util::tq_ident(&monotonic_name);
- let tq = util::mark_internal_ident(&tq);
-
- // Initialize timer queues
- stmts.push(
- quote!(#tq.get_mut_unchecked().as_mut_ptr().write(rtic::export::TimerQueue::new());),
- );
// Compile time assert that this priority is supported by the device
stmts.push(quote!(let _ = [(); ((1 << #nvic_prio_bits) - #priority as usize)];));