aboutsummaryrefslogtreecommitdiff
path: root/examples/extern_binds.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--examples/extern_binds.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs
index bfc85cfc..4dc6633c 100644
--- a/examples/extern_binds.rs
+++ b/examples/extern_binds.rs
@@ -2,7 +2,6 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![deny(missing_docs)]
#![no_main]
#![no_std]
@@ -11,7 +10,7 @@ use panic_semihosting as _;
// Free function implementing the interrupt bound task `foo`.
fn foo(_: app::foo::Context) {
- hprintln!("foo called");
+ hprintln!("foo called").ok();
}
#[rtic::app(device = lm3s6965)]
@@ -30,22 +29,21 @@ mod app {
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
rtic::pend(Interrupt::UART0);
- hprintln!("init");
+ hprintln!("init").unwrap();
(Shared {}, Local {}, init::Monotonics())
}
#[idle]
fn idle(_: idle::Context) -> ! {
- hprintln!("idle");
+ hprintln!("idle").unwrap();
rtic::pend(Interrupt::UART0);
+ debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
+
loop {
cortex_m::asm::nop();
- // Exit moved after nop to ensure that rtic::pend gets
- // to run before exiting
- debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}