aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--macros/Cargo.toml2
-rw-r--r--macros/src/codegen/pre_init.rs6
2 files changed, 6 insertions, 2 deletions
diff --git a/macros/Cargo.toml b/macros/Cargo.toml
index 56bfd5cd..de860b1c 100644
--- a/macros/Cargo.toml
+++ b/macros/Cargo.toml
@@ -22,4 +22,4 @@ proc-macro2 = "1"
proc-macro-error = "1"
quote = "1"
syn = "1"
-rtic-syntax = "0.5.0-alpha.4"
+rtic-syntax = "0.5.0-rc.1"
diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs
index 69f16fe3..eb216d86 100644
--- a/macros/src/codegen/pre_init.rs
+++ b/macros/src/codegen/pre_init.rs
@@ -83,7 +83,11 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
// Initialize monotonic's interrupts
for (_, monotonic) in &app.monotonics {
- let priority = &monotonic.args.priority;
+ let priority = if let Some(prio) = monotonic.args.priority {
+ quote! { #prio }
+ } else {
+ quote! { (1 << #nvic_prio_bits) }
+ };
let binds = &monotonic.args.binds;
// Compile time assert that this priority is supported by the device