Remove linked list impl - use heapless, linked list init now const fn

This commit is contained in:
Emil Fresk 2021-08-16 15:37:39 +02:00
parent 74b3964978
commit bc3eb5c547
8 changed files with 16 additions and 625 deletions

View file

@ -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)];));