diff options
author | 2019-04-21 20:10:40 +0200 | |
---|---|---|
committer | 2019-05-01 20:49:25 +0200 | |
commit | 1b4b006bab7ee05e403a4fc48ae751d037f95b1a (patch) | |
tree | 62d7e7ebf3f8fc6fff10cf92cb1623a025163006 /examples/init.rs | |
parent | a452700628e352e6ac01da9e16223a47752ca860 (diff) | |
download | rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.gz rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.zst rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.zip |
update examples
Diffstat (limited to 'examples/init.rs')
-rw-r--r-- | examples/init.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/init.rs b/examples/init.rs index be6cfe3e..df687794 100644 --- a/examples/init.rs +++ b/examples/init.rs @@ -8,19 +8,18 @@ extern crate panic_semihosting; use cortex_m_semihosting::{debug, hprintln}; -use rtfm::app; -#[app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965)] const APP: () = { #[init] - fn init() { + fn init(c: init::Context) { static mut X: u32 = 0; // Cortex-M peripherals - let _core: rtfm::Peripherals = core; + let _core: rtfm::Peripherals = c.core; // Device specific peripherals - let _device: lm3s6965::Peripherals = device; + let _device: lm3s6965::Peripherals = c.device; // Safe access to local `static mut` variable let _x: &'static mut u32 = X; |