diff options
| author | WillaWillNot <[email protected]> | 2025-11-21 20:35:54 -0500 |
|---|---|---|
| committer | WillaWillNot <[email protected]> | 2025-11-21 20:44:07 -0500 |
| commit | 54d57bc72f0e2b3eef0fa92d0b730ed6efd7bcaa (patch) | |
| tree | 9e70765685114955ce4043a65acb0c09c022aec9 /examples | |
| parent | a5f7764eb4f01a0668cbd3b534cde486b97f5ba4 (diff) | |
Fixed broken examples/formatting reported by CI
Diffstat (limited to 'examples')
33 files changed, 49 insertions, 80 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")] |
diff --git a/examples/stm32c0/src/bin/button_exti.rs b/examples/stm32c0/src/bin/button_exti.rs index dbc9e2f50..52fdc39c5 100644 --- a/examples/stm32c0/src/bin/button_exti.rs +++ b/examples/stm32c0/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32f0/src/bin/button_controlled_blink.rs b/examples/stm32f0/src/bin/button_controlled_blink.rs index f57d5d200..f9f636bad 100644 --- a/examples/stm32f0/src/bin/button_controlled_blink.rs +++ b/examples/stm32f0/src/bin/button_controlled_blink.rs | |||
| @@ -7,11 +7,9 @@ use core::sync::atomic::{AtomicU32, Ordering}; | |||
| 7 | 7 | ||
| 8 | use defmt::info; | 8 | use defmt::info; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_stm32::Peri; | ||
| 11 | use embassy_stm32::bind_interrupts; | ||
| 12 | use embassy_stm32::exti::{self, ExtiInput}; | 10 | use embassy_stm32::exti::{self, ExtiInput}; |
| 13 | use embassy_stm32::gpio::{AnyPin, Level, Output, Pull, Speed}; | 11 | use embassy_stm32::gpio::{AnyPin, Level, Output, Pull, Speed}; |
| 14 | use embassy_stm32::interrupt; | 12 | use embassy_stm32::{Peri, bind_interrupts, interrupt}; |
| 15 | use embassy_time::Timer; | 13 | use embassy_time::Timer; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 14 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 15 | ||
diff --git a/examples/stm32f0/src/bin/button_exti.rs b/examples/stm32f0/src/bin/button_exti.rs index 67ea19215..e91010514 100644 --- a/examples/stm32f0/src/bin/button_exti.rs +++ b/examples/stm32f0/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32f3/src/bin/button_events.rs b/examples/stm32f3/src/bin/button_events.rs index 78c6592ee..e52622d55 100644 --- a/examples/stm32f3/src/bin/button_events.rs +++ b/examples/stm32f3/src/bin/button_events.rs | |||
| @@ -11,10 +11,9 @@ | |||
| 11 | 11 | ||
| 12 | use defmt::*; | 12 | use defmt::*; |
| 13 | use embassy_executor::Spawner; | 13 | use embassy_executor::Spawner; |
| 14 | use embassy_stm32::bind_interrupts; | ||
| 15 | use embassy_stm32::exti::{self, ExtiInput}; | 14 | use embassy_stm32::exti::{self, ExtiInput}; |
| 16 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 15 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 17 | use embassy_stm32::interrupt; | 16 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 18 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; | 17 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; |
| 19 | use embassy_sync::channel::Channel; | 18 | use embassy_sync::channel::Channel; |
| 20 | use embassy_time::{Duration, Timer, with_timeout}; | 19 | use embassy_time::{Duration, Timer, with_timeout}; |
diff --git a/examples/stm32f3/src/bin/button_exti.rs b/examples/stm32f3/src/bin/button_exti.rs index d6d613447..4a75e031c 100644 --- a/examples/stm32f3/src/bin/button_exti.rs +++ b/examples/stm32f3/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32f4/src/bin/button_exti.rs b/examples/stm32f4/src/bin/button_exti.rs index 77831224b..93560ed06 100644 --- a/examples/stm32f4/src/bin/button_exti.rs +++ b/examples/stm32f4/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32f4/src/bin/eth_w5500.rs b/examples/stm32f4/src/bin/eth_w5500.rs index f7d2ce7de..f59f1d3b5 100644 --- a/examples/stm32f4/src/bin/eth_w5500.rs +++ b/examples/stm32f4/src/bin/eth_w5500.rs | |||
| @@ -7,16 +7,14 @@ use embassy_net::tcp::TcpSocket; | |||
| 7 | use embassy_net::{Ipv4Address, StackResources}; | 7 | use embassy_net::{Ipv4Address, StackResources}; |
| 8 | use embassy_net_wiznet::chip::W5500; | 8 | use embassy_net_wiznet::chip::W5500; |
| 9 | use embassy_net_wiznet::{Device, Runner, State}; | 9 | use embassy_net_wiznet::{Device, Runner, State}; |
| 10 | use embassy_stm32::bind_interrupts; | ||
| 11 | use embassy_stm32::exti::{self, ExtiInput}; | 10 | use embassy_stm32::exti::{self, ExtiInput}; |
| 12 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 11 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 13 | use embassy_stm32::interrupt; | ||
| 14 | use embassy_stm32::mode::Async; | 12 | use embassy_stm32::mode::Async; |
| 15 | use embassy_stm32::rng::Rng; | 13 | use embassy_stm32::rng::Rng; |
| 16 | use embassy_stm32::spi::Spi; | 14 | use embassy_stm32::spi::Spi; |
| 17 | use embassy_stm32::spi::mode::Master; | 15 | use embassy_stm32::spi::mode::Master; |
| 18 | use embassy_stm32::time::Hertz; | 16 | use embassy_stm32::time::Hertz; |
| 19 | use embassy_stm32::{Config, bind_interrupts, peripherals, rng, spi}; | 17 | use embassy_stm32::{Config, bind_interrupts, interrupt, peripherals, rng, spi}; |
| 20 | use embassy_time::{Delay, Timer}; | 18 | use embassy_time::{Delay, Timer}; |
| 21 | use embedded_hal_bus::spi::ExclusiveDevice; | 19 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 22 | use embedded_io_async::Write; | 20 | use embedded_io_async::Write; |
diff --git a/examples/stm32f4/src/bin/usb_hid_keyboard.rs b/examples/stm32f4/src/bin/usb_hid_keyboard.rs index 60922c2e8..b5a7e86e4 100644 --- a/examples/stm32f4/src/bin/usb_hid_keyboard.rs +++ b/examples/stm32f4/src/bin/usb_hid_keyboard.rs | |||
| @@ -6,13 +6,11 @@ use core::sync::atomic::{AtomicBool, AtomicU8, Ordering}; | |||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_futures::join::join; | 8 | use embassy_futures::join::join; |
| 9 | use embassy_stm32::bind_interrupts; | ||
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | 9 | use embassy_stm32::exti::{self, ExtiInput}; |
| 11 | use embassy_stm32::gpio::Pull; | 10 | use embassy_stm32::gpio::Pull; |
| 12 | use embassy_stm32::interrupt; | ||
| 13 | use embassy_stm32::time::Hertz; | 11 | use embassy_stm32::time::Hertz; |
| 14 | use embassy_stm32::usb::Driver; | 12 | use embassy_stm32::usb::Driver; |
| 15 | use embassy_stm32::{Config, bind_interrupts, peripherals, usb}; | 13 | use embassy_stm32::{Config, bind_interrupts, interrupt, peripherals, usb}; |
| 16 | use embassy_usb::class::hid::{ | 14 | use embassy_usb::class::hid::{ |
| 17 | HidBootProtocol, HidProtocolMode, HidReaderWriter, HidSubclass, ReportId, RequestHandler, State, | 15 | HidBootProtocol, HidProtocolMode, HidReaderWriter, HidSubclass, ReportId, RequestHandler, State, |
| 18 | }; | 16 | }; |
diff --git a/examples/stm32f7/src/bin/button_exti.rs b/examples/stm32f7/src/bin/button_exti.rs index 77831224b..93560ed06 100644 --- a/examples/stm32f7/src/bin/button_exti.rs +++ b/examples/stm32f7/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32g0/src/bin/button_exti.rs b/examples/stm32g0/src/bin/button_exti.rs index dbc9e2f50..52fdc39c5 100644 --- a/examples/stm32g0/src/bin/button_exti.rs +++ b/examples/stm32g0/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32g4/src/bin/button_exti.rs b/examples/stm32g4/src/bin/button_exti.rs index 77831224b..93560ed06 100644 --- a/examples/stm32g4/src/bin/button_exti.rs +++ b/examples/stm32g4/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32h5/src/bin/button_exti.rs b/examples/stm32h5/src/bin/button_exti.rs index f49f0ff1c..70dee04be 100644 --- a/examples/stm32h5/src/bin/button_exti.rs +++ b/examples/stm32h5/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32h7/src/bin/button_exti.rs b/examples/stm32h7/src/bin/button_exti.rs index 77831224b..93560ed06 100644 --- a/examples/stm32h7/src/bin/button_exti.rs +++ b/examples/stm32h7/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32h7rs/src/bin/button_exti.rs b/examples/stm32h7rs/src/bin/button_exti.rs index d4cf36fcc..29159a3b3 100644 --- a/examples/stm32h7rs/src/bin/button_exti.rs +++ b/examples/stm32h7rs/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32l0/src/bin/button_exti.rs b/examples/stm32l0/src/bin/button_exti.rs index afdeb14af..043261347 100644 --- a/examples/stm32l0/src/bin/button_exti.rs +++ b/examples/stm32l0/src/bin/button_exti.rs | |||
| @@ -3,11 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::Config; | ||
| 7 | use embassy_stm32::bind_interrupts; | ||
| 8 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 9 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 10 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{Config, bind_interrupts, interrupt}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 10 | ||
| 13 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32l4/src/bin/button_exti.rs b/examples/stm32l4/src/bin/button_exti.rs index 4d03671c0..82479eb24 100644 --- a/examples/stm32l4/src/bin/button_exti.rs +++ b/examples/stm32l4/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs index 0dbf515cf..e079f22c7 100644 --- a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs +++ b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs | |||
| @@ -24,6 +24,7 @@ use embassy_futures::yield_now; | |||
| 24 | use embassy_net::tcp::TcpSocket; | 24 | use embassy_net::tcp::TcpSocket; |
| 25 | use embassy_net::{Ipv4Address, Ipv4Cidr, Stack, StackResources, StaticConfigV4}; | 25 | use embassy_net::{Ipv4Address, Ipv4Cidr, Stack, StackResources, StaticConfigV4}; |
| 26 | use embassy_net_adin1110::{ADIN1110, Device, Runner}; | 26 | use embassy_net_adin1110::{ADIN1110, Device, Runner}; |
| 27 | use embassy_stm32::exti::ExtiInput; | ||
| 27 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; | 28 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; |
| 28 | use embassy_stm32::i2c::{self, Config as I2C_Config, I2c}; | 29 | use embassy_stm32::i2c::{self, Config as I2C_Config, I2c}; |
| 29 | use embassy_stm32::mode::Async; | 30 | use embassy_stm32::mode::Async; |
| @@ -31,7 +32,7 @@ use embassy_stm32::rng::{self, Rng}; | |||
| 31 | use embassy_stm32::spi::mode::Master; | 32 | use embassy_stm32::spi::mode::Master; |
| 32 | use embassy_stm32::spi::{Config as SPI_Config, Spi}; | 33 | use embassy_stm32::spi::{Config as SPI_Config, Spi}; |
| 33 | use embassy_stm32::time::Hertz; | 34 | use embassy_stm32::time::Hertz; |
| 34 | use embassy_stm32::{bind_interrupts, exti, pac, peripherals}; | 35 | use embassy_stm32::{bind_interrupts, exti, interrupt, pac, peripherals}; |
| 35 | use embassy_time::{Delay, Duration, Ticker, Timer}; | 36 | use embassy_time::{Delay, Duration, Ticker, Timer}; |
| 36 | use embedded_hal_async::i2c::I2c as I2cBus; | 37 | use embedded_hal_async::i2c::I2c as I2cBus; |
| 37 | use embedded_hal_bus::spi::ExclusiveDevice; | 38 | use embedded_hal_bus::spi::ExclusiveDevice; |
| @@ -45,6 +46,7 @@ bind_interrupts!(struct Irqs { | |||
| 45 | I2C3_EV => i2c::EventInterruptHandler<peripherals::I2C3>; | 46 | I2C3_EV => i2c::EventInterruptHandler<peripherals::I2C3>; |
| 46 | I2C3_ER => i2c::ErrorInterruptHandler<peripherals::I2C3>; | 47 | I2C3_ER => i2c::ErrorInterruptHandler<peripherals::I2C3>; |
| 47 | RNG => rng::InterruptHandler<peripherals::RNG>; | 48 | RNG => rng::InterruptHandler<peripherals::RNG>; |
| 49 | EXTI15_10 => exti::InterruptHandler<interrupt::typelevel::EXTI15_10>; | ||
| 48 | }); | 50 | }); |
| 49 | 51 | ||
| 50 | // Basic settings | 52 | // Basic settings |
| @@ -125,7 +127,12 @@ async fn main(spawner: Spawner) { | |||
| 125 | let spe_cfg1 = Input::new(dp.PC9, Pull::None); | 127 | let spe_cfg1 = Input::new(dp.PC9, Pull::None); |
| 126 | let _spe_ts_capt = Output::new(dp.PC6, Level::Low, Speed::Low); | 128 | let _spe_ts_capt = Output::new(dp.PC6, Level::Low, Speed::Low); |
| 127 | 129 | ||
| 128 | let spe_int = exti::ExtiInput::new(dp.PB11, dp.EXTI11, Pull::None); | 130 | let spe_int = ExtiInput::new( |
| 131 | dp.PB11, | ||
| 132 | dp.EXTI11, | ||
| 133 | Pull::None, | ||
| 134 | Irqs::as_any::<interrupt::typelevel::EXTI15_10, exti::InterruptHandler<interrupt::typelevel::EXTI15_10>>(), | ||
| 135 | ); | ||
| 129 | 136 | ||
| 130 | let spe_spi_cs_n = Output::new(dp.PB12, Level::High, Speed::High); | 137 | let spe_spi_cs_n = Output::new(dp.PB12, Level::High, Speed::High); |
| 131 | let spe_spi_sclk = dp.PB13; | 138 | let spe_spi_sclk = dp.PB13; |
diff --git a/examples/stm32l4/src/bin/spi_dma.rs b/examples/stm32l4/src/bin/spi_dma.rs index 946a759b1..970a0c608 100644 --- a/examples/stm32l4/src/bin/spi_dma.rs +++ b/examples/stm32l4/src/bin/spi_dma.rs | |||
| @@ -34,8 +34,8 @@ async fn main(_spawner: Spawner) { | |||
| 34 | info!("waiting for ready"); | 34 | info!("waiting for ready"); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | let write = [0x0A; 10]; | 37 | let write = [0x0Au8; 10]; |
| 38 | let mut read = [0; 10]; | 38 | let mut read = [0u8; 10]; |
| 39 | cs.set_low(); | 39 | cs.set_low(); |
| 40 | spi.transfer(&mut read, &write).await.ok(); | 40 | spi.transfer(&mut read, &write).await.ok(); |
| 41 | cs.set_high(); | 41 | cs.set_high(); |
diff --git a/examples/stm32l5/src/bin/button_exti.rs b/examples/stm32l5/src/bin/button_exti.rs index 02e2013c9..41412b00f 100644 --- a/examples/stm32l5/src/bin/button_exti.rs +++ b/examples/stm32l5/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32n6/src/bin/blinky.rs b/examples/stm32n6/src/bin/blinky.rs index c72e45628..764b8d6ef 100644 --- a/examples/stm32n6/src/bin/blinky.rs +++ b/examples/stm32n6/src/bin/blinky.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; | 7 | use embassy_stm32::gpio::{Level, Output, Pull, Speed}; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use embassy_time::Timer; | 9 | use embassy_time::Timer; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 11 | ||
diff --git a/examples/stm32u0/src/bin/button_exti.rs b/examples/stm32u0/src/bin/button_exti.rs index dbc9e2f50..52fdc39c5 100644 --- a/examples/stm32u0/src/bin/button_exti.rs +++ b/examples/stm32u0/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32wb/src/bin/button_exti.rs b/examples/stm32wb/src/bin/button_exti.rs index 2736b98f1..e2698450a 100644 --- a/examples/stm32wb/src/bin/button_exti.rs +++ b/examples/stm32wb/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32wba/src/bin/button_exti.rs b/examples/stm32wba/src/bin/button_exti.rs index d4cf36fcc..29159a3b3 100644 --- a/examples/stm32wba/src/bin/button_exti.rs +++ b/examples/stm32wba/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32wba6/src/bin/button_exti.rs b/examples/stm32wba6/src/bin/button_exti.rs index d4cf36fcc..29159a3b3 100644 --- a/examples/stm32wba6/src/bin/button_exti.rs +++ b/examples/stm32wba6/src/bin/button_exti.rs | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_stm32::bind_interrupts; | ||
| 7 | use embassy_stm32::exti::{self, ExtiInput}; | 6 | use embassy_stm32::exti::{self, ExtiInput}; |
| 8 | use embassy_stm32::gpio::Pull; | 7 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::interrupt; | 8 | use embassy_stm32::{bind_interrupts, interrupt}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 9 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 10 | ||
| 12 | bind_interrupts!( | 11 | bind_interrupts!( |
diff --git a/examples/stm32wl/src/bin/button_exti.rs b/examples/stm32wl/src/bin/button_exti.rs index 183f93f2f..c22de0322 100644 --- a/examples/stm32wl/src/bin/button_exti.rs +++ b/examples/stm32wl/src/bin/button_exti.rs | |||
| @@ -5,11 +5,9 @@ use core::mem::MaybeUninit; | |||
| 5 | 5 | ||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_stm32::SharedData; | ||
| 9 | use embassy_stm32::bind_interrupts; | ||
| 10 | use embassy_stm32::exti::{self, ExtiInput}; | 8 | use embassy_stm32::exti::{self, ExtiInput}; |
| 11 | use embassy_stm32::gpio::Pull; | 9 | use embassy_stm32::gpio::Pull; |
| 12 | use embassy_stm32::interrupt; | 10 | use embassy_stm32::{SharedData, bind_interrupts, interrupt}; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 12 | ||
| 15 | bind_interrupts!( | 13 | bind_interrupts!( |
diff --git a/examples/stm32wle5/src/bin/button_exti.rs b/examples/stm32wle5/src/bin/button_exti.rs index 196afa330..538801990 100644 --- a/examples/stm32wle5/src/bin/button_exti.rs +++ b/examples/stm32wle5/src/bin/button_exti.rs | |||
| @@ -5,11 +5,9 @@ use defmt::*; | |||
| 5 | #[cfg(feature = "defmt-rtt")] | 5 | #[cfg(feature = "defmt-rtt")] |
| 6 | use defmt_rtt as _; | 6 | use defmt_rtt as _; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_stm32::bind_interrupts; | ||
| 9 | use embassy_stm32::exti::{self, ExtiInput}; | 8 | use embassy_stm32::exti::{self, ExtiInput}; |
| 10 | use embassy_stm32::gpio::Pull; | 9 | use embassy_stm32::gpio::Pull; |
| 11 | use embassy_stm32::interrupt; | 10 | use embassy_stm32::{bind_interrupts, interrupt, low_power}; |
| 12 | use embassy_stm32::low_power; | ||
| 13 | use panic_probe as _; | 11 | use panic_probe as _; |
| 14 | use static_cell::StaticCell; | 12 | use static_cell::StaticCell; |
| 15 | 13 | ||
