diff options
Diffstat (limited to '')
-rw-r--r-- | examples/schedule.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/schedule.rs b/examples/schedule.rs index fd633473..eaafb4c9 100644 --- a/examples/schedule.rs +++ b/examples/schedule.rs @@ -8,31 +8,31 @@ extern crate panic_semihosting; use cortex_m_semihosting::hprintln; -use rtfm::{app, Instant}; +use rtfm::Instant; // NOTE: does NOT work on QEMU! -#[app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965)] const APP: () = { #[init(schedule = [foo, bar])] - fn init() { + fn init(c: init::Context) { let now = Instant::now(); hprintln!("init @ {:?}", now).unwrap(); // Schedule `foo` to run 8e6 cycles (clock cycles) in the future - schedule.foo(now + 8_000_000.cycles()).unwrap(); + c.schedule.foo(now + 8_000_000.cycles()).unwrap(); // Schedule `bar` to run 4e6 cycles in the future - schedule.bar(now + 4_000_000.cycles()).unwrap(); + c.schedule.bar(now + 4_000_000.cycles()).unwrap(); } #[task] - fn foo() { + fn foo(_: foo::Context) { hprintln!("foo @ {:?}", Instant::now()).unwrap(); } #[task] - fn bar() { + fn bar(_: bar::Context) { hprintln!("bar @ {:?}", Instant::now()).unwrap(); } |