Fix build issues

This commit is contained in:
I--P 2024-10-11 10:40:19 +02:00 committed by GitHub
parent 55d85e1ca3
commit 97aa44bacf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -198,8 +198,14 @@ pub(crate) unsafe fn init(config: Config) {
let mut pllsai = init_pll(PllInstance::Pllsai, config.pllsai, &pll_input); let mut pllsai = init_pll(PllInstance::Pllsai, config.pllsai, &pll_input);
#[cfg(any(stm32f446, stm32f427, stm32f437, stm32f4x9, stm32f7))] #[cfg(any(stm32f446, stm32f427, stm32f437, stm32f4x9, stm32f7))]
RCC.dckcfgr().modify(|w| w.set_pllsaidivq(config.pllsai_divdivq)); RCC.dckcfgr().modify(|w| w.set_pllsaidivq(config.pllsai_divdivq));
pllsai.q = Some(unwrap!(pllsai.q) / (1 + config.pllsai_divdivq.to_bits())); pllsai.q = match pllsai.q {
Some(q) => {
Some(q/ (1 + config.pllsai_divdivq.to_bits()))
},
None => {None}
};
info!("KAPOUE {}",pllsai.q);
// Configure sysclk // Configure sysclk
let sys = match config.sys { let sys = match config.sys {
Sysclk::HSI => unwrap!(hsi), Sysclk::HSI => unwrap!(hsi),