diff --git a/examples/stm32f0/src/example_common.rs b/examples/stm32f0/src/example_common.rs index c166522e..fb39dcf2 100644 --- a/examples/stm32f0/src/example_common.rs +++ b/examples/stm32f0/src/example_common.rs @@ -10,10 +10,8 @@ use embassy_stm32::rcc; use embassy_stm32::Config; pub fn config() -> Config { - let mut rcc_config = rcc::Config::default(); - rcc_config.enable_debug_wfe = true; let mut config = Config::default(); - config.rcc = rcc_config; + config.rcc.enable_debug_wfe = true; config } diff --git a/examples/stm32f4/src/bin/hello.rs b/examples/stm32f4/src/bin/hello.rs index 8cbd46d6..435ed974 100644 --- a/examples/stm32f4/src/bin/hello.rs +++ b/examples/stm32f4/src/bin/hello.rs @@ -18,12 +18,10 @@ use embassy_stm32::Peripherals; mod example_common; fn config() -> Config { - let mut rcc_config = RccConfig::default(); - rcc_config.sys_ck = Some(Hertz(84_000_000)); - rcc_config.enable_debug_wfe = true; - let mut config = Config::default(); config.rcc = rcc_config; + config.rcc.sys_ck = Some(Hertz(84_000_000)); + config.rcc.enable_debug_wfe = true; config }