diff options
Diffstat (limited to 'examples/boot')
| -rw-r--r-- | examples/boot/application/stm32f3/src/bin/a.rs | 16 | ||||
| -rw-r--r-- | examples/boot/application/stm32f7/src/bin/a.rs | 16 | ||||
| -rw-r--r-- | examples/boot/application/stm32h7/src/bin/a.rs | 16 | ||||
| -rw-r--r-- | examples/boot/application/stm32l0/src/bin/a.rs | 16 | ||||
| -rw-r--r-- | examples/boot/application/stm32l1/src/bin/a.rs | 16 | ||||
| -rw-r--r-- | examples/boot/application/stm32l4/src/bin/a.rs | 16 | ||||
| -rw-r--r-- | examples/boot/application/stm32wl/src/bin/a.rs | 16 |
7 files changed, 98 insertions, 14 deletions
diff --git a/examples/boot/application/stm32f3/src/bin/a.rs b/examples/boot/application/stm32f3/src/bin/a.rs index b608b2e01..e42e24885 100644 --- a/examples/boot/application/stm32f3/src/bin/a.rs +++ b/examples/boot/application/stm32f3/src/bin/a.rs | |||
| @@ -6,12 +6,19 @@ 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::exti::ExtiInput; | 9 | use embassy_stm32::bind_interrupts; |
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | ||
| 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | ||
| 12 | use embassy_sync::mutex::Mutex; | 14 | use embassy_sync::mutex::Mutex; |
| 13 | use panic_reset as _; | 15 | use panic_reset as _; |
| 14 | 16 | ||
| 17 | bind_interrupts!( | ||
| 18 | pub struct Irqs{ | ||
| 19 | EXTI15_10 => exti::InterruptHandler<interrupt::typelevel::EXTI15_10>; | ||
| 20 | }); | ||
| 21 | |||
| 15 | #[cfg(feature = "skip-include")] | 22 | #[cfg(feature = "skip-include")] |
| 16 | static APP_B: &[u8] = &[0, 1, 2, 3]; | 23 | static APP_B: &[u8] = &[0, 1, 2, 3]; |
| 17 | #[cfg(not(feature = "skip-include"))] | 24 | #[cfg(not(feature = "skip-include"))] |
| @@ -23,7 +30,12 @@ async fn main(_spawner: Spawner) { | |||
| 23 | let flash = Flash::new_blocking(p.FLASH); | 30 | let flash = Flash::new_blocking(p.FLASH); |
| 24 | let flash = Mutex::new(BlockingAsync::new(flash)); | 31 | let flash = Mutex::new(BlockingAsync::new(flash)); |
| 25 | 32 | ||
| 26 | let mut button = ExtiInput::new(p.PC13, p.EXTI13, Pull::Up); | 33 | let mut button = ExtiInput::new( |
| 34 | p.PC13, | ||
| 35 | p.EXTI13, | ||
| 36 | Pull::Up, | ||
| 37 | Irqs::as_any::<interrupt::typelevel::EXTI15_10, exti::InterruptHandler<interrupt::typelevel::EXTI15_10>>(), | ||
| 38 | ); | ||
| 27 | 39 | ||
| 28 | let mut led = Output::new(p.PA5, Level::Low, Speed::Low); | 40 | let mut led = Output::new(p.PA5, Level::Low, Speed::Low); |
| 29 | led.set_high(); | 41 | led.set_high(); |
diff --git a/examples/boot/application/stm32f7/src/bin/a.rs b/examples/boot/application/stm32f7/src/bin/a.rs index 172b4c235..5ec220c2e 100644 --- a/examples/boot/application/stm32f7/src/bin/a.rs +++ b/examples/boot/application/stm32f7/src/bin/a.rs | |||
| @@ -7,9 +7,11 @@ 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::exti::ExtiInput; | 10 | use embassy_stm32::bind_interrupts; |
| 11 | use embassy_stm32::exti::{self, ExtiInput}; | ||
| 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 12 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 13 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 14 | use embassy_stm32::interrupt; | ||
| 13 | use embassy_sync::blocking_mutex::Mutex; | 15 | use embassy_sync::blocking_mutex::Mutex; |
| 14 | use embedded_storage::nor_flash::NorFlash; | 16 | use embedded_storage::nor_flash::NorFlash; |
| 15 | use panic_reset as _; | 17 | use panic_reset as _; |
| @@ -19,13 +21,23 @@ static APP_B: &[u8] = &[0, 1, 2, 3]; | |||
| 19 | #[cfg(not(feature = "skip-include"))] | 21 | #[cfg(not(feature = "skip-include"))] |
| 20 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 22 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 21 | 23 | ||
| 24 | bind_interrupts!( | ||
| 25 | pub struct Irqs{ | ||
| 26 | EXTI15_10 => exti::InterruptHandler<interrupt::typelevel::EXTI15_10>; | ||
| 27 | }); | ||
| 28 | |||
| 22 | #[embassy_executor::main] | 29 | #[embassy_executor::main] |
| 23 | async fn main(_spawner: Spawner) { | 30 | async fn main(_spawner: Spawner) { |
| 24 | let p = embassy_stm32::init(Default::default()); | 31 | let p = embassy_stm32::init(Default::default()); |
| 25 | let flash = Flash::new_blocking(p.FLASH); | 32 | let flash = Flash::new_blocking(p.FLASH); |
| 26 | let flash = Mutex::new(RefCell::new(flash)); | 33 | let flash = Mutex::new(RefCell::new(flash)); |
| 27 | 34 | ||
| 28 | let mut button = ExtiInput::new(p.PC13, p.EXTI13, Pull::Down); | 35 | let mut button = ExtiInput::new( |
| 36 | p.PC13, | ||
| 37 | p.EXTI13, | ||
| 38 | Pull::Down, | ||
| 39 | Irqs::as_any::<interrupt::typelevel::EXTI15_10, exti::InterruptHandler<interrupt::typelevel::EXTI15_10>>(), | ||
| 40 | ); | ||
| 29 | 41 | ||
| 30 | let mut led = Output::new(p.PB7, Level::Low, Speed::Low); | 42 | let mut led = Output::new(p.PB7, Level::Low, Speed::Low); |
| 31 | led.set_high(); | 43 | led.set_high(); |
diff --git a/examples/boot/application/stm32h7/src/bin/a.rs b/examples/boot/application/stm32h7/src/bin/a.rs index c1b1a267a..00ac89564 100644 --- a/examples/boot/application/stm32h7/src/bin/a.rs +++ b/examples/boot/application/stm32h7/src/bin/a.rs | |||
| @@ -7,13 +7,20 @@ 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::exti::ExtiInput; | 10 | use embassy_stm32::bind_interrupts; |
| 11 | use embassy_stm32::exti::{self, ExtiInput}; | ||
| 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 12 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 13 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 14 | use embassy_stm32::interrupt; | ||
| 13 | use embassy_sync::blocking_mutex::Mutex; | 15 | use embassy_sync::blocking_mutex::Mutex; |
| 14 | use embedded_storage::nor_flash::NorFlash; | 16 | use embedded_storage::nor_flash::NorFlash; |
| 15 | use panic_reset as _; | 17 | use panic_reset as _; |
| 16 | 18 | ||
| 19 | bind_interrupts!( | ||
| 20 | pub struct Irqs{ | ||
| 21 | EXTI15_10 => exti::InterruptHandler<interrupt::typelevel::EXTI15_10>; | ||
| 22 | }); | ||
| 23 | |||
| 17 | #[cfg(feature = "skip-include")] | 24 | #[cfg(feature = "skip-include")] |
| 18 | static APP_B: &[u8] = &[0, 1, 2, 3]; | 25 | static APP_B: &[u8] = &[0, 1, 2, 3]; |
| 19 | #[cfg(not(feature = "skip-include"))] | 26 | #[cfg(not(feature = "skip-include"))] |
| @@ -25,7 +32,12 @@ async fn main(_spawner: Spawner) { | |||
| 25 | let flash = Flash::new_blocking(p.FLASH); | 32 | let flash = Flash::new_blocking(p.FLASH); |
| 26 | let flash = Mutex::new(RefCell::new(flash)); | 33 | let flash = Mutex::new(RefCell::new(flash)); |
| 27 | 34 | ||
| 28 | let mut button = ExtiInput::new(p.PC13, p.EXTI13, Pull::Down); | 35 | let mut button = ExtiInput::new( |
| 36 | p.PC13, | ||
| 37 | p.EXTI13, | ||
| 38 | Pull::Down, | ||
| 39 | Irqs::as_any::<interrupt::typelevel::EXTI15_10, exti::InterruptHandler<interrupt::typelevel::EXTI15_10>>(), | ||
| 40 | ); | ||
| 29 | 41 | ||
| 30 | let mut led = Output::new(p.PB14, Level::Low, Speed::Low); | 42 | let mut led = Output::new(p.PB14, Level::Low, Speed::Low); |
| 31 | led.set_high(); | 43 | led.set_high(); |
diff --git a/examples/boot/application/stm32l0/src/bin/a.rs b/examples/boot/application/stm32l0/src/bin/a.rs index dcc10e5c6..6f21d9be0 100644 --- a/examples/boot/application/stm32l0/src/bin/a.rs +++ b/examples/boot/application/stm32l0/src/bin/a.rs | |||
| @@ -6,13 +6,20 @@ 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::exti::ExtiInput; | 9 | use embassy_stm32::bind_interrupts; |
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | ||
| 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | ||
| 12 | use embassy_sync::mutex::Mutex; | 14 | use embassy_sync::mutex::Mutex; |
| 13 | use embassy_time::Timer; | 15 | use embassy_time::Timer; |
| 14 | use panic_reset as _; | 16 | use panic_reset as _; |
| 15 | 17 | ||
| 18 | bind_interrupts!( | ||
| 19 | pub struct Irqs{ | ||
| 20 | EXTI2_3 => exti::InterruptHandler<interrupt::typelevel::EXTI2_3>; | ||
| 21 | }); | ||
| 22 | |||
| 16 | #[cfg(feature = "skip-include")] | 23 | #[cfg(feature = "skip-include")] |
| 17 | static APP_B: &[u8] = &[0, 1, 2, 3]; | 24 | static APP_B: &[u8] = &[0, 1, 2, 3]; |
| 18 | #[cfg(not(feature = "skip-include"))] | 25 | #[cfg(not(feature = "skip-include"))] |
| @@ -24,7 +31,12 @@ async fn main(_spawner: Spawner) { | |||
| 24 | let flash = Flash::new_blocking(p.FLASH); | 31 | let flash = Flash::new_blocking(p.FLASH); |
| 25 | let flash = Mutex::new(BlockingAsync::new(flash)); | 32 | let flash = Mutex::new(BlockingAsync::new(flash)); |
| 26 | 33 | ||
| 27 | let mut button = ExtiInput::new(p.PB2, p.EXTI2, Pull::Up); | 34 | let mut button = ExtiInput::new( |
| 35 | p.PB2, | ||
| 36 | p.EXTI2, | ||
| 37 | Pull::Up, | ||
| 38 | Irqs::as_any::<interrupt::typelevel::EXTI2_3, exti::InterruptHandler<interrupt::typelevel::EXTI2_3>>(), | ||
| 39 | ); | ||
| 28 | 40 | ||
| 29 | let mut led = Output::new(p.PB5, Level::Low, Speed::Low); | 41 | let mut led = Output::new(p.PB5, Level::Low, Speed::Low); |
| 30 | 42 | ||
diff --git a/examples/boot/application/stm32l1/src/bin/a.rs b/examples/boot/application/stm32l1/src/bin/a.rs index dcc10e5c6..16f280776 100644 --- a/examples/boot/application/stm32l1/src/bin/a.rs +++ b/examples/boot/application/stm32l1/src/bin/a.rs | |||
| @@ -6,9 +6,11 @@ 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::exti::ExtiInput; | 9 | use embassy_stm32::bind_interrupts; |
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | ||
| 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | ||
| 12 | use embassy_sync::mutex::Mutex; | 14 | use embassy_sync::mutex::Mutex; |
| 13 | use embassy_time::Timer; | 15 | use embassy_time::Timer; |
| 14 | use panic_reset as _; | 16 | use panic_reset as _; |
| @@ -18,6 +20,11 @@ static APP_B: &[u8] = &[0, 1, 2, 3]; | |||
| 18 | #[cfg(not(feature = "skip-include"))] | 20 | #[cfg(not(feature = "skip-include"))] |
| 19 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 21 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 20 | 22 | ||
| 23 | bind_interrupts!( | ||
| 24 | pub struct Irqs{ | ||
| 25 | EXTI2 => exti::InterruptHandler<interrupt::typelevel::EXTI2>; | ||
| 26 | }); | ||
| 27 | |||
| 21 | #[embassy_executor::main] | 28 | #[embassy_executor::main] |
| 22 | async fn main(_spawner: Spawner) { | 29 | async fn main(_spawner: Spawner) { |
| 23 | let p = embassy_stm32::init(Default::default()); | 30 | let p = embassy_stm32::init(Default::default()); |
| @@ -26,7 +33,12 @@ async fn main(_spawner: Spawner) { | |||
| 26 | 33 | ||
| 27 | let mut button = ExtiInput::new(p.PB2, p.EXTI2, Pull::Up); | 34 | let mut button = ExtiInput::new(p.PB2, p.EXTI2, Pull::Up); |
| 28 | 35 | ||
| 29 | let mut led = Output::new(p.PB5, Level::Low, Speed::Low); | 36 | let mut led = Output::new( |
| 37 | p.PB5, | ||
| 38 | Level::Low, | ||
| 39 | Speed::Low, | ||
| 40 | Irqs::as_any::<interrupt::typelevel::EXTI2, exti::InterruptHandler<interrupt::typelevel::EXTI2>>(), | ||
| 41 | ); | ||
| 30 | 42 | ||
| 31 | led.set_high(); | 43 | led.set_high(); |
| 32 | 44 | ||
diff --git a/examples/boot/application/stm32l4/src/bin/a.rs b/examples/boot/application/stm32l4/src/bin/a.rs index 7f8015c04..5e5d45193 100644 --- a/examples/boot/application/stm32l4/src/bin/a.rs +++ b/examples/boot/application/stm32l4/src/bin/a.rs | |||
| @@ -6,9 +6,11 @@ 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::exti::ExtiInput; | 9 | use embassy_stm32::bind_interrupts; |
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | ||
| 10 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 11 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | ||
| 12 | use embassy_sync::mutex::Mutex; | 14 | use embassy_sync::mutex::Mutex; |
| 13 | use panic_reset as _; | 15 | use panic_reset as _; |
| 14 | 16 | ||
| @@ -17,13 +19,23 @@ static APP_B: &[u8] = &[0, 1, 2, 3]; | |||
| 17 | #[cfg(not(feature = "skip-include"))] | 19 | #[cfg(not(feature = "skip-include"))] |
| 18 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 20 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 19 | 21 | ||
| 22 | bind_interrupts!( | ||
| 23 | pub struct Irqs{ | ||
| 24 | EXTI15_10 => exti::InterruptHandler<interrupt::typelevel::EXTI15_10>; | ||
| 25 | }); | ||
| 26 | |||
| 20 | #[embassy_executor::main] | 27 | #[embassy_executor::main] |
| 21 | async fn main(_spawner: Spawner) { | 28 | async fn main(_spawner: Spawner) { |
| 22 | let p = embassy_stm32::init(Default::default()); | 29 | let p = embassy_stm32::init(Default::default()); |
| 23 | let flash = Flash::new_blocking(p.FLASH); | 30 | let flash = Flash::new_blocking(p.FLASH); |
| 24 | let flash = Mutex::new(BlockingAsync::new(flash)); | 31 | let flash = Mutex::new(BlockingAsync::new(flash)); |
| 25 | 32 | ||
| 26 | let mut button = ExtiInput::new(p.PC13, p.EXTI13, Pull::Up); | 33 | let mut button = ExtiInput::new( |
| 34 | p.PC13, | ||
| 35 | p.EXTI13, | ||
| 36 | Pull::Up, | ||
| 37 | Irqs::as_any::<interrupt::typelevel::EXTI15_10, exti::InterruptHandler<interrupt::typelevel::EXTI15_10>>(), | ||
| 38 | ); | ||
| 27 | 39 | ||
| 28 | let mut led = Output::new(p.PB14, Level::Low, Speed::Low); | 40 | let mut led = Output::new(p.PB14, Level::Low, Speed::Low); |
| 29 | led.set_high(); | 41 | led.set_high(); |
diff --git a/examples/boot/application/stm32wl/src/bin/a.rs b/examples/boot/application/stm32wl/src/bin/a.rs index 3f381fd80..ad45c1262 100644 --- a/examples/boot/application/stm32wl/src/bin/a.rs +++ b/examples/boot/application/stm32wl/src/bin/a.rs | |||
| @@ -9,9 +9,11 @@ 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; | 11 | use embassy_stm32::SharedData; |
| 12 | use embassy_stm32::exti::ExtiInput; | 12 | use embassy_stm32::bind_interrupts; |
| 13 | use embassy_stm32::exti::{self, ExtiInput}; | ||
| 13 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; | 14 | use embassy_stm32::flash::{Flash, WRITE_SIZE}; |
| 14 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 15 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 16 | use embassy_stm32::interrupt; | ||
| 15 | use embassy_sync::mutex::Mutex; | 17 | use embassy_sync::mutex::Mutex; |
| 16 | use panic_reset as _; | 18 | use panic_reset as _; |
| 17 | 19 | ||
| @@ -20,6 +22,11 @@ static APP_B: &[u8] = &[0, 1, 2, 3]; | |||
| 20 | #[cfg(not(feature = "skip-include"))] | 22 | #[cfg(not(feature = "skip-include"))] |
| 21 | static APP_B: &[u8] = include_bytes!("../../b.bin"); | 23 | static APP_B: &[u8] = include_bytes!("../../b.bin"); |
| 22 | 24 | ||
| 25 | bind_interrupts!( | ||
| 26 | pub struct Irqs{ | ||
| 27 | EXTEXTI0I2_3 => exti::InterruptHandler<interrupt::typelevel::EXTI0>; | ||
| 28 | }); | ||
| 29 | |||
| 23 | #[unsafe(link_section = ".shared_data")] | 30 | #[unsafe(link_section = ".shared_data")] |
| 24 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); | 31 | static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::uninit(); |
| 25 | 32 | ||
| @@ -29,7 +36,12 @@ async fn main(_spawner: Spawner) { | |||
| 29 | let flash = Flash::new_blocking(p.FLASH); | 36 | let flash = Flash::new_blocking(p.FLASH); |
| 30 | let flash = Mutex::new(BlockingAsync::new(flash)); | 37 | let flash = Mutex::new(BlockingAsync::new(flash)); |
| 31 | 38 | ||
| 32 | let mut button = ExtiInput::new(p.PA0, p.EXTI0, Pull::Up); | 39 | let mut button = ExtiInput::new( |
| 40 | p.PA0, | ||
| 41 | p.EXTI0, | ||
| 42 | Pull::Up, | ||
| 43 | Irqs::as_any::<interrupt::typelevel::EXTI0, exti::InterruptHandler<interrupt::typelevel::EXTI0>>(), | ||
| 44 | ); | ||
| 33 | 45 | ||
| 34 | let mut led = Output::new(p.PB9, Level::Low, Speed::Low); | 46 | let mut led = Output::new(p.PB9, Level::Low, Speed::Low); |
| 35 | led.set_high(); | 47 | led.set_high(); |
