diff options
Diffstat (limited to 'examples/boot/application')
| -rw-r--r-- | examples/boot/application/stm32f3/src/bin/a.rs | 3 | ||||
| -rw-r--r-- | examples/boot/application/stm32f7/src/bin/a.rs | 3 | ||||
| -rw-r--r-- | examples/boot/application/stm32h7/src/bin/a.rs | 3 | ||||
| -rw-r--r-- | examples/boot/application/stm32l0/src/bin/a.rs | 3 | ||||
| -rw-r--r-- | examples/boot/application/stm32l1/src/bin/a.rs | 15 | ||||
| -rw-r--r-- | examples/boot/application/stm32l4/src/bin/a.rs | 3 | ||||
| -rw-r--r-- | examples/boot/application/stm32wl/src/bin/a.rs | 6 |
7 files changed, 14 insertions, 22 deletions
diff --git a/examples/boot/application/stm32f3/src/bin/a.rs b/examples/boot/application/stm32f3/src/bin/a.rs index e42e24885..8e0a6685e 100644 --- a/examples/boot/application/stm32f3/src/bin/a.rs +++ b/examples/boot/application/stm32f3/src/bin/a.rs | |||
| @@ -6,11 +6,10 @@ use defmt_rtt::*; | |||
| 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; | 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; |
| 7 | use embassy_embedded_hal::adapter::BlockingAsync; | 7 | use embassy_embedded_hal::adapter::BlockingAsync; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::bind_interrupts; | ||
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | 9 | use embassy_stm32::exti::{self, ExtiInput}; |
| 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | 12 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 14 | use embassy_sync::mutex::Mutex; | 13 | use embassy_sync::mutex::Mutex; |
| 15 | use panic_reset as _; | 14 | use panic_reset as _; |
| 16 | 15 | ||
diff --git a/examples/boot/application/stm32f7/src/bin/a.rs b/examples/boot/application/stm32f7/src/bin/a.rs index 5ec220c2e..db808934f 100644 --- a/examples/boot/application/stm32f7/src/bin/a.rs +++ b/examples/boot/application/stm32f7/src/bin/a.rs | |||
| @@ -7,11 +7,10 @@ use core::cell::RefCell; | |||
| 7 | use defmt_rtt::*; | 7 | use defmt_rtt::*; |
| 8 | use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterConfig}; | 8 | use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterConfig}; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_stm32::bind_interrupts; | ||
| 11 | use embassy_stm32::exti::{self, ExtiInput}; | 10 | use embassy_stm32::exti::{self, ExtiInput}; |
| 12 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 13 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 14 | use embassy_stm32::interrupt; | 13 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 15 | use embassy_sync::blocking_mutex::Mutex; | 14 | use embassy_sync::blocking_mutex::Mutex; |
| 16 | use embedded_storage::nor_flash::NorFlash; | 15 | use embedded_storage::nor_flash::NorFlash; |
| 17 | use panic_reset as _; | 16 | use panic_reset as _; |
diff --git a/examples/boot/application/stm32h7/src/bin/a.rs b/examples/boot/application/stm32h7/src/bin/a.rs index 00ac89564..ed2d5b89e 100644 --- a/examples/boot/application/stm32h7/src/bin/a.rs +++ b/examples/boot/application/stm32h7/src/bin/a.rs | |||
| @@ -7,11 +7,10 @@ use core::cell::RefCell; | |||
| 7 | use defmt_rtt::*; | 7 | use defmt_rtt::*; |
| 8 | use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterConfig}; | 8 | use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterConfig}; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_stm32::bind_interrupts; | ||
| 11 | use embassy_stm32::exti::{self, ExtiInput}; | 10 | use embassy_stm32::exti::{self, ExtiInput}; |
| 12 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 13 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 14 | use embassy_stm32::interrupt; | 13 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 15 | use embassy_sync::blocking_mutex::Mutex; | 14 | use embassy_sync::blocking_mutex::Mutex; |
| 16 | use embedded_storage::nor_flash::NorFlash; | 15 | use embedded_storage::nor_flash::NorFlash; |
| 17 | use panic_reset as _; | 16 | use panic_reset as _; |
diff --git a/examples/boot/application/stm32l0/src/bin/a.rs b/examples/boot/application/stm32l0/src/bin/a.rs index 6f21d9be0..3f9e6d24e 100644 --- a/examples/boot/application/stm32l0/src/bin/a.rs +++ b/examples/boot/application/stm32l0/src/bin/a.rs | |||
| @@ -6,11 +6,10 @@ use defmt_rtt::*; | |||
| 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; | 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; |
| 7 | use embassy_embedded_hal::adapter::BlockingAsync; | 7 | use embassy_embedded_hal::adapter::BlockingAsync; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::bind_interrupts; | ||
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | 9 | use embassy_stm32::exti::{self, ExtiInput}; |
| 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | 12 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 14 | use embassy_sync::mutex::Mutex; | 13 | use embassy_sync::mutex::Mutex; |
| 15 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
| 16 | use panic_reset as _; | 15 | use panic_reset as _; |
diff --git a/examples/boot/application/stm32l1/src/bin/a.rs b/examples/boot/application/stm32l1/src/bin/a.rs index 16f280776..b5432eb91 100644 --- a/examples/boot/application/stm32l1/src/bin/a.rs +++ b/examples/boot/application/stm32l1/src/bin/a.rs | |||
| @@ -6,11 +6,10 @@ use defmt_rtt::*; | |||
| 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; | 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; |
| 7 | use embassy_embedded_hal::adapter::BlockingAsync; | 7 | use embassy_embedded_hal::adapter::BlockingAsync; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::bind_interrupts; | ||
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | 9 | use embassy_stm32::exti::{self, ExtiInput}; |
| 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | 12 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 14 | use embassy_sync::mutex::Mutex; | 13 | use embassy_sync::mutex::Mutex; |
| 15 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
| 16 | use panic_reset as _; | 15 | use panic_reset as _; |
| @@ -31,15 +30,15 @@ async fn main(_spawner: Spawner) { | |||
| 31 | let flash = Flash::new_blocking(p.FLASH); | 30 | let flash = Flash::new_blocking(p.FLASH); |
| 32 | let flash = Mutex::new(BlockingAsync::new(flash)); | 31 | let flash = Mutex::new(BlockingAsync::new(flash)); |
| 33 | 32 | ||
| 34 | let mut button = ExtiInput::new(p.PB2, p.EXTI2, Pull::Up); | 33 | let mut button = ExtiInput::new( |
| 35 | 34 | p.PB2, | |
| 36 | let mut led = Output::new( | 35 | p.EXTI2, |
| 37 | p.PB5, | 36 | Pull::Up, |
| 38 | Level::Low, | ||
| 39 | Speed::Low, | ||
| 40 | Irqs::as_any::<interrupt::typelevel::EXTI2, exti::InterruptHandler<interrupt::typelevel::EXTI2>>(), | 37 | Irqs::as_any::<interrupt::typelevel::EXTI2, exti::InterruptHandler<interrupt::typelevel::EXTI2>>(), |
| 41 | ); | 38 | ); |
| 42 | 39 | ||
| 40 | let mut led = Output::new(p.PB5, Level::Low, Speed::Low); | ||
| 41 | |||
| 43 | led.set_high(); | 42 | led.set_high(); |
| 44 | 43 | ||
| 45 | let config = FirmwareUpdaterConfig::from_linkerfile(&flash, &flash); | 44 | let config = FirmwareUpdaterConfig::from_linkerfile(&flash, &flash); |
diff --git a/examples/boot/application/stm32l4/src/bin/a.rs b/examples/boot/application/stm32l4/src/bin/a.rs index 5e5d45193..349e57f94 100644 --- a/examples/boot/application/stm32l4/src/bin/a.rs +++ b/examples/boot/application/stm32l4/src/bin/a.rs | |||
| @@ -6,11 +6,10 @@ use defmt_rtt::*; | |||
| 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; | 6 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; |
| 7 | use embassy_embedded_hal::adapter::BlockingAsync; | 7 | use embassy_embedded_hal::adapter::BlockingAsync; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_stm32::bind_interrupts; | ||
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | 9 | use embassy_stm32::exti::{self, ExtiInput}; |
| 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | 12 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 14 | use embassy_sync::mutex::Mutex; | 13 | use embassy_sync::mutex::Mutex; |
| 15 | use panic_reset as _; | 14 | use panic_reset as _; |
| 16 | 15 | ||
diff --git a/examples/boot/application/stm32wl/src/bin/a.rs b/examples/boot/application/stm32wl/src/bin/a.rs index ad45c1262..285d57e41 100644 --- a/examples/boot/application/stm32wl/src/bin/a.rs +++ b/examples/boot/application/stm32wl/src/bin/a.rs | |||
| @@ -8,12 +8,10 @@ use defmt_rtt::*; | |||
| 8 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; | 8 | use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; |
| 9 | use embassy_embedded_hal::adapter::BlockingAsync; | 9 | use embassy_embedded_hal::adapter::BlockingAsync; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_stm32::SharedData; | ||
| 12 | use embassy_stm32::bind_interrupts; | ||
| 13 | use embassy_stm32::exti::{self, ExtiInput}; | 11 | use embassy_stm32::exti::{self, ExtiInput}; |
| 14 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 12 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 15 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 13 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 16 | use embassy_stm32::interrupt; | 14 | use embassy_stm32::{SharedData, bind_interrupts, interrupt}; |
| 17 | use embassy_sync::mutex::Mutex; | 15 | use embassy_sync::mutex::Mutex; |
| 18 | use panic_reset as _; | 16 | use panic_reset as _; |
| 19 | 17 | ||
| @@ -24,7 +22,7 @@ static APP_B: &[u8] = include_bytes!("../../b.bin"); | |||
| 24 | 22 | ||
| 25 | bind_interrupts!( | 23 | bind_interrupts!( |
| 26 | pub struct Irqs{ | 24 | pub struct Irqs{ |
| 27 | EXTEXTI0I2_3 => exti::InterruptHandler<interrupt::typelevel::EXTI0>; | 25 | EXTI0 => exti::InterruptHandler<interrupt::typelevel::EXTI0>; |
| 28 | }); | 26 | }); |
| 29 | 27 | ||
| 30 | #[unsafe(link_section = ".shared_data")] | 28 | #[unsafe(link_section = ".shared_data")] |
