diff options
author | 2019-04-21 20:10:40 +0200 | |
---|---|---|
committer | 2019-05-01 20:49:25 +0200 | |
commit | 1b4b006bab7ee05e403a4fc48ae751d037f95b1a (patch) | |
tree | 62d7e7ebf3f8fc6fff10cf92cb1623a025163006 /examples/static.rs | |
parent | a452700628e352e6ac01da9e16223a47752ca860 (diff) | |
download | rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.gz rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.zst rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.zip |
update examples
Diffstat (limited to '')
-rw-r--r-- | examples/static.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/static.rs b/examples/static.rs index 0309b681..2e3b5b41 100644 --- a/examples/static.rs +++ b/examples/static.rs @@ -9,14 +9,13 @@ 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: () = { static KEY: u32 = (); #[init] - fn init() -> init::LateResources { + fn init(_: init::Context) -> init::LateResources { rtfm::pend(Interrupt::UART0); rtfm::pend(Interrupt::UART1); @@ -24,14 +23,14 @@ const APP: () = { } #[interrupt(resources = [KEY])] - fn UART0() { - hprintln!("UART0(KEY = {:#x})", resources.KEY).unwrap(); + fn UART0(c: UART0::Context) { + hprintln!("UART0(KEY = {:#x})", c.resources.KEY).unwrap(); debug::exit(debug::EXIT_SUCCESS); } #[interrupt(priority = 2, resources = [KEY])] - fn UART1() { - hprintln!("UART1(KEY = {:#x})", resources.KEY).unwrap(); + fn UART1(c: UART1::Context) { + hprintln!("UART1(KEY = {:#x})", c.resources.KEY).unwrap(); } }; |