aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/idle.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge.aparicio@ferrous-systems.com> 2020-05-29 14:50:28 +0200
committerGravatar Jorge Aparicio <jorge.aparicio@ferrous-systems.com> 2020-05-29 14:50:28 +0200
commit0ad311074e3d49a66174f59c47c4d6183ce7e3a0 (patch)
tree0dc14a960059209d864629c3134c318c978f1686 /macros/src/codegen/idle.rs
parent1e827e24d024e910b44f6cc6db278e4c66a77683 (diff)
downloadrtic-0ad311074e3d49a66174f59c47c4d6183ce7e3a0.tar.gz
rtic-0ad311074e3d49a66174f59c47c4d6183ce7e3a0.tar.zst
rtic-0ad311074e3d49a66174f59c47c4d6183ce7e3a0.zip
allow handlers to be named 'main'
`#[init]`, `#[idle]` and `#[task]` handlers can now be named `main` fixes #311
Diffstat (limited to 'macros/src/codegen/idle.rs')
-rw-r--r--macros/src/codegen/idle.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/macros/src/codegen/idle.rs b/macros/src/codegen/idle.rs
index 35a72523..72432f67 100644
--- a/macros/src/codegen/idle.rs
+++ b/macros/src/codegen/idle.rs
@@ -72,7 +72,7 @@ pub fn codegen(
));
let locals_new = locals_new.iter();
- let call_idle = quote!(#name(
+ let call_idle = quote!(crate::#name(
#(#locals_new,)*
#name::Context::new(&rtfm::export::Priority::new(0))
));