From 95056958300d92b34d5f8f77c7429894efbc0fa1 Mon Sep 17 00:00:00 2001 From: Eli Orona Date: Tue, 20 Feb 2024 17:55:05 -0800 Subject: [PATCH] Move compile test to the STM32F334 example. --- examples/stm32f3/src/bin/usart_dma.rs | 4 +--- examples/stm32f334/src/bin/pwm.rs | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/stm32f3/src/bin/usart_dma.rs b/examples/stm32f3/src/bin/usart_dma.rs index 7dc905adc..5234e53b9 100644 --- a/examples/stm32f3/src/bin/usart_dma.rs +++ b/examples/stm32f3/src/bin/usart_dma.rs @@ -17,9 +17,7 @@ bind_interrupts!(struct Irqs { #[embassy_executor::main] async fn main(_spawner: Spawner) { - let mut init_config = embassy_stm32::Config::default(); - init_config.rcc.cfgr3.usart1sw = Some(embassy_stm32::pac::rcc::vals::Usart1sw::HSI); - let p = embassy_stm32::init(init_config); + let p = embassy_stm32::init(Default::default()); info!("Hello World!"); let config = Config::default(); diff --git a/examples/stm32f334/src/bin/pwm.rs b/examples/stm32f334/src/bin/pwm.rs index 7fc1ea926..24606b9b6 100644 --- a/examples/stm32f334/src/bin/pwm.rs +++ b/examples/stm32f334/src/bin/pwm.rs @@ -28,6 +28,7 @@ async fn main(_spawner: Spawner) { config.rcc.apb1_pre = APBPrescaler::DIV2; config.rcc.apb2_pre = APBPrescaler::DIV1; 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 } let p = embassy_stm32::init(config);