diff options
| author | antonello.contini <[email protected]> | 2025-02-25 21:37:01 +0100 |
|---|---|---|
| committer | antonello.contini <[email protected]> | 2025-02-25 21:37:01 +0100 |
| commit | 724e1a34e57c283bc59068f3ac69f19bf3d2a72a (patch) | |
| tree | 8d047f3bc7ea53c6492f46076b46742de9046e9e | |
| parent | 51085a5e949317a578e5253d8eaccf247ccc47cc (diff) | |
simpler configuration
| -rw-r--r-- | embassy-stm32/src/rcc/f247.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/embassy-stm32/src/rcc/f247.rs b/embassy-stm32/src/rcc/f247.rs index 52d093609..8c5307409 100644 --- a/embassy-stm32/src/rcc/f247.rs +++ b/embassy-stm32/src/rcc/f247.rs | |||
| @@ -87,10 +87,8 @@ pub struct Config { | |||
| 87 | pub sys: Sysclk, | 87 | pub sys: Sysclk, |
| 88 | 88 | ||
| 89 | pub pll_src: PllSource, | 89 | pub pll_src: PllSource, |
| 90 | #[cfg(any(stm32f413, stm32f423, stm32f412))] | ||
| 91 | pub plli2s_src: Plli2sSource, | ||
| 92 | #[cfg(any(stm32f412, stm32f413, stm32f423))] | 90 | #[cfg(any(stm32f412, stm32f413, stm32f423))] |
| 93 | pub external_clock: Option<Hertz>, | 91 | pub external_i2s_clock: Option<Hertz>, |
| 94 | 92 | ||
| 95 | pub pll: Option<Pll>, | 93 | pub pll: Option<Pll>, |
| 96 | #[cfg(any(stm32f2, all(stm32f4, not(stm32f410)), stm32f7))] | 94 | #[cfg(any(stm32f2, all(stm32f4, not(stm32f410)), stm32f7))] |
| @@ -118,10 +116,8 @@ impl Default for Config { | |||
| 118 | hse: None, | 116 | hse: None, |
| 119 | sys: Sysclk::HSI, | 117 | sys: Sysclk::HSI, |
| 120 | pll_src: PllSource::HSI, | 118 | pll_src: PllSource::HSI, |
| 121 | #[cfg(any(stm32f413, stm32f423, stm32f412))] | ||
| 122 | plli2s_src: Plli2sSource::HSE_HSI, | ||
| 123 | #[cfg(any(stm32f412, stm32f413, stm32f423))] | 119 | #[cfg(any(stm32f412, stm32f413, stm32f423))] |
| 124 | external_clock: None, | 120 | external_i2s_clock: None, |
| 125 | pll: None, | 121 | pll: None, |
| 126 | #[cfg(any(stm32f2, all(stm32f4, not(stm32f410)), stm32f7))] | 122 | #[cfg(any(stm32f2, all(stm32f4, not(stm32f410)), stm32f7))] |
| 127 | plli2s: None, | 123 | plli2s: None, |
| @@ -197,7 +193,7 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 197 | hse, | 193 | hse, |
| 198 | hsi, | 194 | hsi, |
| 199 | #[cfg(any(stm32f412, stm32f413, stm32f423))] | 195 | #[cfg(any(stm32f412, stm32f413, stm32f423))] |
| 200 | external: config.external_clock, | 196 | external: config.external_i2s_clock, |
| 201 | source: config.pll_src, | 197 | source: config.pll_src, |
| 202 | }; | 198 | }; |
| 203 | let pll = init_pll(PllInstance::Pll, config.pll, &pll_input); | 199 | let pll = init_pll(PllInstance::Pll, config.pll, &pll_input); |
