aboutsummaryrefslogtreecommitdiff
path: root/examples/binds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/binds.rs')
-rw-r--r--examples/binds.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/binds.rs b/examples/binds.rs
index faf315f4..42010ae2 100644
--- a/examples/binds.rs
+++ b/examples/binds.rs
@@ -11,12 +11,14 @@ use panic_semihosting as _;
// `examples/interrupt.rs` rewritten to use `binds`
#[rtic::app(device = lm3s6965)]
-const APP: () = {
+mod app {
#[init]
- fn init(_: init::Context) {
+ fn init(_: init::Context) -> init::LateResources {
rtic::pend(Interrupt::UART0);
hprintln!("init").unwrap();
+
+ init::LateResources {}
}
#[idle]
@@ -27,7 +29,9 @@ const APP: () = {
debug::exit(debug::EXIT_SUCCESS);
- loop {}
+ loop {
+ cortex_m::asm::nop();
+ }
}
#[task(binds = UART0)]
@@ -43,4 +47,4 @@ const APP: () = {
)
.unwrap();
}
-};
+}