diff options
author | 2020-10-07 09:22:38 +1100 | |
---|---|---|
committer | 2020-10-07 09:22:38 +1100 | |
commit | f386cb63cb6d3cd6642debfb4dc1bde97b325550 (patch) | |
tree | 30b21968997f809dbbba59117db93254607fa22d /examples/schedule.rs | |
parent | 3d6a0ea64fb2661ee1150a84425f50c18c2de9ad (diff) | |
parent | b1e1abae29591e50ebf345a2bd249a73e564cea9 (diff) | |
download | rtic-f386cb63cb6d3cd6642debfb4dc1bde97b325550.tar.gz rtic-f386cb63cb6d3cd6642debfb4dc1bde97b325550.tar.zst rtic-f386cb63cb6d3cd6642debfb4dc1bde97b325550.zip |
Merge branch 'master'
of https://github.com/rtic-rs/cortex-m-rtic
Diffstat (limited to 'examples/schedule.rs')
-rw-r--r-- | examples/schedule.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/schedule.rs b/examples/schedule.rs index 70a7a5e3..7e6adc1a 100644 --- a/examples/schedule.rs +++ b/examples/schedule.rs @@ -12,9 +12,9 @@ use rtic::cyccnt::{Instant, U32Ext as _}; // NOTE: does NOT work on QEMU! #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] -const APP: () = { +mod app { #[init(schedule = [foo, bar])] - fn init(mut cx: init::Context) { + fn init(mut cx: init::Context) -> init::LateResources { // Initialize (enable) the monotonic timer (CYCCNT) cx.core.DCB.enable_trace(); // required on Cortex-M7 devices that software lock the DWT (e.g. STM32F7) @@ -32,6 +32,8 @@ const APP: () = { // Schedule `bar` to run 4e6 cycles in the future cx.schedule.bar(now + 4_000_000.cycles()).unwrap(); + + init::LateResources {} } #[task] @@ -50,4 +52,4 @@ const APP: () = { extern "C" { fn SSI0(); } -}; +} |