mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
Cancel and reschedule working
Support cfgs in the imports Account for extern tasks
This commit is contained in:
parent
1087f2ee64
commit
53c407017f
7 changed files with 716 additions and 35 deletions
|
|
@ -77,12 +77,16 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
);));
|
||||
}
|
||||
|
||||
// Initialize monotonic's interrupts
|
||||
for (_, monotonic) in app.monotonics.iter()
|
||||
//.map(|(ident, monotonic)| (ident, &monotonic.args.priority, &monotonic.args.binds))
|
||||
{
|
||||
// Initialize monotonic's interrupts and timer queues
|
||||
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.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)];));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue