stm32l1/rcc: fix clock frequency assertion

It was comparing a number in Hz (!) to "32" (MHz).
embassy-stm32's units don't work like those used by stm32-hal :/
This commit is contained in:
Greg V 2022-01-14 20:44:03 +03:00
parent 456b56d4fd
commit 9fcc207629

View File

@ -258,7 +258,7 @@ pub(crate) unsafe fn init(config: Config) {
PLLDiv::Div3 => freq / 3,
PLLDiv::Div4 => freq / 4,
};
assert!(freq <= 32_u32.mhz().0);
assert!(freq <= 32_000_000);
RCC.cfgr().write(move |w| {
w.set_pllmul(mul.into());