diff options
Diffstat (limited to 'src')
-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 |