diff options
author | 2020-10-05 18:26:00 +0000 | |
---|---|---|
committer | 2020-10-05 18:26:00 +0000 | |
commit | 12aa9807c4883e1c8b3f226acea3a6aa5e886989 (patch) | |
tree | 4febd53f9ba370a40e3ee0f3630a3542d1be4964 /examples/schedule.rs | |
parent | f493f21359ccb3ab4643d9470f3581532f47593a (diff) | |
parent | 8ab7be98714d1ef6298e6feb19f16b84cd9bb4e6 (diff) | |
download | rtic-12aa9807c4883e1c8b3f226acea3a6aa5e886989.tar.gz rtic-12aa9807c4883e1c8b3f226acea3a6aa5e886989.tar.zst rtic-12aa9807c4883e1c8b3f226acea3a6aa5e886989.zip |
Merge #372
372: Now late resources are always used r=AfoHT a=korken89
Awaits the PR in `rtic-syntax`: https://github.com/rtic-rs/rtic-syntax/pull/32
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'examples/schedule.rs')
-rw-r--r-- | examples/schedule.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/schedule.rs b/examples/schedule.rs index d5547b67..7e6adc1a 100644 --- a/examples/schedule.rs +++ b/examples/schedule.rs @@ -14,7 +14,7 @@ use rtic::cyccnt::{Instant, U32Ext as _}; #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] 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 @@ mod app { // Schedule `bar` to run 4e6 cycles in the future cx.schedule.bar(now + 4_000_000.cycles()).unwrap(); + + init::LateResources {} } #[task] |