Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TDHolmes committed Jan 7, 2022
1 parent 968485f commit b666289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/peripheral/dwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl DWT {
pub fn has_cycle_counter() -> bool {
#[cfg(not(armv6m))]
// NOTE(unsafe) atomic read with no side effects
return !unsafe { (*DWT::PTR).ctrl.read().nocyccnt() };
return unsafe { !(*DWT::PTR).ctrl.read().nocyccnt() };

#[cfg(armv6m)]
return false;
Expand All @@ -164,7 +164,7 @@ impl DWT {
#[inline]
pub fn has_profiling_counter() -> bool {
// NOTE(unsafe) atomic read with no side effects
!unsafe { (*DWT::PTR).ctrl.read().noprfcnt() }
unsafe { !(*DWT::PTR).ctrl.read().noprfcnt() }
}

/// Enables the cycle counter
Expand Down

0 comments on commit b666289

Please sign in to comment.