Skip to content

Commit a77280c

Browse files
committed
enable has_cycle_counter for all arches. armv6m always returns false
1 parent cd66d33 commit a77280c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/peripheral/dwt.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,13 @@ impl DWT {
120120
}
121121

122122
/// Returns `true` if the implementation supports a cycle counter
123-
#[cfg(not(armv6m))]
124123
#[inline]
125124
pub fn has_cycle_counter(&self) -> bool {
126-
!self.ctrl.read().nocyccnt()
125+
#[cfg(not(armv6m))]
126+
return !self.ctrl.read().nocyccnt();
127+
128+
#[cfg(armv6m)]
129+
return false;
127130
}
128131

129132
/// Returns `true` if the implementation the profiling counters

0 commit comments

Comments
 (0)