rcc: more cleanup

This commit is contained in:
xoviat
2023-09-08 18:20:58 -05:00
parent 48154e18bf
commit 11a78fb1e4
12 changed files with 79 additions and 115 deletions

View File

@ -270,9 +270,18 @@ impl sealed::Instance for crate::peripherals::RTC {
}
#[cfg(any(rtc_v2f2))]
{
// enable peripheral clock for communication
crate::pac::RCC.apb1enr().modify(|w| w.set_pwren(true));
// read to allow the pwr clock to enable
crate::pac::PWR.cr().read();
}
#[cfg(any(rtc_v2f0))]
{
// enable peripheral clock for communication
crate::pac::RCC.apb1enr().modify(|w| w.set_pwren(true));
}
}
fn read_backup_register(rtc: &Rtc, register: usize) -> Option<u32> {