diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 9c94e5f3f..79221e600 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs @@ -76,6 +76,7 @@ pub use generated::{peripherals, Peripherals}; #[non_exhaustive] pub struct Config { pub rcc: rcc::Config, + #[cfg(dbgmcu)] pub enable_debug_during_sleep: bool, } @@ -83,6 +84,7 @@ impl Default for Config { fn default() -> Self { Self { rcc: Default::default(), + #[cfg(dbgmcu)] enable_debug_during_sleep: true, } } @@ -93,6 +95,7 @@ pub fn init(config: Config) -> Peripherals { let p = Peripherals::take(); unsafe { + #[cfg(dbgmcu)] if config.enable_debug_during_sleep { crate::pac::DBGMCU.cr().modify(|cr| { crate::pac::dbgmcu! { diff --git a/stm32-data b/stm32-data index cb78ac90b..5fcc7795c 160000 --- a/stm32-data +++ b/stm32-data @@ -1 +1 @@ -Subproject commit cb78ac90ba8607d6bb38296607c02e28c60391f8 +Subproject commit 5fcc7795c880c7b19bb7b6226cd6d7db0b5cd953