aboutsummaryrefslogtreecommitdiff
path: root/examples/baseline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/baseline.rs')
-rw-r--r--examples/baseline.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/baseline.rs b/examples/baseline.rs
index f46b273d..3ab40dbb 100644
--- a/examples/baseline.rs
+++ b/examples/baseline.rs
@@ -11,15 +11,17 @@ use panic_semihosting as _;
// NOTE: does NOT properly work on QEMU
#[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)]
-const APP: () = {
+mod app {
#[init(spawn = [foo])]
- fn init(cx: init::Context) {
+ 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();
+
+ init::LateResources {}
}
#[task(schedule = [foo])]
@@ -51,4 +53,4 @@ const APP: () = {
extern "C" {
fn SSI0();
}
-};
+}