diff options
| author | Adam Greig <[email protected]> | 2023-10-15 00:57:25 +0100 |
|---|---|---|
| committer | Adam Greig <[email protected]> | 2023-10-15 01:30:12 +0100 |
| commit | 0621e957a0ddc7010d46b3ea3ddc8b9852bc8333 (patch) | |
| tree | f6caefe939109e55a73e9141c736d2f6c20f51e8 /examples/rp/src/bin/multicore.rs | |
| parent | 7559f9e5834799b041d899767ef4305dcfdf0181 (diff) | |
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/rp/src/bin/multicore.rs')
| -rw-r--r-- | examples/rp/src/bin/multicore.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rp/src/bin/multicore.rs b/examples/rp/src/bin/multicore.rs index bf017f6a7..43eaf8b0a 100644 --- a/examples/rp/src/bin/multicore.rs +++ b/examples/rp/src/bin/multicore.rs | |||
| @@ -13,7 +13,7 @@ use embassy_rp::multicore::{spawn_core1, Stack}; | |||
| 13 | use embassy_rp::peripherals::PIN_25; | 13 | use embassy_rp::peripherals::PIN_25; |
| 14 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 14 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 15 | use embassy_sync::channel::Channel; | 15 | use embassy_sync::channel::Channel; |
| 16 | use embassy_time::{Duration, Timer}; | 16 | use embassy_time::Timer; |
| 17 | use static_cell::StaticCell; | 17 | use static_cell::StaticCell; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {defmt_rtt as _, panic_probe as _}; |
| 19 | 19 | ||
| @@ -46,9 +46,9 @@ async fn core0_task() { | |||
| 46 | info!("Hello from core 0"); | 46 | info!("Hello from core 0"); |
| 47 | loop { | 47 | loop { |
| 48 | CHANNEL.send(LedState::On).await; | 48 | CHANNEL.send(LedState::On).await; |
| 49 | Timer::after(Duration::from_millis(100)).await; | 49 | Timer::after_millis(100).await; |
| 50 | CHANNEL.send(LedState::Off).await; | 50 | CHANNEL.send(LedState::Off).await; |
| 51 | Timer::after(Duration::from_millis(400)).await; | 51 | Timer::after_millis(400).await; |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | 54 | ||
