mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 23:02:30 +00:00
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:
parent
456b56d4fd
commit
9fcc207629
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user