From 1b4b006bab7ee05e403a4fc48ae751d037f95b1a Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 21 Apr 2019 20:10:40 +0200 Subject: update examples --- examples/interrupt.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'examples/interrupt.rs') diff --git a/examples/interrupt.rs b/examples/interrupt.rs index 3c669d9..dd6efa0 100644 --- a/examples/interrupt.rs +++ b/examples/interrupt.rs @@ -9,12 +9,11 @@ extern crate panic_semihosting; use cortex_m_semihosting::{debug, hprintln}; use lm3s6965::Interrupt; -use rtfm::app; -#[app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965)] const APP: () = { #[init] - fn init() { + fn init(_: init::Context) { // Pends the UART0 interrupt but its handler won't run until *after* // `init` returns because interrupts are disabled rtfm::pend(Interrupt::UART0); @@ -23,7 +22,7 @@ const APP: () = { } #[idle] - fn idle() -> ! { + fn idle(_: idle::Context) -> ! { // interrupts are enabled again; the `UART0` handler runs at this point hprintln!("idle").unwrap(); @@ -36,7 +35,7 @@ const APP: () = { } #[interrupt] - fn UART0() { + fn UART0(_: UART0::Context) { static mut TIMES: u32 = 0; // Safe access to local `static mut` variable -- cgit v1.2.3