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/stm32f1/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/stm32f1/src/bin/adc.rs')
| -rw-r--r-- | examples/stm32f1/src/bin/adc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f1/src/bin/adc.rs b/examples/stm32f1/src/bin/adc.rs index 30947c3c2..1edac3d83 100644 --- a/examples/stm32f1/src/bin/adc.rs +++ b/examples/stm32f1/src/bin/adc.rs | |||
| @@ -7,7 +7,7 @@ use embassy_executor::Spawner; | |||
| 7 | use embassy_stm32::adc::Adc; | 7 | use embassy_stm32::adc::Adc; |
| 8 | use embassy_stm32::peripherals::ADC1; | 8 | use embassy_stm32::peripherals::ADC1; |
| 9 | use embassy_stm32::{adc, bind_interrupts}; | 9 | use embassy_stm32::{adc, bind_interrupts}; |
| 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 | bind_interrupts!(struct Irqs { | 13 | bind_interrupts!(struct Irqs { |
| @@ -35,6 +35,6 @@ async fn main(_spawner: Spawner) { | |||
| 35 | loop { | 35 | loop { |
| 36 | let v = adc.read(&mut pin).await; | 36 | let v = adc.read(&mut pin).await; |
| 37 | info!("--> {} - {} mV", v, convert_to_millivolts(v)); | 37 | info!("--> {} - {} mV", v, convert_to_millivolts(v)); |
| 38 | Timer::after(Duration::from_millis(100)).await; | 38 | Timer::after_millis(100).await; |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
