diff options
author | 2023-01-07 11:24:13 +0100 | |
---|---|---|
committer | 2023-03-01 00:31:06 +0100 | |
commit | 714020a624ca93c42d5da7ebe612e7fc668e1471 (patch) | |
tree | 798716e0fd29d0b6235bb5bbec2dd11dba658ecc /macros/src/codegen/hardware_tasks.rs | |
parent | 53f3d397e76383deabbe9579a3522174c422a958 (diff) | |
download | rtic-714020a624ca93c42d5da7ebe612e7fc668e1471.tar.gz rtic-714020a624ca93c42d5da7ebe612e7fc668e1471.tar.zst rtic-714020a624ca93c42d5da7ebe612e7fc668e1471.zip |
Removed Priority, simplified lifetime handling
Diffstat (limited to 'macros/src/codegen/hardware_tasks.rs')
-rw-r--r-- | macros/src/codegen/hardware_tasks.rs | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/macros/src/codegen/hardware_tasks.rs b/macros/src/codegen/hardware_tasks.rs index 2a81d9a0..9ea5825b 100644 --- a/macros/src/codegen/hardware_tasks.rs +++ b/macros/src/codegen/hardware_tasks.rs @@ -41,22 +41,16 @@ pub fn codegen( rtic::export::run(PRIORITY, || { #name( - #name::Context::new(&rtic::export::Priority::new(PRIORITY)) + #name::Context::new() ) }); } )); - let mut shared_needs_lt = false; - let mut local_needs_lt = false; - // `${task}Locals` if !task.args.local_resources.is_empty() { - let (item, constructor) = local_resources_struct::codegen( - Context::HardwareTask(name), - &mut local_needs_lt, - app, - ); + let (item, constructor) = + local_resources_struct::codegen(Context::HardwareTask(name), app); root.push(item); @@ -65,24 +59,19 @@ pub fn codegen( // `${task}Resources` if !task.args.shared_resources.is_empty() { - let (item, constructor) = shared_resources_struct::codegen( - Context::HardwareTask(name), - &mut shared_needs_lt, - app, - ); + let (item, constructor) = + shared_resources_struct::codegen(Context::HardwareTask(name), app); root.push(item); mod_app.push(constructor); } - root.push(module::codegen( - Context::HardwareTask(name), - shared_needs_lt, - local_needs_lt, - app, - analysis, - )); + // Module generation... + + root.push(module::codegen(Context::HardwareTask(name), app, analysis)); + + // End module generation if !task.is_extern { let attrs = &task.attrs; |