diff options
-rw-r--r-- | src/peripheral/dwt.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/peripheral/dwt.rs b/src/peripheral/dwt.rs index 7fc9478..11dd545 100644 --- a/src/peripheral/dwt.rs +++ b/src/peripheral/dwt.rs @@ -153,13 +153,25 @@ impl DWT { self.ctrl.read().cyccntena() } - /// Whether to enable exception tracing + /// Enables exception tracing #[cfg(not(armv6m))] #[inline] - pub fn enable_exception_tracing(&mut self, bit: bool) { + pub fn enable_exception_tracing(&mut self) { unsafe { self.ctrl.modify(|mut r| { - r.set_exctrcena(bit); + r.set_exctrcena(true); + r + }); + } + } + + /// Disables exception tracing + #[cfg(not(armv6m))] + #[inline] + pub fn disable_exception_tracing(&mut self) { + unsafe { + self.ctrl.modify(|mut r| { + r.set_exctrcena(false); r }); } |