aboutsummaryrefslogtreecommitdiff
path: root/src/peripheral/dwt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/peripheral/dwt.rs')
-rw-r--r--src/peripheral/dwt.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/peripheral/dwt.rs b/src/peripheral/dwt.rs
index 1f7655a..4da7131 100644
--- a/src/peripheral/dwt.rs
+++ b/src/peripheral/dwt.rs
@@ -65,12 +65,14 @@ pub struct Comparator {
impl DWT {
/// Enables the cycle counter
#[cfg(not(armv6m))]
+ #[inline]
pub fn enable_cycle_counter(&mut self) {
unsafe { self.ctrl.modify(|r| r | 1) }
}
/// Returns the current clock cycle count
#[cfg(not(armv6m))]
+ #[inline]
pub fn get_cycle_count() -> u32 {
// NOTE(unsafe) atomic read with no side effects
unsafe { (*Self::ptr()).cyccnt.read() }