aboutsummaryrefslogtreecommitdiff
path: root/examples/double_schedule.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2020-10-11 19:41:57 +0200
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2020-10-11 20:35:50 +0200
commit5b8e6a22ab68e316e11641dedf5b39e20878c7b7 (patch)
tree1bdc1812ca24203f3b99f381b1e9f8c89f60be24 /examples/double_schedule.rs
parent524273c96a978299b64e51a9cdcc007585a0f170 (diff)
downloadrtic-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/double_schedule.rs')
-rw-r--r--examples/double_schedule.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/double_schedule.rs b/examples/double_schedule.rs
index b1b78b80..d242c57e 100644
--- a/examples/double_schedule.rs
+++ b/examples/double_schedule.rs
@@ -16,21 +16,21 @@ mod app {
nothing: (),
}
- #[init(spawn = [task1])]
- fn init(cx: init::Context) -> init::LateResources {
- cx.spawn.task1().ok();
+ #[init]
+ fn init(_: init::Context) -> init::LateResources {
+ task1::spawn().ok();
init::LateResources { nothing: () }
}
- #[task(schedule = [task2])]
+ #[task]
fn task1(_cx: task1::Context) {
- _cx.schedule.task2(_cx.scheduled + 100.cycles()).ok();
+ task2::schedule(_cx.scheduled + 100.cycles()).ok();
}
- #[task(schedule = [task1])]
+ #[task]
fn task2(_cx: task2::Context) {
- _cx.schedule.task1(_cx.scheduled + 100.cycles()).ok();
+ task1::schedule(_cx.scheduled + 100.cycles()).ok();
}
extern "C" {