stm32: extract backupdomain into mod

This commit is contained in:
xoviat
2023-08-27 09:07:34 -05:00
parent 48085939e7
commit 4caa8497fc
9 changed files with 185 additions and 168 deletions

View File

@ -8,8 +8,8 @@ use crate::gpio::sealed::AFType;
use crate::gpio::Speed;
use crate::pac::rcc::vals::{Hpre, Ppre, Sw};
use crate::pac::{FLASH, PWR, RCC};
use crate::rcc::bd::{BackupDomain, RtcClockSource};
use crate::rcc::{set_freqs, Clocks};
use crate::rtc::{Rtc, RtcClockSource};
use crate::time::Hertz;
use crate::{peripherals, Peripheral};
@ -470,7 +470,7 @@ pub(crate) unsafe fn init(config: Config) {
}
config.rtc.map(|clock_source| {
Rtc::set_clock_source(clock_source);
BackupDomain::set_rtc_clock_source(clock_source);
});
let rtc = match config.rtc {