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/task.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'examples/task.rs') diff --git a/examples/task.rs b/examples/task.rs index 80a9c431..f3d916f3 100644 --- a/examples/task.rs +++ b/examples/task.rs @@ -10,27 +10,27 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965)] mod app { - #[init(spawn = [foo])] - fn init(c: init::Context) -> init::LateResources { - c.spawn.foo().unwrap(); + #[init] + fn init(_: init::Context) -> init::LateResources { + foo::spawn().unwrap(); init::LateResources {} } - #[task(spawn = [bar, baz])] - fn foo(c: foo::Context) { + #[task] + fn foo(_: foo::Context) { hprintln!("foo - start").unwrap(); // spawns `bar` onto the task scheduler // `foo` and `bar` have the same priority so `bar` will not run until // after `foo` terminates - c.spawn.bar().unwrap(); + bar::spawn().unwrap(); hprintln!("foo - middle").unwrap(); // spawns `baz` onto the task scheduler // `baz` has higher priority than `foo` so it immediately preempts `foo` - c.spawn.baz().unwrap(); + baz::spawn().unwrap(); hprintln!("foo - end").unwrap(); } -- cgit v1.2.3