diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-08-17 18:49:55 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-08-17 22:16:46 +0200 |
| commit | fc6e1e06b305d302d1b7ad17e8ef3a9be986c358 (patch) | |
| tree | 545ad829660f6053d29a01da286d03ec3d49f5ca /examples/stm32f2/src/bin/pll.rs | |
| parent | d881f3ad9186cf3279aa1ba27093bad94035c186 (diff) | |
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'examples/stm32f2/src/bin/pll.rs')
| -rw-r--r-- | examples/stm32f2/src/bin/pll.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/stm32f2/src/bin/pll.rs b/examples/stm32f2/src/bin/pll.rs index 01e63b15e..bc0c160ba 100644 --- a/examples/stm32f2/src/bin/pll.rs +++ b/examples/stm32f2/src/bin/pll.rs | |||
| @@ -11,7 +11,7 @@ use embassy_stm32::rcc::{ | |||
| 11 | APBPrescaler, ClockSrc, HSEConfig, HSESrc, PLL48Div, PLLConfig, PLLMainDiv, PLLMul, PLLPreDiv, PLLSrc, | 11 | APBPrescaler, ClockSrc, HSEConfig, HSESrc, PLL48Div, PLLConfig, PLLMainDiv, PLLMul, PLLPreDiv, PLLSrc, |
| 12 | }; | 12 | }; |
| 13 | use embassy_stm32::time::Hertz; | 13 | use embassy_stm32::time::Hertz; |
| 14 | use embassy_stm32::{Config, Peripherals}; | 14 | use embassy_stm32::Config; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 16 | ||
| 17 | // Example config for maximum performance on a NUCLEO-F207ZG board | 17 | // Example config for maximum performance on a NUCLEO-F207ZG board |
| @@ -43,8 +43,9 @@ fn config() -> Config { | |||
| 43 | config | 43 | config |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | #[embassy_executor::main(config = "config()")] | 46 | #[embassy_executor::main] |
| 47 | async fn main(_spawner: Spawner, _p: Peripherals) { | 47 | async fn main(_spawner: Spawner) { |
| 48 | let _p = embassy_stm32::init(config()); | ||
| 48 | loop { | 49 | loop { |
| 49 | Timer::after(Duration::from_millis(1000)).await; | 50 | Timer::after(Duration::from_millis(1000)).await; |
| 50 | info!("1s elapsed"); | 51 | info!("1s elapsed"); |
