diff options
author | 2022-01-06 14:14:30 -0800 | |
---|---|---|
committer | 2022-01-06 14:17:56 -0800 | |
commit | 2785022ab5fadaaccbdb60b544f4a43b650f146c (patch) | |
tree | 859edefe3af118159f337ffac7812e6c7522637d /src/peripheral/syst.rs | |
parent | 2e2cb78a842f702f78f74e470216eb5139b4a264 (diff) | |
download | cortex-m-2785022ab5fadaaccbdb60b544f4a43b650f146c.tar.gz cortex-m-2785022ab5fadaaccbdb60b544f4a43b650f146c.tar.zst cortex-m-2785022ab5fadaaccbdb60b544f4a43b650f146c.zip |
deprecate `ptr()` function for the 7.x series
Diffstat (limited to 'src/peripheral/syst.rs')
-rw-r--r-- | src/peripheral/syst.rs | 10 |
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 |