stm32/rtc: fix build failure in some L4s
This commit is contained in:
@ -9,11 +9,6 @@ impl<'d, T: Instance> super::Rtc<'d, T> {
|
||||
pub(super) fn apply_config(&mut self, rtc_config: RtcConfig) {
|
||||
// Unlock the backup domain
|
||||
unsafe {
|
||||
#[cfg(any(rtc_v3u5, rcc_g0, rcc_g4))]
|
||||
use crate::pac::rcc::vals::Rtcsel;
|
||||
#[cfg(not(any(rtc_v3u5, rcc_g0, rcc_g4, rcc_wl5, rcc_wle)))]
|
||||
use crate::pac::rtc::vals::Rtcsel;
|
||||
|
||||
#[cfg(not(any(rtc_v3u5, rcc_wl5, rcc_wle)))]
|
||||
{
|
||||
crate::pac::PWR.cr1().modify(|w| w.set_dbp(true));
|
||||
@ -32,7 +27,7 @@ impl<'d, T: Instance> super::Rtc<'d, T> {
|
||||
|
||||
let config_rtcsel = rtc_config.clock_config as u8;
|
||||
#[cfg(not(any(rcc_wl5, rcc_wle)))]
|
||||
let config_rtcsel = Rtcsel(config_rtcsel);
|
||||
let config_rtcsel = crate::pac::rcc::vals::Rtcsel(config_rtcsel);
|
||||
|
||||
if !reg.rtcen() || reg.rtcsel() != config_rtcsel {
|
||||
crate::pac::RCC.bdcr().modify(|w| w.set_bdrst(true));
|
||||
|
Reference in New Issue
Block a user