mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +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
|
|
@ -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