Skip to content

Commit

Permalink
Fix compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alepez committed Mar 18, 2024
1 parent 94ae4d7 commit aba581d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scu/ccu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,10 @@ const SYSCLK_FREQUENCY: u32 = 20_000_000;
#[inline]
pub(crate) fn get_osc_frequency() -> f32 {
// SAFETY: each bit of SYSPLLCON0 is at least R, except for bit RESLD (W, if read always return 0)
let f = match unsafe { SCU.syspllcon0().read() }.insel().get() {
scu::syspllcon0::Insel::CONST_00 => EVR_OSC_FREQUENCY,
scu::syspllcon0::Insel::CONST_11 => XTAL_FREQUENCY,
scu::syspllcon0::Insel::CONST_22 => SYSCLK_FREQUENCY,
let f = match unsafe { SCU.syspllcon0().read() }.insel().get().0 {
0 => EVR_OSC_FREQUENCY,
1 => XTAL_FREQUENCY,
2 => SYSCLK_FREQUENCY,
_ => 0,
};
f as f32
Expand Down

0 comments on commit aba581d

Please sign in to comment.