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

@ -2,7 +2,6 @@ use core::marker::PhantomData;
use embassy::util::Unborrow;
use crate::dbgmcu::Dbgmcu;
use crate::pac::{FLASH, RCC};
use crate::peripherals;
use crate::time::Hertz;
@ -27,7 +26,6 @@ pub struct Config {
pub sys_ck: Option<Hertz>,
pub hclk: Option<Hertz>,
pub pclk: Option<Hertz>,
pub enable_debug_wfe: bool,
}
pub struct Rcc<'d> {
@ -190,12 +188,6 @@ impl<'d> Rcc<'d> {
}
})
}
if self.config.enable_debug_wfe {
RCC.ahbenr().modify(|w| w.set_dmaen(true));
critical_section::with(|_| Dbgmcu::enable_all());
}
}
Clocks {