From 6bdacb4f69d523ef814e7e3b9c4a878106ca0e62 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 27 Nov 2023 00:35:41 +0100 Subject: [PATCH] stm32/sdmmc: use unwrap to ensure panics get printed to defmt. --- embassy-stm32/src/sdmmc/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/embassy-stm32/src/sdmmc/mod.rs b/embassy-stm32/src/sdmmc/mod.rs index a99a5707..27a12062 100644 --- a/embassy-stm32/src/sdmmc/mod.rs +++ b/embassy-stm32/src/sdmmc/mod.rs @@ -1457,8 +1457,8 @@ cfg_if::cfg_if! { macro_rules! kernel_clk { ($inst:ident) => { critical_section::with(|_| unsafe { - crate::rcc::get_freqs().pll1_q - }).expect("PLL48 is required for SDIO") + unwrap!(crate::rcc::get_freqs().pll1_q) + }) } } } else if #[cfg(stm32f7)] { @@ -1469,7 +1469,7 @@ cfg_if::cfg_if! { if sdmmcsel == crate::pac::rcc::vals::Sdmmcsel::SYS { crate::rcc::get_freqs().sys } else { - crate::rcc::get_freqs().pll1_q.expect("PLL48 is required for SDMMC") + unwrap!(crate::rcc::get_freqs().pll1_q) } }) }; @@ -1479,7 +1479,7 @@ cfg_if::cfg_if! { if sdmmcsel == crate::pac::rcc::vals::Sdmmcsel::SYS { crate::rcc::get_freqs().sys } else { - crate::rcc::get_freqs().pll1_q.expect("PLL48 is required for SDMMC") + unwrap!(crate::rcc::get_freqs().pll1_q) } }) };