aboutsummaryrefslogtreecommitdiff
path: root/examples/boot/application/stm32l1/src
diff options
context:
space:
mode:
authorAdam Greig <[email protected]>2023-10-15 00:57:25 +0100
committerAdam Greig <[email protected]>2023-10-15 01:30:12 +0100
commit0621e957a0ddc7010d46b3ea3ddc8b9852bc8333 (patch)
treef6caefe939109e55a73e9141c736d2f6c20f51e8 /examples/boot/application/stm32l1/src
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/boot/application/stm32l1/src')
-rw-r--r--examples/boot/application/stm32l1/src/bin/a.rs4
-rw-r--r--examples/boot/application/stm32l1/src/bin/b.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/boot/application/stm32l1/src/bin/a.rs b/examples/boot/application/stm32l1/src/bin/a.rs
index b4cdcd44d..42e1a71eb 100644
--- a/examples/boot/application/stm32l1/src/bin/a.rs
+++ b/examples/boot/application/stm32l1/src/bin/a.rs
@@ -11,7 +11,7 @@ use embassy_stm32::exti::ExtiInput;
11use embassy_stm32::flash::{Flash, WRITE_SIZE}; 11use embassy_stm32::flash::{Flash, WRITE_SIZE};
12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; 12use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
13use embassy_sync::mutex::Mutex; 13use embassy_sync::mutex::Mutex;
14use embassy_time::{Duration, Timer}; 14use embassy_time::Timer;
15use panic_reset as _; 15use panic_reset as _;
16 16
17#[cfg(feature = "skip-include")] 17#[cfg(feature = "skip-include")]
@@ -46,6 +46,6 @@ async fn main(_spawner: Spawner) {
46 46
47 updater.mark_updated().await.unwrap(); 47 updater.mark_updated().await.unwrap();
48 led.set_low(); 48 led.set_low();
49 Timer::after(Duration::from_secs(1)).await; 49 Timer::after_secs(1).await;
50 cortex_m::peripheral::SCB::sys_reset(); 50 cortex_m::peripheral::SCB::sys_reset();
51} 51}
diff --git a/examples/boot/application/stm32l1/src/bin/b.rs b/examples/boot/application/stm32l1/src/bin/b.rs
index ee40274ff..52d42395f 100644
--- a/examples/boot/application/stm32l1/src/bin/b.rs
+++ b/examples/boot/application/stm32l1/src/bin/b.rs
@@ -6,7 +6,7 @@
6use defmt_rtt::*; 6use defmt_rtt::*;
7use embassy_executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_stm32::gpio::{Level, Output, Speed}; 8use embassy_stm32::gpio::{Level, Output, Speed};
9use embassy_time::{Duration, Timer}; 9use embassy_time::Timer;
10use panic_reset as _; 10use panic_reset as _;
11 11
12#[embassy_executor::main] 12#[embassy_executor::main]
@@ -16,9 +16,9 @@ async fn main(_spawner: Spawner) {
16 16
17 loop { 17 loop {
18 led.set_high(); 18 led.set_high();
19 Timer::after(Duration::from_millis(500)).await; 19 Timer::after_millis(500).await;
20 20
21 led.set_low(); 21 led.set_low();
22 Timer::after(Duration::from_millis(500)).await; 22 Timer::after_millis(500).await;
23 } 23 }
24} 24}