We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fed4fb2 commit cf4c538Copy full SHA for cf4c538
src/rng.rs
@@ -20,14 +20,12 @@ impl RngExt for RNG {
20
// ...this is now supposed to be done in RCC configuration before freezing
21
22
// hsi48 should be turned on previously or msi at 48mhz
23
- let enabled = {
24
- clocks.hsi48() ||
25
- match clocks.msi() {
26
- Some(msi) => msi == crate::rcc::MsiFreq::RANGE48M,
27
- None => false,
28
- }
+ let msi = match clocks.msi() {
+ Some(msi) => msi == crate::rcc::MsiFreq::RANGE48M,
+ None => false,
29
};
30
- assert!(enabled);
+ let hsi = clocks.hsi48();
+ assert!(msi || hsi);
31
32
ahb2.enr().modify(|_, w| w.rngen().set_bit());
33
// if we don't do this... we can be "too fast", and
0 commit comments