stm32/rcc: use more PLL etc enums from PAC.

This commit is contained in:
Dario Nieuwenhuis
2023-10-11 00:12:33 +02:00
parent eff73d6dfa
commit 0cfa8d1bb5
20 changed files with 368 additions and 932 deletions

View File

@@ -108,13 +108,13 @@ pub(crate) unsafe fn init(config: Config) {
});
RCC.cfgr2().modify(|w| {
w.set_hpre(config.ahb_pre.into());
w.set_ppre1(config.apb1_pre.into());
w.set_ppre2(config.apb2_pre.into());
w.set_hpre(config.ahb_pre);
w.set_ppre1(config.apb1_pre);
w.set_ppre2(config.apb2_pre);
});
RCC.cfgr3().modify(|w| {
w.set_ppre7(config.apb7_pre.into());
w.set_ppre7(config.apb7_pre);
});
let ahb_freq = sys_clk / config.ahb_pre;