diff --git a/embassy-stm32/src/dbgmcu/mod.rs b/embassy-stm32/src/dbgmcu/mod.rs deleted file mode 100644 index 8dc4cc53..00000000 --- a/embassy-stm32/src/dbgmcu/mod.rs +++ /dev/null @@ -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); - }; - } - }); - } -} diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 117f3ed2..bcd9bd5c 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs @@ -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();