aboutsummaryrefslogtreecommitdiff
path: root/src/peripheral/syst.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2022-01-10 00:34:19 +0000
committerGravatar GitHub <noreply@github.com> 2022-01-10 00:34:19 +0000
commitb581ec74b295811387b4a2a4f4cfeeb91ec788d8 (patch)
tree1ca4c100db43e8f9af2a371a06cc2d12d3586e39 /src/peripheral/syst.rs
parent2e2cb78a842f702f78f74e470216eb5139b4a264 (diff)
parentf8e17d80e12dc35d9d5cf1a45e06abc48678b694 (diff)
downloadcortex-m-b581ec74b295811387b4a2a4f4cfeeb91ec788d8.tar.gz
cortex-m-b581ec74b295811387b4a2a4f4cfeeb91ec788d8.tar.zst
cortex-m-b581ec74b295811387b4a2a4f4cfeeb91ec788d8.zip
Merge #386
386: deprecate `ptr()` function for the v0.7.x series r=adamgreig a=TDHolmes Deprecating `ptr()` in `v0.7.x` series per #370 Co-authored-by: Tyler Holmes <tyler@holmesengineering.com>
Diffstat (limited to 'src/peripheral/syst.rs')
-rw-r--r--src/peripheral/syst.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/peripheral/syst.rs b/src/peripheral/syst.rs
index abcd00b..345acc2 100644
--- a/src/peripheral/syst.rs
+++ b/src/peripheral/syst.rs
@@ -98,14 +98,14 @@ impl SYST {
#[inline]
pub fn get_current() -> u32 {
// NOTE(unsafe) atomic read with no side effects
- unsafe { (*Self::ptr()).cvr.read() }
+ unsafe { (*Self::PTR).cvr.read() }
}
/// Gets reload value
#[inline]
pub fn get_reload() -> u32 {
// NOTE(unsafe) atomic read with no side effects
- unsafe { (*Self::ptr()).rvr.read() }
+ unsafe { (*Self::PTR).rvr.read() }
}
/// Returns the reload value with which the counter would wrap once per 10
@@ -116,14 +116,14 @@ impl SYST {
#[inline]
pub fn get_ticks_per_10ms() -> u32 {
// NOTE(unsafe) atomic read with no side effects
- unsafe { (*Self::ptr()).calib.read() & SYST_COUNTER_MASK }
+ unsafe { (*Self::PTR).calib.read() & SYST_COUNTER_MASK }
}
/// Checks if an external reference clock is available
#[inline]
pub fn has_reference_clock() -> bool {
// NOTE(unsafe) atomic read with no side effects
- unsafe { (*Self::ptr()).calib.read() & SYST_CALIB_NOREF == 0 }
+ unsafe { (*Self::PTR).calib.read() & SYST_CALIB_NOREF == 0 }
}
/// Checks if the counter wrapped (underflowed) since the last check
@@ -161,7 +161,7 @@ impl SYST {
#[inline]
pub fn is_precise() -> bool {
// NOTE(unsafe) atomic read with no side effects
- unsafe { (*Self::ptr()).calib.read() & SYST_CALIB_SKEW == 0 }
+ unsafe { (*Self::PTR).calib.read() & SYST_CALIB_SKEW == 0 }
}
/// Sets clock source