From 96edbd84fbdc10a5b9b37a343941bc057be59467 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 25 Sep 2023 16:38:30 -0500 Subject: [PATCH] rtc: use enable on known working chips only --- embassy-stm32/src/rtc/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/rtc/mod.rs b/embassy-stm32/src/rtc/mod.rs index b26b5ef3..73b78f25 100644 --- a/embassy-stm32/src/rtc/mod.rs +++ b/embassy-stm32/src/rtc/mod.rs @@ -10,7 +10,6 @@ use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; use embassy_sync::blocking_mutex::Mutex; pub use self::datetime::{DateTime, DayOfWeek, Error as DateTimeError}; -use crate::rcc::sealed::RccPeripheral; pub use crate::rcc::RtcClockSource; use crate::time::Hertz; @@ -156,7 +155,8 @@ impl Default for RtcCalibrationCyclePeriod { impl Rtc { pub fn new(_rtc: impl Peripheral

, rtc_config: RtcConfig) -> Self { - RTC::enable(); + #[cfg(any(rcc_wle, rcc_wl5, rcc_g4, rcc_g0, rtc_v2l4, rtc_v2wb))] + ::enable(); let mut this = Self { #[cfg(feature = "low-power")]