aboutsummaryrefslogtreecommitdiff
path: root/examples/idle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/idle.rs')
-rw-r--r--examples/idle.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/idle.rs b/examples/idle.rs
index c09af92..58c3c87 100644
--- a/examples/idle.rs
+++ b/examples/idle.rs
@@ -9,10 +9,12 @@ use cortex_m_semihosting::{debug, hprintln};
use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
-const APP: () = {
+mod app {
#[init]
- fn init(_: init::Context) {
+ fn init(_: init::Context) -> init::LateResources {
hprintln!("init").unwrap();
+
+ init::LateResources {}
}
#[idle]
@@ -26,6 +28,8 @@ const APP: () = {
debug::exit(debug::EXIT_SUCCESS);
- loop {}
+ loop {
+ cortex_m::asm::nop();
+ }
}
-};
+}