aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src/bin/watchdog.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rp/src/bin/watchdog.rs')
-rw-r--r--examples/rp/src/bin/watchdog.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/rp/src/bin/watchdog.rs b/examples/rp/src/bin/watchdog.rs
index fe5eaf926..b6af518af 100644
--- a/examples/rp/src/bin/watchdog.rs
+++ b/examples/rp/src/bin/watchdog.rs
@@ -24,7 +24,7 @@ async fn main(_spawner: Spawner) {
24 24
25 // Set the LED high for 2 seconds so we know when we're about to start the watchdog 25 // Set the LED high for 2 seconds so we know when we're about to start the watchdog
26 led.set_high(); 26 led.set_high();
27 Timer::after(Duration::from_secs(2)).await; 27 Timer::after_secs(2).await;
28 28
29 // Set to watchdog to reset if it's not fed within 1.05 seconds, and start it 29 // Set to watchdog to reset if it's not fed within 1.05 seconds, and start it
30 watchdog.start(Duration::from_millis(1_050)); 30 watchdog.start(Duration::from_millis(1_050));
@@ -33,9 +33,9 @@ async fn main(_spawner: Spawner) {
33 // Blink once a second for 5 seconds, feed the watchdog timer once a second to avoid a reset 33 // Blink once a second for 5 seconds, feed the watchdog timer once a second to avoid a reset
34 for _ in 1..=5 { 34 for _ in 1..=5 {
35 led.set_low(); 35 led.set_low();
36 Timer::after(Duration::from_millis(500)).await; 36 Timer::after_millis(500).await;
37 led.set_high(); 37 led.set_high();
38 Timer::after(Duration::from_millis(500)).await; 38 Timer::after_millis(500).await;
39 info!("Feeding watchdog"); 39 info!("Feeding watchdog");
40 watchdog.feed(); 40 watchdog.feed();
41 } 41 }
@@ -45,8 +45,8 @@ async fn main(_spawner: Spawner) {
45 // The processor should reset in 1.05 seconds. 45 // The processor should reset in 1.05 seconds.
46 loop { 46 loop {
47 led.set_low(); 47 led.set_low();
48 Timer::after(Duration::from_millis(100)).await; 48 Timer::after_millis(100).await;
49 led.set_high(); 49 led.set_high();
50 Timer::after(Duration::from_millis(100)).await; 50 Timer::after_millis(100).await;
51 } 51 }
52} 52}