diff options
| author | chemicstry <[email protected]> | 2022-07-10 21:08:30 +0300 |
|---|---|---|
| committer | chemicstry <[email protected]> | 2022-07-10 21:08:30 +0300 |
| commit | bd741a40191d127e804d668366e92a8fc43c5b18 (patch) | |
| tree | adce79eaa7dbd240efe63a2f0cc176e4a2b4a69a /examples | |
| parent | 1fd5022e72956ebd0c5c985f3ccf581dabf98f69 (diff) | |
Add comments to watchdog example
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f4/src/bin/wdt.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/stm32f4/src/bin/wdt.rs b/examples/stm32f4/src/bin/wdt.rs index 41e1f4c7b..a23cfe9c0 100644 --- a/examples/stm32f4/src/bin/wdt.rs +++ b/examples/stm32f4/src/bin/wdt.rs | |||
| @@ -32,6 +32,8 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 32 | led.set_low(); | 32 | led.set_low(); |
| 33 | Timer::after(Duration::from_millis(300)).await; | 33 | Timer::after(Duration::from_millis(300)).await; |
| 34 | 34 | ||
| 35 | // Pet watchdog for 5 iterations and then stop. | ||
| 36 | // MCU should restart in 1 second after the last pet. | ||
| 35 | if i < 5 { | 37 | if i < 5 { |
| 36 | info!("Petting watchdog"); | 38 | info!("Petting watchdog"); |
| 37 | unsafe { | 39 | unsafe { |
