stm32: move dbgmcu stuff to toplevel config setting, defaulting to true.

This commit is contained in:
Dario Nieuwenhuis
2021-08-19 23:32:22 +02:00
parent 446d6c275c
commit 2c992f7010
46 changed files with 26 additions and 233 deletions

View File

@ -21,7 +21,6 @@ pub struct Config {
pub hclk: Option<Hertz>,
pub pclk1: Option<Hertz>,
pub pclk2: Option<Hertz>,
pub enable_debug_wfe: bool,
}
/// RCC peripheral
@ -176,15 +175,6 @@ impl<'d> Rcc<'d> {
});
}
if self.config.enable_debug_wfe {
unsafe {
RCC.ahb1enr().modify(|w| w.set_dma1en(true));
critical_section::with(|_| {
crate::dbgmcu::Dbgmcu::enable_all();
});
}
}
Clocks {
sys: Hertz(sysclk),
apb1: Hertz(pclk1),