diff options
| author | Dion Dokter <[email protected]> | 2024-08-05 15:13:11 +0200 |
|---|---|---|
| committer | Dion Dokter <[email protected]> | 2024-08-05 15:13:11 +0200 |
| commit | e322732fdba282f4150a186aed606b88714921fe (patch) | |
| tree | 3ca0da1c1ffaf6da9dd158479bf0d5bfa427d357 | |
| parent | 3cd20814501d03852a3c30facbd204dffcf048db (diff) | |
Add H7 dual core to common and run fmt
| -rw-r--r-- | examples/stm32wl/src/bin/blinky.rs | 6 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/button.rs | 6 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/button_exti.rs | 3 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/flash.rs | 3 | ||||
| -rw-r--r-- | tests/stm32/src/common.rs | 4 |
5 files changed, 10 insertions, 12 deletions
diff --git a/examples/stm32wl/src/bin/blinky.rs b/examples/stm32wl/src/bin/blinky.rs index 048ce9175..ce7d0ec58 100644 --- a/examples/stm32wl/src/bin/blinky.rs +++ b/examples/stm32wl/src/bin/blinky.rs | |||
| @@ -5,10 +5,8 @@ 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::{ | 8 | use embassy_stm32::gpio::{Level, Output, Speed}; |
| 9 | gpio::{Level, Output, Speed}, | 9 | use embassy_stm32::SharedData; |
| 10 | SharedData, | ||
| 11 | }; | ||
| 12 | use embassy_time::Timer; | 10 | use embassy_time::Timer; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 12 | ||
diff --git a/examples/stm32wl/src/bin/button.rs b/examples/stm32wl/src/bin/button.rs index e7f44b437..8b5204479 100644 --- a/examples/stm32wl/src/bin/button.rs +++ b/examples/stm32wl/src/bin/button.rs | |||
| @@ -5,10 +5,8 @@ use core::mem::MaybeUninit; | |||
| 5 | 5 | ||
| 6 | use cortex_m_rt::entry; | 6 | use cortex_m_rt::entry; |
| 7 | use defmt::*; | 7 | use defmt::*; |
| 8 | use embassy_stm32::{ | 8 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; |
| 9 | gpio::{Input, Level, Output, Pull, Speed}, | 9 | use embassy_stm32::SharedData; |
| 10 | SharedData, | ||
| 11 | }; | ||
| 12 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 11 | ||
| 14 | #[link_section = ".shared_data"] | 12 | #[link_section = ".shared_data"] |
diff --git a/examples/stm32wl/src/bin/button_exti.rs b/examples/stm32wl/src/bin/button_exti.rs index d1e443bf8..8dd1a6a5e 100644 --- a/examples/stm32wl/src/bin/button_exti.rs +++ b/examples/stm32wl/src/bin/button_exti.rs | |||
| @@ -5,8 +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::exti::ExtiInput; | ||
| 8 | use embassy_stm32::gpio::Pull; | 9 | use embassy_stm32::gpio::Pull; |
| 9 | use embassy_stm32::{exti::ExtiInput, SharedData}; | 10 | use embassy_stm32::SharedData; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 12 | ||
| 12 | #[link_section = ".shared_data"] | 13 | #[link_section = ".shared_data"] |
diff --git a/examples/stm32wl/src/bin/flash.rs b/examples/stm32wl/src/bin/flash.rs index e7d90dc19..147f5d293 100644 --- a/examples/stm32wl/src/bin/flash.rs +++ b/examples/stm32wl/src/bin/flash.rs | |||
| @@ -5,7 +5,8 @@ use core::mem::MaybeUninit; | |||
| 5 | 5 | ||
| 6 | use defmt::{info, unwrap}; | 6 | use defmt::{info, unwrap}; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_stm32::{flash::Flash, SharedData}; | 8 | use embassy_stm32::flash::Flash; |
| 9 | use embassy_stm32::SharedData; | ||
| 9 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 10 | 11 | ||
| 11 | #[link_section = ".shared_data"] | 12 | #[link_section = ".shared_data"] |
diff --git a/tests/stm32/src/common.rs b/tests/stm32/src/common.rs index 649eac6f6..935a41ed2 100644 --- a/tests/stm32/src/common.rs +++ b/tests/stm32/src/common.rs | |||
| @@ -707,13 +707,13 @@ pub fn init() -> embassy_stm32::Peripherals { | |||
| 707 | 707 | ||
| 708 | #[allow(unused)] | 708 | #[allow(unused)] |
| 709 | pub fn init_with_config(config: Config) -> embassy_stm32::Peripherals { | 709 | pub fn init_with_config(config: Config) -> embassy_stm32::Peripherals { |
| 710 | #[cfg(feature = "stm32wl55jc")] | 710 | #[cfg(any(feature = "stm32wl55jc", feature = "stm32h755zi"))] |
| 711 | { | 711 | { |
| 712 | // Not in shared memory, but we're not running the second core, so it's fine | 712 | // Not in shared memory, but we're not running the second core, so it's fine |
| 713 | static SHARED_DATA: core::mem::MaybeUninit<embassy_stm32::SharedData> = core::mem::MaybeUninit::uninit(); | 713 | static SHARED_DATA: core::mem::MaybeUninit<embassy_stm32::SharedData> = core::mem::MaybeUninit::uninit(); |
| 714 | embassy_stm32::init_primary(config, &SHARED_DATA) | 714 | embassy_stm32::init_primary(config, &SHARED_DATA) |
| 715 | } | 715 | } |
| 716 | 716 | ||
| 717 | #[cfg(not(feature = "stm32wl55jc"))] | 717 | #[cfg(not(any(feature = "stm32wl55jc", feature = "stm32h755zi")))] |
| 718 | embassy_stm32::init(config) | 718 | embassy_stm32::init(config) |
| 719 | } | 719 | } |
