mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Merge branch 'master' into spawn_experiment
This commit is contained in:
commit
6808cc7cdf
10 changed files with 443 additions and 3 deletions
|
|
@ -19,6 +19,7 @@ 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.5.0-alpha.0" }
|
||||
|
|
|
|||
|
|
@ -117,6 +117,19 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
|
|||
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)*
|
||||
|
||||
|
|
@ -132,6 +145,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