diff options
author | 2019-04-21 20:10:40 +0200 | |
---|---|---|
committer | 2019-05-01 20:49:25 +0200 | |
commit | 1b4b006bab7ee05e403a4fc48ae751d037f95b1a (patch) | |
tree | 62d7e7ebf3f8fc6fff10cf92cb1623a025163006 /examples/ramfunc.rs | |
parent | a452700628e352e6ac01da9e16223a47752ca860 (diff) | |
download | rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.gz rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.zst rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.zip |
update examples
Diffstat (limited to 'examples/ramfunc.rs')
-rw-r--r-- | examples/ramfunc.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/ramfunc.rs b/examples/ramfunc.rs index 37ea82a7..4b0d69c7 100644 --- a/examples/ramfunc.rs +++ b/examples/ramfunc.rs @@ -8,18 +8,17 @@ extern crate panic_semihosting; use cortex_m_semihosting::{debug, hprintln}; -use rtfm::app; -#[app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965)] const APP: () = { #[init(spawn = [bar])] - fn init() { - spawn.bar().unwrap(); + fn init(c: init::Context) { + c.spawn.bar().unwrap(); } #[inline(never)] #[task] - fn foo() { + fn foo(_: foo::Context) { hprintln!("foo").unwrap(); debug::exit(debug::EXIT_SUCCESS); @@ -29,8 +28,8 @@ const APP: () = { #[inline(never)] #[link_section = ".data.bar"] #[task(priority = 2, spawn = [foo])] - fn bar() { - spawn.foo().unwrap(); + fn bar(c: bar::Context) { + c.spawn.foo().unwrap(); } extern "C" { |