diff options
author | 2023-01-04 21:33:41 +0100 | |
---|---|---|
committer | 2023-03-01 00:31:05 +0100 | |
commit | 3b97531a5c40293e265999db543acec365c629df (patch) | |
tree | ff552e875805ad8a2150920215bc79632f6df2eb /examples/async-task.rs | |
parent | 858320cbfc391a74bff6b9c8a0b3c7696a232b76 (diff) | |
download | rtic-3b97531a5c40293e265999db543acec365c629df.tar.gz rtic-3b97531a5c40293e265999db543acec365c629df.tar.zst rtic-3b97531a5c40293e265999db543acec365c629df.zip |
First example builds again
Diffstat (limited to 'examples/async-task.rs')
-rw-r--r-- | examples/async-task.rs | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/examples/async-task.rs b/examples/async-task.rs index 4d25ec44..7d0ee86e 100644 --- a/examples/async-task.rs +++ b/examples/async-task.rs @@ -13,7 +13,6 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0, UART0], peripherals = true)] mod app { use cortex_m_semihosting::{debug, hprintln}; - use systick_monotonic::*; #[shared] struct Shared {} @@ -21,21 +20,13 @@ mod app { #[local] struct Local {} - #[monotonic(binds = SysTick, default = true)] - type MyMono = Systick<100>; - #[init] - fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { + fn init(cx: init::Context) -> (Shared, Local) { hprintln!("init").unwrap(); - normal_task::spawn().ok(); - async_task::spawn().ok(); + async_task::spawn().unwrap(); - ( - Shared {}, - Local {}, - init::Monotonics(Systick::new(cx.core.SYST, 12_000_000)), - ) + (Shared {}, Local {}) } #[idle] @@ -48,11 +39,6 @@ mod app { } #[task] - fn normal_task(_cx: normal_task::Context) { - hprintln!("hello from normal").ok(); - } - - #[task] async fn async_task(_cx: async_task::Context) { hprintln!("hello from async").ok(); |