From 41aaff95f866a5958bd06c0ee6adc2267b34e3c6 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sat, 31 Jul 2021 12:32:14 -0400 Subject: [PATCH] stm32h7: Use unwrap! --- embassy-stm32/src/rcc/h7/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/rcc/h7/mod.rs b/embassy-stm32/src/rcc/h7/mod.rs index 2d9602a34..d6a55c3b4 100644 --- a/embassy-stm32/src/rcc/h7/mod.rs +++ b/embassy-stm32/src/rcc/h7/mod.rs @@ -120,7 +120,7 @@ impl<'d> Rcc<'d> { unsafe { pll_setup(srcclk.0, &self.config.pll3, 2) }; let sys_ck = if sys_use_pll1_p { - Hertz(pll1_p_ck.unwrap()) // Must have been set by sys_ck_setup + Hertz(unwrap!(pll1_p_ck)) // Must have been set by sys_ck_setup } else { sys_ck }; @@ -390,7 +390,7 @@ impl<'d> Rcc<'d> { // set. The traceclk mux is synchronous with the system // clock mux, but has pll1_r_ck as an input. In order to // keep traceclk running, we force a pll1_r_ck. - (true, None) => Some(Hertz(self.config.pll1.p_ck.unwrap().0 / 2)), + (true, None) => Some(Hertz(unwrap!(self.config.pll1.p_ck).0 / 2)), // Either pll1 not selected as system clock, free choice // of pll1_r_ck. Or pll1 is selected, assume user has set