mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
Updated codegen for the updated syntax (default monotonic priority)
This commit is contained in:
parent
380a20859c
commit
9a0d27a91e
2 changed files with 6 additions and 2 deletions
|
@ -22,4 +22,4 @@ proc-macro2 = "1"
|
||||||
proc-macro-error = "1"
|
proc-macro-error = "1"
|
||||||
quote = "1"
|
quote = "1"
|
||||||
syn = "1"
|
syn = "1"
|
||||||
rtic-syntax = "0.5.0-alpha.4"
|
rtic-syntax = "0.5.0-rc.1"
|
||||||
|
|
|
@ -83,7 +83,11 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
||||||
|
|
||||||
// Initialize monotonic's interrupts
|
// Initialize monotonic's interrupts
|
||||||
for (_, monotonic) in &app.monotonics {
|
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;
|
let binds = &monotonic.args.binds;
|
||||||
|
|
||||||
// Compile time assert that this priority is supported by the device
|
// Compile time assert that this priority is supported by the device
|
||||||
|
|
Loading…
Reference in a new issue