aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/rtc/v2.rs
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-09-25 16:26:29 -0500
committerxoviat <[email protected]>2023-09-25 16:26:29 -0500
commit04b09a2acb465dbb87dfc4e8b24b4c587f21b472 (patch)
tree726bc7b14d1acf6e9c4d18ac035da782ccd94d9d /embassy-stm32/src/rtc/v2.rs
parent481d2998ef49ef550f6fcf4e8a815b6170aed23b (diff)
stm32/rtc: use rccperi enable
Diffstat (limited to 'embassy-stm32/src/rtc/v2.rs')
-rw-r--r--embassy-stm32/src/rtc/v2.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/embassy-stm32/src/rtc/v2.rs b/embassy-stm32/src/rtc/v2.rs
index ab562d2b6..331792a04 100644
--- a/embassy-stm32/src/rtc/v2.rs
+++ b/embassy-stm32/src/rtc/v2.rs
@@ -286,17 +286,6 @@ impl sealed::Instance for crate::peripherals::RTC {
286 #[cfg(all(feature = "low-power", stm32l0))] 286 #[cfg(all(feature = "low-power", stm32l0))]
287 type WakeupInterrupt = crate::interrupt::typelevel::RTC; 287 type WakeupInterrupt = crate::interrupt::typelevel::RTC;
288 288
289 fn enable_peripheral_clk() {
290 #[cfg(any(rtc_v2l4, rtc_v2wb))]
291 {
292 // enable peripheral clock for communication
293 crate::pac::RCC.apb1enr1().modify(|w| w.set_rtcapben(true));
294
295 // read to allow the pwr clock to enable
296 crate::pac::PWR.cr1().read();
297 }
298 }
299
300 fn read_backup_register(rtc: &Rtc, register: usize) -> Option<u32> { 289 fn read_backup_register(rtc: &Rtc, register: usize) -> Option<u32> {
301 if register < Self::BACKUP_REGISTER_COUNT { 290 if register < Self::BACKUP_REGISTER_COUNT {
302 Some(rtc.bkpr(register).read().bkp()) 291 Some(rtc.bkpr(register).read().bkp())