From 03f15d3a6093fe169791c5b132688bb115e8046f Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Wed, 4 Aug 2021 11:32:39 -0400 Subject: Remove builders from Config(s) and examples. --- examples/stm32f4/src/bin/hello.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/stm32f4/src') diff --git a/examples/stm32f4/src/bin/hello.rs b/examples/stm32f4/src/bin/hello.rs index 8ee6c1ef8..8cbd46d6e 100644 --- a/examples/stm32f4/src/bin/hello.rs +++ b/examples/stm32f4/src/bin/hello.rs @@ -22,7 +22,9 @@ fn config() -> Config { rcc_config.sys_ck = Some(Hertz(84_000_000)); rcc_config.enable_debug_wfe = true; - Config::default().rcc(rcc_config) + let mut config = Config::default(); + config.rcc = rcc_config; + config } #[embassy::main(config = "config()")] -- cgit From 6fd8f6b79ad5c951229f72047da2f54342a02254 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Wed, 4 Aug 2021 13:55:34 -0400 Subject: Remove more extra vars. --- examples/stm32f4/src/bin/hello.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'examples/stm32f4/src') diff --git a/examples/stm32f4/src/bin/hello.rs b/examples/stm32f4/src/bin/hello.rs index 8cbd46d6e..435ed9748 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 } -- cgit From 9726f77ce13e4c31fbe9aaa7e259aa9c31b60c63 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Wed, 4 Aug 2021 15:28:08 -0400 Subject: Grep fails me. --- examples/stm32f4/src/bin/hello.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'examples/stm32f4/src') diff --git a/examples/stm32f4/src/bin/hello.rs b/examples/stm32f4/src/bin/hello.rs index 435ed9748..20eda3ae0 100644 --- a/examples/stm32f4/src/bin/hello.rs +++ b/examples/stm32f4/src/bin/hello.rs @@ -9,7 +9,6 @@ use defmt::{info, panic}; use embassy::executor::Spawner; use embassy::time::{Duration, Timer}; -use embassy_stm32::rcc::Config as RccConfig; use embassy_stm32::time::Hertz; use embassy_stm32::Config; use embassy_stm32::Peripherals; @@ -19,7 +18,6 @@ mod example_common; fn config() -> Config { 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 -- cgit