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/nrf5340/src | |
| parent | 7559f9e5834799b041d899767ef4305dcfdf0181 (diff) | |
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/nrf5340/src')
| -rw-r--r-- | examples/nrf5340/src/bin/blinky.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/nrf5340/src/bin/blinky.rs b/examples/nrf5340/src/bin/blinky.rs index 3422cedf0..b784564a5 100644 --- a/examples/nrf5340/src/bin/blinky.rs +++ b/examples/nrf5340/src/bin/blinky.rs | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_nrf::gpio::{Level, Output, OutputDrive}; | 6 | use embassy_nrf::gpio::{Level, Output, OutputDrive}; |
| 7 | use embassy_time::{Duration, Timer}; | 7 | use embassy_time::Timer; |
| 8 | use {defmt_rtt as _, panic_probe as _}; | 8 | use {defmt_rtt as _, panic_probe as _}; |
| 9 | 9 | ||
| 10 | #[embassy_executor::main] | 10 | #[embassy_executor::main] |
| @@ -14,8 +14,8 @@ async fn main(_spawner: Spawner) { | |||
| 14 | 14 | ||
| 15 | loop { | 15 | loop { |
| 16 | led.set_high(); | 16 | led.set_high(); |
| 17 | Timer::after(Duration::from_millis(300)).await; | 17 | Timer::after_millis(300).await; |
| 18 | led.set_low(); | 18 | led.set_low(); |
| 19 | Timer::after(Duration::from_millis(300)).await; | 19 | Timer::after_millis(300).await; |
| 20 | } | 20 | } |
| 21 | } | 21 | } |
