diff options
Diffstat (limited to 'examples/boot/application/stm32h7/src/bin')
-rw-r--r-- | examples/boot/application/stm32h7/src/bin/a.rs | 5 | ||||
-rw-r--r-- | examples/boot/application/stm32h7/src/bin/b.rs | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/examples/boot/application/stm32h7/src/bin/a.rs b/examples/boot/application/stm32h7/src/bin/a.rs index cc363bb3..8407adac 100644 --- a/examples/boot/application/stm32h7/src/bin/a.rs +++ b/examples/boot/application/stm32h7/src/bin/a.rs @@ -6,16 +6,17 @@ use defmt_rtt::*; use embassy_boot_stm32::FirmwareUpdater; use embassy_embedded_hal::adapter::BlockingAsync; +use embassy_executor::executor::Spawner; use embassy_stm32::exti::ExtiInput; use embassy_stm32::flash::Flash; use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; -use embassy_stm32::Peripherals; use panic_reset as _; static APP_B: &[u8] = include_bytes!("../../b.bin"); #[embassy_executor::main] -async fn main(_s: embassy_executor::executor::Spawner, p: Peripherals) { +async fn main(_spawner: Spawner) { + let p = embassy_stm32::init(Default::default()); let flash = Flash::unlock(p.FLASH); let mut flash = BlockingAsync::new(flash); diff --git a/examples/boot/application/stm32h7/src/bin/b.rs b/examples/boot/application/stm32h7/src/bin/b.rs index 3fa63bdc..cc694e84 100644 --- a/examples/boot/application/stm32h7/src/bin/b.rs +++ b/examples/boot/application/stm32h7/src/bin/b.rs @@ -7,11 +7,11 @@ use defmt_rtt::*; use embassy_executor::executor::Spawner; use embassy_executor::time::{Duration, Timer}; use embassy_stm32::gpio::{Level, Output, Speed}; -use embassy_stm32::Peripherals; use panic_reset as _; #[embassy_executor::main] -async fn main(_spawner: Spawner, p: Peripherals) { +async fn main(_spawner: Spawner) { + let p = embassy_stm32::init(Default::default()); Timer::after(Duration::from_millis(300)).await; let mut led = Output::new(p.PB14, Level::High, Speed::Low); led.set_high(); |