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/stm32h7/src/bin/mco.rs | |
| parent | 7559f9e5834799b041d899767ef4305dcfdf0181 (diff) | |
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/stm32h7/src/bin/mco.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/mco.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/mco.rs b/examples/stm32h7/src/bin/mco.rs index de89aee2f..c023f4584 100644 --- a/examples/stm32h7/src/bin/mco.rs +++ b/examples/stm32h7/src/bin/mco.rs | |||
| @@ -6,7 +6,7 @@ use defmt::*; | |||
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_stm32::gpio::{Level, Output, Speed}; | 7 | use embassy_stm32::gpio::{Level, Output, Speed}; |
| 8 | use embassy_stm32::rcc::{Mco, Mco1Source, McoPrescaler}; | 8 | use embassy_stm32::rcc::{Mco, Mco1Source, McoPrescaler}; |
| 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 | #[embassy_executor::main] | 12 | #[embassy_executor::main] |
| @@ -21,10 +21,10 @@ async fn main(_spawner: Spawner) { | |||
| 21 | loop { | 21 | loop { |
| 22 | info!("high"); | 22 | info!("high"); |
| 23 | led.set_high(); | 23 | led.set_high(); |
| 24 | Timer::after(Duration::from_millis(500)).await; | 24 | Timer::after_millis(500).await; |
| 25 | 25 | ||
| 26 | info!("low"); | 26 | info!("low"); |
| 27 | led.set_low(); | 27 | led.set_low(); |
| 28 | Timer::after(Duration::from_millis(500)).await; | 28 | Timer::after_millis(500).await; |
| 29 | } | 29 | } |
| 30 | } | 30 | } |
