aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/pre_init.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2021-07-06 22:47:48 +0200
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2021-07-06 22:47:48 +0200
commitef5307d83a1d62df0569d78db75d4006147c927d (patch)
tree542ff46adf7600cbd7f908cb62ac3a44e1bfa683 /macros/src/codegen/pre_init.rs
parent3f85cb5caf1ae930e6551e139978ceec859a2348 (diff)
downloadrtic-ef5307d83a1d62df0569d78db75d4006147c927d.tar.gz
rtic-ef5307d83a1d62df0569d78db75d4006147c927d.tar.zst
rtic-ef5307d83a1d62df0569d78db75d4006147c927d.zip
Minimal app now compiles
Diffstat (limited to 'macros/src/codegen/pre_init.rs')
-rw-r--r--macros/src/codegen/pre_init.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs
index 531debac..ae628f6e 100644
--- a/macros/src/codegen/pre_init.rs
+++ b/macros/src/codegen/pre_init.rs
@@ -126,7 +126,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
}
// If there's no user `#[idle]` then optimize returning from interrupt handlers
- if app.idles.is_empty() {
+ if app.idle.is_none() {
// Set SLEEPONEXIT bit to enter sleep mode when returning from ISR
stmts.push(quote!(core.SCB.scr.modify(|r| r | 1 << 1);));
}