diff options
Diffstat (limited to 'examples/stm32f4/src/bin/wdt.rs')
| -rw-r--r-- | examples/stm32f4/src/bin/wdt.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32f4/src/bin/wdt.rs b/examples/stm32f4/src/bin/wdt.rs index e5d122af7..0443b61c5 100644 --- a/examples/stm32f4/src/bin/wdt.rs +++ b/examples/stm32f4/src/bin/wdt.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::wdg::IndependentWatchdog; | 8 | use embassy_stm32::wdg::IndependentWatchdog; |
| 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] |
| @@ -24,11 +24,11 @@ async fn main(_spawner: Spawner) { | |||
| 24 | loop { | 24 | loop { |
| 25 | info!("high"); | 25 | info!("high"); |
| 26 | led.set_high(); | 26 | led.set_high(); |
| 27 | Timer::after(Duration::from_millis(300)).await; | 27 | Timer::after_millis(300).await; |
| 28 | 28 | ||
| 29 | info!("low"); | 29 | info!("low"); |
| 30 | led.set_low(); | 30 | led.set_low(); |
| 31 | Timer::after(Duration::from_millis(300)).await; | 31 | Timer::after_millis(300).await; |
| 32 | 32 | ||
| 33 | // Pet watchdog for 5 iterations and then stop. | 33 | // Pet watchdog for 5 iterations and then stop. |
| 34 | // MCU should restart in 1 second after the last pet. | 34 | // MCU should restart in 1 second after the last pet. |
