diff options
author | 2020-10-11 19:41:57 +0200 | |
---|---|---|
committer | 2020-10-11 20:35:50 +0200 | |
commit | 5b8e6a22ab68e316e11641dedf5b39e20878c7b7 (patch) | |
tree | 1bdc1812ca24203f3b99f381b1e9f8c89f60be24 /examples/baseline.rs | |
parent | 524273c96a978299b64e51a9cdcc007585a0f170 (diff) | |
download | rtic-5b8e6a22ab68e316e11641dedf5b39e20878c7b7.tar.gz rtic-5b8e6a22ab68e316e11641dedf5b39e20878c7b7.tar.zst rtic-5b8e6a22ab68e316e11641dedf5b39e20878c7b7.zip |
Fixing examples and tests, modules now import user imports correctly
Fmt
Correct syntax crate
UI test fix
Fix build script
Cleanup
More cleanup
Diffstat (limited to 'examples/baseline.rs')
-rw-r--r-- | examples/baseline.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/baseline.rs b/examples/baseline.rs index 3ab40dbb..0b7e3ea0 100644 --- a/examples/baseline.rs +++ b/examples/baseline.rs @@ -12,19 +12,19 @@ use panic_semihosting as _; // NOTE: does NOT properly work on QEMU #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] mod app { - #[init(spawn = [foo])] + #[init] fn init(cx: init::Context) -> init::LateResources { // omitted: initialization of `CYCCNT` hprintln!("init(baseline = {:?})", cx.start).unwrap(); // `foo` inherits the baseline of `init`: `Instant(0)` - cx.spawn.foo().unwrap(); + foo::spawn().unwrap(); init::LateResources {} } - #[task(schedule = [foo])] + #[task] fn foo(cx: foo::Context) { static mut ONCE: bool = true; @@ -39,12 +39,12 @@ mod app { } } - #[task(binds = UART0, spawn = [foo])] + #[task(binds = UART0)] fn uart0(cx: uart0::Context) { hprintln!("UART0(baseline = {:?})", cx.start).unwrap(); // `foo` inherits the baseline of `UART0`: its `start` time - cx.spawn.foo().unwrap(); + foo::spawn().unwrap(); } // RTIC requires that unused interrupts are declared in an extern block when |