diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2020-10-11 19:41:57 +0200 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2020-10-11 20:35:50 +0200 |
| commit | 5b8e6a22ab68e316e11641dedf5b39e20878c7b7 (patch) | |
| tree | 1bdc1812ca24203f3b99f381b1e9f8c89f60be24 /examples/periodic.rs | |
| parent | 524273c96a978299b64e51a9cdcc007585a0f170 (diff) | |
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/periodic.rs')
| -rw-r--r-- | examples/periodic.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 |
