From dc400a05393fa9765a9ecb91cbbec10300a5e238 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 25 Sep 2023 16:27:08 -0500 Subject: [PATCH] stm32/rtc: always set wakeup alarm --- embassy-stm32/src/rtc/v2.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/embassy-stm32/src/rtc/v2.rs b/embassy-stm32/src/rtc/v2.rs index 331792a0..4608d311 100644 --- a/embassy-stm32/src/rtc/v2.rs +++ b/embassy-stm32/src/rtc/v2.rs @@ -75,15 +75,6 @@ impl super::Rtc { #[cfg(any(rcc_wb, rcc_f4, rcc_f410))] unsafe { crate::rcc::get_freqs() }.rtc.unwrap(); - /* - If the requested duration is u64::MAX, don't even set the alarm - - Otherwise clamp the requested duration to u32::MAX so that we can do math - */ - if requested_duration.as_ticks() == u64::MAX { - return; - } - let requested_duration = requested_duration.as_ticks().clamp(0, u32::MAX as u64); let rtc_hz = Self::frequency().0 as u64; let rtc_ticks = requested_duration * rtc_hz / TICK_HZ;