mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
Now with spawn/schedule from anywhere
This commit is contained in:
parent
c83b15b643
commit
524273c96a
19 changed files with 172 additions and 694 deletions
|
|
@ -12,10 +12,10 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
stmts.push(quote!(rtic::export::interrupt::disable();));
|
||||
|
||||
// Populate the FreeQueue
|
||||
for fq in &analysis.free_queues {
|
||||
for fq in &app.software_tasks {
|
||||
// Get the task name
|
||||
let name = fq.0;
|
||||
let task = &app.software_tasks[name];
|
||||
let task = fq.1;
|
||||
let cap = task.args.capacity;
|
||||
|
||||
let fq_ident = util::fq_ident(name);
|
||||
|
|
@ -81,8 +81,8 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
}
|
||||
|
||||
// Initialize the SysTick if there exist a TimerQueue
|
||||
if let Some(tq) = analysis.timer_queues.first() {
|
||||
let priority = tq.priority;
|
||||
if extra.monotonic.is_some() {
|
||||
let priority = analysis.channels.keys().max().unwrap();
|
||||
|
||||
// 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