aboutsummaryrefslogtreecommitdiff
path: root/examples/hardware.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2023-01-02 14:34:05 +0100
committerGravatar Henrik Tjäder <henrik@tjaders.com> 2023-03-01 00:31:01 +0100
commit582c602912592ec7ebea3096aefa02aea99c2143 (patch)
tree96b14a130788960ee06d7e80adec43a167b4844b /examples/hardware.rs
parent7614b96fe45240dafe91ae549e712b560e2d4c10 (diff)
downloadrtic-582c602912592ec7ebea3096aefa02aea99c2143.tar.gz
rtic-582c602912592ec7ebea3096aefa02aea99c2143.tar.zst
rtic-582c602912592ec7ebea3096aefa02aea99c2143.zip
Old xtask test pass
Diffstat (limited to 'examples/hardware.rs')
-rw-r--r--examples/hardware.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/hardware.rs b/examples/hardware.rs
index a7fdb47a..60632247 100644
--- a/examples/hardware.rs
+++ b/examples/hardware.rs
@@ -2,7 +2,6 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![deny(missing_docs)]
#![no_main]
#![no_std]
@@ -25,7 +24,7 @@ mod app {
// `init` returns because interrupts are disabled
rtic::pend(Interrupt::UART0); // equivalent to NVIC::pend
- hprintln!("init");
+ hprintln!("init").unwrap();
(Shared {}, Local {}, init::Monotonics())
}
@@ -34,15 +33,14 @@ mod app {
fn idle(_: idle::Context) -> ! {
// interrupts are enabled again; the `UART0` handler runs at this point
- hprintln!("idle");
+ hprintln!("idle").unwrap();
rtic::pend(Interrupt::UART0);
+ debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
+
loop {
- // Exit moved after nop to ensure that rtic::pend gets
- // to run before exiting
cortex_m::asm::nop();
- debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}
@@ -55,6 +53,7 @@ mod app {
"UART0 called {} time{}",
*cx.local.times,
if *cx.local.times > 1 { "s" } else { "" }
- );
+ )
+ .unwrap();
}
}