d68f2617e6
Includes the addition of a `dbgmcu!(...)` macro table which currently takes the form of (cr, $fn_name:ident) where `$fn_name` is something like `set_dbgsleep_d1` etc. The method is unsafe, since it's performing unsafe PAC operations. Two examples modified to demonstrate its usage.
14 lines
283 B
Rust
14 lines
283 B
Rust
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);
|
|
};
|
|
}
|
|
});
|
|
}
|
|
}
|