[−][src]Struct cortex_m_systick_countdown::SysTickCalibration
Configuration information for setting the SysTick reload value.
Fields
ticks_per_ms: u32
The number of ticks of the SysTick’s clock source to get to 1ms.
Note that reload values should typically be one fewer than the number of clock cycles, since an extra one is always needed to detect the rollover and reload the counter.
Methods
impl SysTickCalibration
[src]
pub fn built_in() -> Option<SysTickCalibration>
[src]
Gets the calibration from the chip’s built-in "ticks per 10ms" value.
Returns an Option
because this value is is not present on all devices
(SAMD51 for example seems to not have it, since its processor speed is
configurable). In those cases, use
from_clock_hz
instead.
pub fn from_clock_hz(hz: u32) -> SysTickCalibration
[src]
Creates a calibration from the underlying frequency of the clock that drives SysTick. This typically seems to be the same frequency that the processor is currently running at.
For SAMD51 processors, if you don’t want to hard-code a known size, you can get this from the gclck0 frequency.
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self