Rename from wl55 to wl5x and enable debug wfe
This commit is contained in:
parent
b6a8703698
commit
383beb37b3
@ -16,13 +16,13 @@ pub struct Clocks {
|
||||
#[cfg(any(rcc_l0))]
|
||||
pub ahb: Hertz,
|
||||
|
||||
#[cfg(any(rcc_l4, rcc_f4, rcc_h7, rcc_wb55, rcc_wl55))]
|
||||
#[cfg(any(rcc_l4, rcc_f4, rcc_h7, rcc_wb55, rcc_wl5x))]
|
||||
pub ahb1: Hertz,
|
||||
|
||||
#[cfg(any(rcc_l4, rcc_f4, rcc_h7, rcc_wb55, rcc_wl55))]
|
||||
#[cfg(any(rcc_l4, rcc_f4, rcc_h7, rcc_wb55, rcc_wl5x))]
|
||||
pub ahb2: Hertz,
|
||||
|
||||
#[cfg(any(rcc_l4, rcc_f4, rcc_h7, rcc_wb55, rcc_wl55))]
|
||||
#[cfg(any(rcc_l4, rcc_f4, rcc_h7, rcc_wb55, rcc_wl5x))]
|
||||
pub ahb3: Hertz,
|
||||
|
||||
#[cfg(any(rcc_h7))]
|
||||
@ -62,9 +62,9 @@ cfg_if::cfg_if! {
|
||||
} else if #[cfg(rcc_wb55)] {
|
||||
mod wb55;
|
||||
pub use wb55::*;
|
||||
} else if #[cfg(rcc_wl55)] {
|
||||
mod wl55;
|
||||
pub use wl55::*;
|
||||
} else if #[cfg(rcc_wl5x)] {
|
||||
mod wl5x;
|
||||
pub use wl5x::*;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,6 +116,19 @@ impl<'d> Rcc<'d> {
|
||||
pub fn clocks(&self) -> &'static Clocks {
|
||||
unsafe { get_freqs() }
|
||||
}
|
||||
|
||||
pub fn enable_debug_wfe(&mut self, _dbg: &mut peripherals::DBGMCU, enable_dma: bool) {
|
||||
// NOTE(unsafe) We have exclusive access to the RCC and DBGMCU
|
||||
unsafe {
|
||||
pac::RCC.ahb1enr().modify(|w| w.set_dma1en(enable_dma));
|
||||
|
||||
pac::DBGMCU.cr().modify(|w| {
|
||||
w.set_dbg_sleep(true);
|
||||
w.set_dbg_standby(true);
|
||||
w.set_dbg_stop(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Extension trait that freezes the `RCC` peripheral with provided clocks configuration
|
@ -1 +1 @@
|
||||
Subproject commit e104fc21fea271a5d407086ac7ff19e448ac1b34
|
||||
Subproject commit d368153cd36a52c8a2c9283270520ce97b265eff
|
Loading…
Reference in New Issue
Block a user