stm32/dbgmcu: do not use macrotable.
This commit is contained in:
parent
d381b8e2b6
commit
8d46d31824
1 changed files with 21 additions and 4 deletions
|
@ -98,10 +98,27 @@ pub fn init(config: Config) -> Peripherals {
|
||||||
#[cfg(dbgmcu)]
|
#[cfg(dbgmcu)]
|
||||||
if config.enable_debug_during_sleep {
|
if config.enable_debug_during_sleep {
|
||||||
crate::pac::DBGMCU.cr().modify(|cr| {
|
crate::pac::DBGMCU.cr().modify(|cr| {
|
||||||
crate::pac::dbgmcu! {
|
#[cfg(any(dbgmcu_f0, dbgmcu_g0, dbgmcu_u5))]
|
||||||
(cr, $fn_name:ident) => {
|
{
|
||||||
cr.$fn_name(true);
|
cr.set_dbg_stop(true);
|
||||||
};
|
cr.set_dbg_standby(true);
|
||||||
|
}
|
||||||
|
#[cfg(any(
|
||||||
|
dbgmcu_f1, dbgmcu_f2, dbgmcu_f3, dbgmcu_f4, dbgmcu_f7, dbgmcu_g4, dbgmcu_f7,
|
||||||
|
dbgmcu_l0, dbgmcu_l1, dbgmcu_l4, dbgmcu_wb, dbgmcu_wl
|
||||||
|
))]
|
||||||
|
{
|
||||||
|
cr.set_dbg_sleep(true);
|
||||||
|
cr.set_dbg_stop(true);
|
||||||
|
cr.set_dbg_standby(true);
|
||||||
|
}
|
||||||
|
#[cfg(dbgmcu_h7)]
|
||||||
|
{
|
||||||
|
cr.set_d1dbgcken(true);
|
||||||
|
cr.set_d3dbgcken(true);
|
||||||
|
cr.set_dbgsleep_d1(true);
|
||||||
|
cr.set_dbgstby_d1(true);
|
||||||
|
cr.set_dbgstop_d1(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue