stm32: remove Dbgmcu from public API.

The use case is already covered by `config.enable_debug_during_sleep`.
This commit is contained in:
Dario Nieuwenhuis 2022-01-04 23:58:57 +01:00
parent 2eb0cc5df7
commit 3486d59d73
2 changed files with 7 additions and 16 deletions

View File

@ -1,13 +0,0 @@
pub struct Dbgmcu {}
impl Dbgmcu {
pub unsafe fn enable_all() {
crate::pac::DBGMCU.cr().modify(|cr| {
crate::pac::dbgmcu! {
(cr, $fn_name:ident) => {
cr.$fn_name(true);
};
}
});
}
}

View File

@ -29,8 +29,6 @@ pub mod adc;
pub mod can;
#[cfg(dac)]
pub mod dac;
#[cfg(dbgmcu)]
pub mod dbgmcu;
#[cfg(dcmi)]
pub mod dcmi;
#[cfg(all(eth, feature = "net"))]
@ -90,7 +88,13 @@ pub fn init(config: Config) -> Peripherals {
unsafe {
if config.enable_debug_during_sleep {
dbgmcu::Dbgmcu::enable_all();
crate::pac::DBGMCU.cr().modify(|cr| {
crate::pac::dbgmcu! {
(cr, $fn_name:ident) => {
cr.$fn_name(true);
};
}
});
}
gpio::init();