Struct cortex_m::peripheral::SYST
[−]
[src]
#[repr(C)]pub struct SYST { pub csr: RW<u32>, pub rvr: RW<u32>, pub cvr: RW<u32>, pub calib: RO<u32>, }
SysTick register block
Fields
csr: RW<u32>
Control and Status
rvr: RW<u32>
Reload Value
cvr: RW<u32>
Current Value
calib: RO<u32>
Calibration Value
Methods
impl SYST
[src]
pub fn is_counter_enabled(&self) -> bool
[src]
Checks if counter is enabled
pub fn enable_counter(&self)
[src]
Enables counter
pub fn disable_counter(&self)
[src]
Disables counter
pub fn is_interrupt_enabled(&self) -> bool
[src]
Checks if SysTick interrupt is enabled
pub fn enable_interrupt(&self)
[src]
Enables SysTick interrupt
pub fn disable_interrupt(&self)
[src]
Disables SysTick interrupt
pub fn get_clock_source(&self) -> SystClkSource
[src]
Gets clock source
pub fn set_clock_source(&self, clk_source: SystClkSource)
[src]
Sets clock source
pub fn has_wrapped(&self) -> bool
[src]
Checks if the counter wrapped (underflowed) since the last check
pub fn get_reload(&self) -> u32
[src]
Gets reload value
pub fn set_reload(&self, value: u32)
[src]
Sets reload value
Valid values are between 1
and 0x00ffffff
.
pub fn get_current(&self) -> u32
[src]
Gets current value
pub fn clear_current(&self)
[src]
Clears current value to 0
After calling clear_current()
, the next call to has_wrapped()
will return false
.
pub fn get_ticks_per_10ms(&self) -> u32
[src]
Returns the reload value with which the counter would wrap once per 10 ms
Returns 0
if the value is not known (e.g. because the clock can
change dynamically).
pub fn is_precise(&self) -> bool
[src]
Checks if the calibration value is precise
Returns false
if using the reload value returned by
get_ticks_per_10ms()
may result in a period significantly deviating
from 10 ms.
pub fn has_reference_clock(&self) -> bool
[src]
Checks if an external reference clock is available