From 5b8e6a22ab68e316e11641dedf5b39e20878c7b7 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 11 Oct 2020 19:41:57 +0200 Subject: Fixing examples and tests, modules now import user imports correctly Fmt Correct syntax crate UI test fix Fix build script Cleanup More cleanup --- examples/periodic.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/periodic.rs') diff --git a/examples/periodic.rs b/examples/periodic.rs index d3aedd3..95cd145 100644 --- a/examples/periodic.rs +++ b/examples/periodic.rs @@ -15,21 +15,21 @@ const PERIOD: u32 = 8_000_000; #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] mod app { - #[init(schedule = [foo])] + #[init] fn init(cx: init::Context) -> init::LateResources { // omitted: initialization of `CYCCNT` - cx.schedule.foo(cx.start + PERIOD.cycles()).unwrap(); + foo::schedule(cx.start + PERIOD.cycles()).unwrap(); init::LateResources {} } - #[task(schedule = [foo])] + #[task] fn foo(cx: foo::Context) { let now = Instant::now(); hprintln!("foo(scheduled = {:?}, now = {:?})", cx.scheduled, now).unwrap(); - cx.schedule.foo(cx.scheduled + PERIOD.cycles()).unwrap(); + foo::schedule(cx.scheduled + PERIOD.cycles()).unwrap(); } // RTIC requires that unused interrupts are declared in an extern block when -- cgit v1.2.3