mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
examples/idle-wfi fixed
This commit is contained in:
parent
6dc2d29cd9
commit
4337e3980c
1 changed files with 2 additions and 2 deletions
|
@ -18,14 +18,14 @@ mod app {
|
||||||
struct Local {}
|
struct Local {}
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(mut cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(mut cx: init::Context) -> (Shared, Local) {
|
||||||
hprintln!("init").unwrap();
|
hprintln!("init").unwrap();
|
||||||
|
|
||||||
// Set the ARM SLEEPONEXIT bit to go to sleep after handling interrupts
|
// Set the ARM SLEEPONEXIT bit to go to sleep after handling interrupts
|
||||||
// See https://developer.arm.com/docs/100737/0100/power-management/sleep-mode/sleep-on-exit-bit
|
// See https://developer.arm.com/docs/100737/0100/power-management/sleep-mode/sleep-on-exit-bit
|
||||||
cx.core.SCB.set_sleepdeep();
|
cx.core.SCB.set_sleepdeep();
|
||||||
|
|
||||||
(Shared {}, Local {}, init::Monotonics())
|
(Shared {}, Local {})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[idle(local = [x: u32 = 0])]
|
#[idle(local = [x: u32 = 0])]
|
||||||
|
|
Loading…
Reference in a new issue