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/nrf52840/src/bin/temp.rs | |
| parent | 7559f9e5834799b041d899767ef4305dcfdf0181 (diff) | |
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/nrf52840/src/bin/temp.rs')
| -rw-r--r-- | examples/nrf52840/src/bin/temp.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/nrf52840/src/bin/temp.rs b/examples/nrf52840/src/bin/temp.rs index 70957548f..d94dea38d 100644 --- a/examples/nrf52840/src/bin/temp.rs +++ b/examples/nrf52840/src/bin/temp.rs | |||
| @@ -6,7 +6,7 @@ use defmt::info; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_nrf::temp::Temp; | 7 | use embassy_nrf::temp::Temp; |
| 8 | use embassy_nrf::{bind_interrupts, temp}; | 8 | use embassy_nrf::{bind_interrupts, temp}; |
| 9 | use embassy_time::{Duration, Timer}; | 9 | use embassy_time::Timer; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | bind_interrupts!(struct Irqs { | 12 | bind_interrupts!(struct Irqs { |
| @@ -21,6 +21,6 @@ async fn main(_spawner: Spawner) { | |||
| 21 | loop { | 21 | loop { |
| 22 | let value = temp.read().await; | 22 | let value = temp.read().await; |
| 23 | info!("temperature: {}℃", value.to_num::<u16>()); | 23 | info!("temperature: {}℃", value.to_num::<u16>()); |
| 24 | Timer::after(Duration::from_secs(1)).await; | 24 | Timer::after_secs(1).await; |
| 25 | } | 25 | } |
| 26 | } | 26 | } |
