h7: implement RTC and LSE clock configuration

This commit is contained in:
Matt Ickstadt
2023-10-03 16:45:05 -05:00
parent 65ed19aae2
commit f01609036f
12 changed files with 231 additions and 51 deletions

View File

@ -564,7 +564,7 @@ pub trait DacPin<T: Instance, const C: u8>: crate::gpio::Pin + 'static {}
foreach_peripheral!(
(dac, $inst:ident) => {
// H7 uses single bit for both DAC1 and DAC2, this is a hack until a proper fix is implemented
#[cfg(rcc_h7)]
#[cfg(any(rcc_h7, rcc_h7rm0433))]
impl crate::rcc::sealed::RccPeripheral for peripherals::$inst {
fn frequency() -> crate::time::Hertz {
critical_section::with(|_| unsafe { crate::rcc::get_freqs().apb1 })
@ -590,7 +590,7 @@ foreach_peripheral!(
}
}
#[cfg(rcc_h7)]
#[cfg(any(rcc_h7, rcc_h7rm0433))]
impl crate::rcc::RccPeripheral for peripherals::$inst {}
impl crate::dac::sealed::Instance for peripherals::$inst {