stm32-rs / stm32f7xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Apache License 2.0
115 stars 67 forks source link

Possible typo in maximal frequency. #144

Open matoushybl opened 2 years ago

matoushybl commented 2 years ago

There are two different frequencies mentioned in the comments and in the code.

https://github.com/stm32-rs/stm32f7xx-hal/blob/0a0d06d5f63c3a1471362370fdfb8c367207d308/src/rcc.rs#L468-L476

hannobraun commented 2 years ago

Thank you, good catch! Just from reading the code, it's not clear to me whether this is actually wrong, but it definitely looks dubious.

Even it this doesn't need fixing, a better comment would be great.

matoushybl commented 2 years ago

Oh, I see it now. Sorry for the mistake, I agree with adding a slightly improved comment, but I believe we could also extract the frequencies for example to a module with constants.