From 88e29608ed5425f5dbc3edf56acff1654d587a5e Mon Sep 17 00:00:00 2001 From: Eli Orona Date: Tue, 20 Feb 2024 17:59:51 -0800 Subject: [PATCH] Rust fmt --- embassy-stm32/build.rs | 6 +----- embassy-stm32/src/rcc/mod.rs | 2 +- examples/stm32f334/src/bin/pwm.rs | 4 +++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index 2ffbadfc3..a0b74c0b9 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs @@ -510,11 +510,7 @@ fn main() { let field_name = format_ident!("{}", field_name); let enum_name = format_ident!("{}", enum_name); - rcc_cfgr_regs.insert(( - fieldset_name.clone(), - field_name.clone(), - enum_name.clone(), - )); + rcc_cfgr_regs.insert((fieldset_name.clone(), field_name.clone(), enum_name.clone())); let match_arms: TokenStream = enumm .variants diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index f71211925..24516d426 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs @@ -31,9 +31,9 @@ mod _version; pub use _version::*; -pub use crate::_generated::Clocks; #[cfg(clock_mux)] pub use crate::_generated::ClockMux; +pub use crate::_generated::Clocks; #[cfg(feature = "low-power")] /// Must be written within a critical section diff --git a/examples/stm32f334/src/bin/pwm.rs b/examples/stm32f334/src/bin/pwm.rs index 24606b9b6..cf5eb7b26 100644 --- a/examples/stm32f334/src/bin/pwm.rs +++ b/examples/stm32f334/src/bin/pwm.rs @@ -27,8 +27,10 @@ async fn main(_spawner: Spawner) { config.rcc.ahb_pre = AHBPrescaler::DIV1; config.rcc.apb1_pre = APBPrescaler::DIV2; config.rcc.apb2_pre = APBPrescaler::DIV1; + + // TODO: The two lines here do the same thing config.rcc.hrtim = HrtimClockSource::PllClk; - config.rcc.mux.hrtim1sw = Some(embassy_stm32::pac::rcc::vals::Timsw::PLL1_P); // TODO: The two lines here do the same thing + config.rcc.mux.hrtim1sw = Some(embassy_stm32::pac::rcc::vals::Timsw::PLL1_P); } let p = embassy_stm32::init(config);