diff options
author | 2021-12-15 11:13:45 -0800 | |
---|---|---|
committer | 2021-12-19 12:13:47 -0800 | |
commit | a77280cedc9b08e4b280445444fe4eab02d43ba7 (patch) | |
tree | 52460e1143f7c5915f2482374713660ee4b488ae | |
parent | cd66d339cce732e6cea18441c7ae414209091340 (diff) | |
download | cortex-m-a77280cedc9b08e4b280445444fe4eab02d43ba7.tar.gz cortex-m-a77280cedc9b08e4b280445444fe4eab02d43ba7.tar.zst cortex-m-a77280cedc9b08e4b280445444fe4eab02d43ba7.zip |
enable has_cycle_counter for all arches. armv6m always returns false
-rw-r--r-- | src/peripheral/dwt.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/peripheral/dwt.rs b/src/peripheral/dwt.rs index a45032f..24305ed 100644 --- a/src/peripheral/dwt.rs +++ b/src/peripheral/dwt.rs @@ -120,10 +120,13 @@ impl DWT { } /// Returns `true` if the implementation supports a cycle counter - #[cfg(not(armv6m))] #[inline] pub fn has_cycle_counter(&self) -> bool { - !self.ctrl.read().nocyccnt() + #[cfg(not(armv6m))] + return !self.ctrl.read().nocyccnt(); + + #[cfg(armv6m)] + return false; } /// Returns `true` if the implementation the profiling counters |