From aba581d7fd0ebe19d995838fea10954594ace445 Mon Sep 17 00:00:00 2001 From: Alessandro Pezzato Date: Mon, 18 Mar 2024 17:03:04 +0100 Subject: [PATCH] Fix compiler warning See /~https://github.com/rust-lang/rust/issues/116122 --- src/scu/ccu.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scu/ccu.rs b/src/scu/ccu.rs index 2dfe472..66ac875 100644 --- a/src/scu/ccu.rs +++ b/src/scu/ccu.rs @@ -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