diff options
| author | xoviat <[email protected]> | 2023-09-25 16:38:30 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-09-25 16:38:30 -0500 |
| commit | 96edbd84fbdc10a5b9b37a343941bc057be59467 (patch) | |
| tree | 74286550c032e68ec2558d41fa87dd321660642c /embassy-stm32/src/rtc | |
| parent | dc400a05393fa9765a9ecb91cbbec10300a5e238 (diff) | |
rtc: use enable on known working chips only
Diffstat (limited to 'embassy-stm32/src/rtc')
| -rw-r--r-- | embassy-stm32/src/rtc/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/rtc/mod.rs b/embassy-stm32/src/rtc/mod.rs index b26b5ef35..73b78f253 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; | |||
| 10 | use embassy_sync::blocking_mutex::Mutex; | 10 | use embassy_sync::blocking_mutex::Mutex; |
| 11 | 11 | ||
| 12 | pub use self::datetime::{DateTime, DayOfWeek, Error as DateTimeError}; | 12 | pub use self::datetime::{DateTime, DayOfWeek, Error as DateTimeError}; |
| 13 | use crate::rcc::sealed::RccPeripheral; | ||
| 14 | pub use crate::rcc::RtcClockSource; | 13 | pub use crate::rcc::RtcClockSource; |
| 15 | use crate::time::Hertz; | 14 | use crate::time::Hertz; |
| 16 | 15 | ||
| @@ -156,7 +155,8 @@ impl Default for RtcCalibrationCyclePeriod { | |||
| 156 | 155 | ||
| 157 | impl Rtc { | 156 | impl Rtc { |
| 158 | pub fn new(_rtc: impl Peripheral<P = RTC>, rtc_config: RtcConfig) -> Self { | 157 | pub fn new(_rtc: impl Peripheral<P = RTC>, rtc_config: RtcConfig) -> Self { |
| 159 | RTC::enable(); | 158 | #[cfg(any(rcc_wle, rcc_wl5, rcc_g4, rcc_g0, rtc_v2l4, rtc_v2wb))] |
| 159 | <RTC as crate::rcc::sealed::RccPeripheral>::enable(); | ||
| 160 | 160 | ||
| 161 | let mut this = Self { | 161 | let mut this = Self { |
| 162 | #[cfg(feature = "low-power")] | 162 | #[cfg(feature = "low-power")] |
