aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/pre_init.rs
diff options
context:
space:
mode:
authorGravatar Jorge Iglesias Garcia <44316552+jorgeig-space@users.noreply.github.com> 2021-08-27 11:16:51 +0800
committerGravatar GitHub <noreply@github.com> 2021-08-27 11:16:51 +0800
commit77427f962dec01b3aa49a5e4a2a77293794d8f2e (patch)
treea0844994c04e264343571f916f81e87f4bc4e4ad /macros/src/codegen/pre_init.rs
parenta4b6fb3404bbdbb853cc3fe6c7a110ddc3beb1a7 (diff)
parent22ec841ee14cc313b1725ff6ab6de1b5706d2824 (diff)
downloadrtic-77427f962dec01b3aa49a5e4a2a77293794d8f2e.tar.gz
rtic-77427f962dec01b3aa49a5e4a2a77293794d8f2e.tar.zst
rtic-77427f962dec01b3aa49a5e4a2a77293794d8f2e.zip
Merge branch 'rtic-rs:master' into master
Diffstat (limited to 'macros/src/codegen/pre_init.rs')
-rw-r--r--macros/src/codegen/pre_init.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs
index ae628f6e..d3c4f54d 100644
--- a/macros/src/codegen/pre_init.rs
+++ b/macros/src/codegen/pre_init.rs
@@ -17,7 +17,6 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
for (name, task) in &app.software_tasks {
let cap = task.args.capacity;
let fq_ident = util::fq_ident(name);
- let fq_ident = util::mark_internal_ident(&fq_ident);
stmts.push(quote!(
(0..#cap).for_each(|i| #fq_ident.get_mut_unchecked().enqueue_unchecked(i));
@@ -77,18 +76,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)];));