diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-08-04 21:32:39 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-04 21:32:39 +0200 |
| commit | cfa1f61154193da9a12420cb9cf300b2f3d736b2 (patch) | |
| tree | 3ef781c75da9e94483e6cbdf994bf12b2dd89bb6 /examples/stm32f4/src/bin | |
| parent | cee111c8650ad15d47a1495a33370f5ec12f83ed (diff) | |
| parent | 9726f77ce13e4c31fbe9aaa7e259aa9c31b60c63 (diff) | |
Merge pull request #344 from bobmcwhirter/remove_builders
Remove builders from Config(s) and examples.
Diffstat (limited to 'examples/stm32f4/src/bin')
| -rw-r--r-- | examples/stm32f4/src/bin/hello.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/stm32f4/src/bin/hello.rs b/examples/stm32f4/src/bin/hello.rs index a16748f4e..41d808406 100644 --- a/examples/stm32f4/src/bin/hello.rs +++ b/examples/stm32f4/src/bin/hello.rs | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | use defmt::{info, panic}; | 7 | use defmt::{info, panic}; |
| 8 | use embassy::executor::Spawner; | 8 | use embassy::executor::Spawner; |
| 9 | use embassy::time::{Duration, Timer}; | 9 | use embassy::time::{Duration, Timer}; |
| 10 | use embassy_stm32::rcc::Config as RccConfig; | ||
| 11 | use embassy_stm32::time::Hertz; | 10 | use embassy_stm32::time::Hertz; |
| 12 | use embassy_stm32::Config; | 11 | use embassy_stm32::Config; |
| 13 | use embassy_stm32::Peripherals; | 12 | use embassy_stm32::Peripherals; |
| @@ -16,11 +15,10 @@ use embassy_stm32::Peripherals; | |||
| 16 | mod example_common; | 15 | mod example_common; |
| 17 | 16 | ||
| 18 | fn config() -> Config { | 17 | fn config() -> Config { |
| 19 | let mut rcc_config = RccConfig::default(); | 18 | let mut config = Config::default(); |
| 20 | rcc_config.sys_ck = Some(Hertz(84_000_000)); | 19 | config.rcc.sys_ck = Some(Hertz(84_000_000)); |
| 21 | rcc_config.enable_debug_wfe = true; | 20 | config.rcc.enable_debug_wfe = true; |
| 22 | 21 | config | |
| 23 | Config::default().rcc(rcc_config) | ||
| 24 | } | 22 | } |
| 25 | 23 | ||
| 26 | #[embassy::main(config = "config()")] | 24 | #[embassy::main(config = "config()")] |
