mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Merge #371
371: task_local and lock_free r=korken89 a=AfoHT Getting this going to test with GHA For further discussion see https://github.com/rtic-rs/rfcs/issues/30 Co-authored-by: Per <Per Lindgren> Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
This commit is contained in:
commit
1cda9eaecc
9 changed files with 439 additions and 1 deletions
|
|
@ -19,7 +19,8 @@ proc-macro = true
|
|||
|
||||
[dependencies]
|
||||
proc-macro2 = "1"
|
||||
proc-macro-error = "1"
|
||||
quote = "1"
|
||||
syn = "1"
|
||||
rtic-syntax = { git = "https://github.com/rtic-rs/rtic-syntax", branch = "master", version = "0.4.0" }
|
||||
rtic-syntax = { git = "https://github.com/rtic-rs/rtic-syntax", branch = "master", version = "0.5.0-alpha.0" }
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,20 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
|
|||
let user_code = app.user_code.clone();
|
||||
let name = &app.name;
|
||||
let device = extra.device;
|
||||
|
||||
// Get the list of all tasks
|
||||
// Currently unused, might be useful
|
||||
let task_list = analysis.tasks.clone();
|
||||
|
||||
let mut tasks = vec![];
|
||||
if !task_list.is_empty() {
|
||||
tasks.push(quote!(
|
||||
enum Tasks {
|
||||
#(#task_list),*
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
quote!(
|
||||
#(#user)*
|
||||
|
||||
|
|
@ -141,6 +155,9 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
|
|||
|
||||
#(#root_software_tasks)*
|
||||
|
||||
/// Unused
|
||||
#(#tasks)*
|
||||
|
||||
/// Implementation details
|
||||
mod #name {
|
||||
/// Always include the device crate which contains the vector table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue