aboutsummaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/codegen.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/macros/src/codegen.rs b/macros/src/codegen.rs
index 4ce876b5..0cff5bbc 100644
--- a/macros/src/codegen.rs
+++ b/macros/src/codegen.rs
@@ -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