From f395ec44e8442a3133b080df96da54da18127b97 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 14 Apr 2023 21:28:27 -0500 Subject: [PATCH] stm32/rcc: add pllsai clock --- embassy-stm32/src/rcc/f4.rs | 5 ++++- embassy-stm32/src/rcc/mod.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/rcc/f4.rs b/embassy-stm32/src/rcc/f4.rs index 5427d2fb4..e0929ca49 100644 --- a/embassy-stm32/src/rcc/f4.rs +++ b/embassy-stm32/src/rcc/f4.rs @@ -479,8 +479,11 @@ pub(crate) unsafe fn init(config: Config) { pll48: plls.pll48clk.map(Hertz), - #[cfg(not(any(stm32f410, stm32f411, stm32f412, stm32f413, stm32f423, stm32f446)))] + #[cfg(not(stm32f410))] plli2s: plls.plli2sclk.map(Hertz), + + #[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479))] + pllsai: None, }); } diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index 7c1e416fe..d6816d6a8 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs @@ -60,9 +60,12 @@ pub struct Clocks { #[cfg(any(rcc_f2, rcc_f4, rcc_f410, rcc_f7))] pub pll48: Option, - #[cfg(all(stm32f4, not(any(stm32f410, stm32f411, stm32f412, stm32f413, stm32f423, stm32f446))))] + #[cfg(all(rcc_f4, not(stm32f410)))] pub plli2s: Option, + #[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479))] + pub pllsai: Option, + #[cfg(stm32f1)] pub adc: Hertz,