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/ramfunc.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'examples/ramfunc.rs') diff --git a/examples/ramfunc.rs b/examples/ramfunc.rs index 37ea82a..4b0d69c 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" { -- cgit v1.2.3