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/stm32g4/src/bin/adc.rs | |
| parent | 7559f9e5834799b041d899767ef4305dcfdf0181 (diff) | |
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/stm32g4/src/bin/adc.rs')
| -rw-r--r-- | examples/stm32g4/src/bin/adc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32g4/src/bin/adc.rs b/examples/stm32g4/src/bin/adc.rs index 30a112b7e..9daf4e4cb 100644 --- a/examples/stm32g4/src/bin/adc.rs +++ b/examples/stm32g4/src/bin/adc.rs | |||
| @@ -7,7 +7,7 @@ use embassy_executor::Spawner; | |||
| 7 | use embassy_stm32::adc::{Adc, SampleTime}; | 7 | use embassy_stm32::adc::{Adc, SampleTime}; |
| 8 | use embassy_stm32::rcc::{AdcClockSource, ClockSrc, Pll, PllM, PllN, PllR, PllSrc}; | 8 | use embassy_stm32::rcc::{AdcClockSource, ClockSrc, Pll, PllM, PllN, PllR, PllSrc}; |
| 9 | use embassy_stm32::Config; | 9 | use embassy_stm32::Config; |
| 10 | use embassy_time::{Delay, Duration, Timer}; | 10 | use embassy_time::{Delay, Timer}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
| 13 | #[embassy_executor::main] | 13 | #[embassy_executor::main] |
| @@ -36,6 +36,6 @@ async fn main(_spawner: Spawner) { | |||
| 36 | loop { | 36 | loop { |
| 37 | let measured = adc.read(&mut p.PA7); | 37 | let measured = adc.read(&mut p.PA7); |
| 38 | info!("measured: {}", measured); | 38 | info!("measured: {}", measured); |
| 39 | Timer::after(Duration::from_millis(500)).await; | 39 | Timer::after_millis(500).await; |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
