Add example for STM32WL55

This commit is contained in:
Ulf Lilleengen
2021-08-17 13:14:21 +02:00
parent 4b74e8fc50
commit 61409e2fb6
8 changed files with 133 additions and 11 deletions

View File

@ -37,6 +37,7 @@ macro_rules! foreach_exti_irq {
#[cfg_attr(exti_v1, path = "v1.rs")]
#[cfg_attr(exti_h7, path = "v1.rs")]
#[cfg_attr(exti_wb55, path = "v2.rs")]
#[cfg_attr(exti_wl5x, path = "v2.rs")]
mod _version;
#[allow(unused)]
@ -110,6 +111,6 @@ pub(crate) unsafe fn init() {
foreach_exti_irq!(enable_irq);
#[cfg(not(rcc_wb55))]
#[cfg(not(any(rcc_wb55, rcc_wl5x)))]
<crate::peripherals::SYSCFG as crate::rcc::sealed::RccPeripheral>::enable();
}

View File

@ -116,15 +116,6 @@ 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));
Dbgmcu::enable_all();
}
}
}
/// Extension trait that freezes the `RCC` peripheral with provided clocks configuration