diff options
author | 2022-03-27 10:21:28 -0700 | |
---|---|---|
committer | 2022-03-27 10:21:28 -0700 | |
commit | b4181a8a313ef7686da3f64e3947ce96b9788037 (patch) | |
tree | e144a319fcd4762ad83586035e968985d44ce42c /src | |
parent | c2e77c5aee4a2c587f4bb3dc4a91a6bd02b322a6 (diff) | |
download | cortex-m-b4181a8a313ef7686da3f64e3947ce96b9788037.tar.gz cortex-m-b4181a8a313ef7686da3f64e3947ce96b9788037.tar.zst cortex-m-b4181a8a313ef7686da3f64e3947ce96b9788037.zip |
Add on-target tests
Diffstat (limited to 'src')
-rw-r--r-- | src/peripheral/dwt.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/peripheral/dwt.rs b/src/peripheral/dwt.rs index c5f7bc9..72575d3 100644 --- a/src/peripheral/dwt.rs +++ b/src/peripheral/dwt.rs @@ -155,6 +155,18 @@ impl DWT { } } + /// Disables the cycle counter + #[cfg(not(armv6m))] + #[inline] + pub fn disable_cycle_counter(&mut self) { + unsafe { + self.ctrl.modify(|mut r| { + r.set_cyccntena(false); + r + }); + } + } + /// Returns `true` if the cycle counter is enabled #[cfg(not(armv6m))] #[inline] |