aboutsummaryrefslogtreecommitdiff
path: root/examples/boot/application
diff options
context:
space:
mode:
Diffstat (limited to 'examples/boot/application')
-rw-r--r--examples/boot/application/nrf/src/bin/b.rs6
-rw-r--r--examples/boot/application/rp/src/bin/a.rs4
-rw-r--r--examples/boot/application/rp/src/bin/b.rs6
-rw-r--r--examples/boot/application/stm32f3/src/bin/b.rs6
-rw-r--r--examples/boot/application/stm32f7/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32h7/src/bin/b.rs8
-rw-r--r--examples/boot/application/stm32l0/src/bin/a.rs4
-rw-r--r--examples/boot/application/stm32l0/src/bin/b.rs6
-rw-r--r--examples/boot/application/stm32l1/src/bin/a.rs4
-rw-r--r--examples/boot/application/stm32l1/src/bin/b.rs6
-rw-r--r--examples/boot/application/stm32l4/src/bin/b.rs6
-rw-r--r--examples/boot/application/stm32wl/src/bin/b.rs6
12 files changed, 35 insertions, 35 deletions
diff --git a/examples/boot/application/nrf/src/bin/b.rs b/examples/boot/application/nrf/src/bin/b.rs
index 15ebce5fa..a88c3c56c 100644
--- a/examples/boot/application/nrf/src/bin/b.rs
+++ b/examples/boot/application/nrf/src/bin/b.rs
@@ -5,7 +5,7 @@
5 5
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_nrf::gpio::{Level, Output, OutputDrive}; 7use embassy_nrf::gpio::{Level, Output, OutputDrive};
8use embassy_time::{Duration, Timer}; 8use embassy_time::Timer;
9use panic_reset as _; 9use panic_reset as _;
10 10
11#[embassy_executor::main] 11#[embassy_executor::main]
@@ -19,8 +19,8 @@ async fn main(_spawner: Spawner) {
19 19
20 loop { 20 loop {
21 led.set_high(); 21 led.set_high();
22 Timer::after(Duration::from_millis(300)).await; 22 Timer::after_millis(300).await;
23 led.set_low(); 23 led.set_low();
24 Timer::after(Duration::from_millis(300)).await; 24 Timer::after_millis(300).await;
25 } 25 }
26} 26}
diff --git a/examples/boot/application/rp/src/bin/a.rs b/examples/boot/application/rp/src/bin/a.rs
index a4602a7ed..6fd5d7f60 100644
--- a/examples/boot/application/rp/src/bin/a.rs
+++ b/examples/boot/application/rp/src/bin/a.rs
@@ -41,7 +41,7 @@ async fn main(_s: Spawner) {
41 let mut aligned = AlignedBuffer([0; 1]); 41 let mut aligned = AlignedBuffer([0; 1]);
42 let mut updater = BlockingFirmwareUpdater::new(config, &mut aligned.0); 42 let mut updater = BlockingFirmwareUpdater::new(config, &mut aligned.0);
43 43
44 Timer::after(Duration::from_secs(5)).await; 44 Timer::after_secs(5).await;
45 watchdog.feed(); 45 watchdog.feed();
46 led.set_high(); 46 led.set_high();
47 let mut offset = 0; 47 let mut offset = 0;
@@ -61,7 +61,7 @@ async fn main(_s: Spawner) {
61 watchdog.feed(); 61 watchdog.feed();
62 defmt::info!("firmware written, marking update"); 62 defmt::info!("firmware written, marking update");
63 updater.mark_updated().unwrap(); 63 updater.mark_updated().unwrap();
64 Timer::after(Duration::from_secs(2)).await; 64 Timer::after_secs(2).await;
65 led.set_low(); 65 led.set_low();
66 defmt::info!("update marked, resetting"); 66 defmt::info!("update marked, resetting");
67 cortex_m::peripheral::SCB::sys_reset(); 67 cortex_m::peripheral::SCB::sys_reset();
diff --git a/examples/boot/application/rp/src/bin/b.rs b/examples/boot/application/rp/src/bin/b.rs
index 47dec329c..1eca5b4a2 100644
--- a/examples/boot/application/rp/src/bin/b.rs
+++ b/examples/boot/application/rp/src/bin/b.rs
@@ -4,7 +4,7 @@
4 4
5use embassy_executor::Spawner; 5use embassy_executor::Spawner;
6use embassy_rp::gpio; 6use embassy_rp::gpio;
7use embassy_time::{Duration, Timer}; 7use embassy_time::Timer;
8use gpio::{Level, Output}; 8use gpio::{Level, Output};
9use {defmt_rtt as _, panic_reset as _}; 9use {defmt_rtt as _, panic_reset as _};
10 10
@@ -15,9 +15,9 @@ async fn main(_s: Spawner) {
15 15
16 loop { 16 loop {
17 led.set_high(); 17 led.set_high();
18 Timer::after(Duration::from_millis(100)).await; 18 Timer::after_millis(100).await;
19 19
20 led.set_low(); 20 led.set_low();
21 Timer::after(Duration::from_millis(100)).await; 21 Timer::after_millis(100).await;
22 } 22 }
23} 23}
diff --git a/examples/boot/application/stm32f3/src/bin/b.rs b/examples/boot/application/stm32f3/src/bin/b.rs
index a5862b1b0..8411f384c 100644
--- a/examples/boot/application/stm32f3/src/bin/b.rs
+++ b/examples/boot/application/stm32f3/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}
diff --git a/examples/boot/application/stm32f7/src/bin/b.rs b/examples/boot/application/stm32f7/src/bin/b.rs
index 16c94d845..4c2ad06a2 100644
--- a/examples/boot/application/stm32f7/src/bin/b.rs
+++ b/examples/boot/application/stm32f7/src/bin/b.rs
@@ -6,21 +6,21 @@
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]
13async fn main(_spawner: Spawner) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default()); 14 let p = embassy_stm32::init(Default::default());
15 Timer::after(Duration::from_millis(300)).await; 15 Timer::after_millis(300).await;
16 let mut led = Output::new(p.PB7, Level::High, Speed::Low); 16 let mut led = Output::new(p.PB7, Level::High, Speed::Low);
17 led.set_high(); 17 led.set_high();
18 18
19 loop { 19 loop {
20 led.set_high(); 20 led.set_high();
21 Timer::after(Duration::from_millis(500)).await; 21 Timer::after_millis(500).await;
22 22
23 led.set_low(); 23 led.set_low();
24 Timer::after(Duration::from_millis(500)).await; 24 Timer::after_millis(500).await;
25 } 25 }
26} 26}
diff --git a/examples/boot/application/stm32h7/src/bin/b.rs b/examples/boot/application/stm32h7/src/bin/b.rs
index 34799279c..5c03e2d0c 100644
--- a/examples/boot/application/stm32h7/src/bin/b.rs
+++ b/examples/boot/application/stm32h7/src/bin/b.rs
@@ -6,21 +6,21 @@
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]
13async fn main(_spawner: Spawner) { 13async fn main(_spawner: Spawner) {
14 let p = embassy_stm32::init(Default::default()); 14 let p = embassy_stm32::init(Default::default());
15 Timer::after(Duration::from_millis(300)).await; 15 Timer::after_millis(300).await;
16 let mut led = Output::new(p.PB14, Level::High, Speed::Low); 16 let mut led = Output::new(p.PB14, Level::High, Speed::Low);
17 led.set_high(); 17 led.set_high();
18 18
19 loop { 19 loop {
20 led.set_high(); 20 led.set_high();
21 Timer::after(Duration::from_millis(500)).await; 21 Timer::after_millis(500).await;
22 22
23 led.set_low(); 23 led.set_low();
24 Timer::after(Duration::from_millis(500)).await; 24 Timer::after_millis(500).await;
25 } 25 }
26} 26}
diff --git a/examples/boot/application/stm32l0/src/bin/a.rs b/examples/boot/application/stm32l0/src/bin/a.rs
index b4cdcd44d..42e1a71eb 100644
--- a/examples/boot/application/stm32l0/src/bin/a.rs
+++ b/examples/boot/application/stm32l0/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/stm32l0/src/bin/b.rs b/examples/boot/application/stm32l0/src/bin/b.rs
index ee40274ff..52d42395f 100644
--- a/examples/boot/application/stm32l0/src/bin/b.rs
+++ b/examples/boot/application/stm32l0/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}
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}
diff --git a/examples/boot/application/stm32l4/src/bin/b.rs b/examples/boot/application/stm32l4/src/bin/b.rs
index a5862b1b0..8411f384c 100644
--- a/examples/boot/application/stm32l4/src/bin/b.rs
+++ b/examples/boot/application/stm32l4/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}
diff --git a/examples/boot/application/stm32wl/src/bin/b.rs b/examples/boot/application/stm32wl/src/bin/b.rs
index f9f0ffc60..1ca3c6ea8 100644
--- a/examples/boot/application/stm32wl/src/bin/b.rs
+++ b/examples/boot/application/stm32wl/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}