From e322732fdba282f4150a186aed606b88714921fe Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Mon, 5 Aug 2024 15:13:11 +0200 Subject: [PATCH] Add H7 dual core to common and run fmt --- examples/stm32wl/src/bin/blinky.rs | 6 ++---- examples/stm32wl/src/bin/button.rs | 6 ++---- examples/stm32wl/src/bin/button_exti.rs | 3 ++- examples/stm32wl/src/bin/flash.rs | 3 ++- 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; use defmt::*; use embassy_executor::Spawner; -use embassy_stm32::{ - gpio::{Level, Output, Speed}, - SharedData, -}; +use embassy_stm32::gpio::{Level, Output, Speed}; +use embassy_stm32::SharedData; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; 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; use cortex_m_rt::entry; use defmt::*; -use embassy_stm32::{ - gpio::{Input, Level, Output, Pull, Speed}, - SharedData, -}; +use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; +use embassy_stm32::SharedData; use {defmt_rtt as _, panic_probe as _}; #[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; use defmt::*; use embassy_executor::Spawner; +use embassy_stm32::exti::ExtiInput; use embassy_stm32::gpio::Pull; -use embassy_stm32::{exti::ExtiInput, SharedData}; +use embassy_stm32::SharedData; use {defmt_rtt as _, panic_probe as _}; #[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; use defmt::{info, unwrap}; use embassy_executor::Spawner; -use embassy_stm32::{flash::Flash, SharedData}; +use embassy_stm32::flash::Flash; +use embassy_stm32::SharedData; use {defmt_rtt as _, panic_probe as _}; #[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 { #[allow(unused)] pub fn init_with_config(config: Config) -> embassy_stm32::Peripherals { - #[cfg(feature = "stm32wl55jc")] + #[cfg(any(feature = "stm32wl55jc", feature = "stm32h755zi"))] { // Not in shared memory, but we're not running the second core, so it's fine static SHARED_DATA: core::mem::MaybeUninit = core::mem::MaybeUninit::uninit(); embassy_stm32::init_primary(config, &SHARED_DATA) } - #[cfg(not(feature = "stm32wl55jc"))] + #[cfg(not(any(feature = "stm32wl55jc", feature = "stm32h755zi")))] embassy_stm32::init(config) }