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]
fn is_counter_enabled(&self) -> bool
[src]
Checks if counter is enabled
fn enable_counter(&self)
[src]
Enables counter
fn disable_counter(&self)
[src]
Disables counter
fn is_interrupt_enabled(&self) -> bool
[src]
Checks if SysTick interrupt is enabled
fn enable_interrupt(&self)
[src]
Enables SysTick interrupt
fn disable_interrupt(&self)
[src]
Disables SysTick interrupt
fn get_clock_source(&self) -> SystClkSource
[src]
Gets clock source
fn set_clock_source(&self, clk_source: SystClkSource)
[src]
Sets clock source
fn has_wrapped(&self) -> bool
[src]
Checks if the counter wrapped (underflowed) since the last check
fn get_reload(&self) -> u32
[src]
Gets reload value
fn set_reload(&self, value: u32)
[src]
Sets reload value
Valid values are between 1
and 0x00ffffff
.
fn get_current(&self) -> u32
[src]
Gets current value
fn clear_current(&self)
[src]
Clears current value to 0
After calling clear_current()
, the next call to has_wrapped()
will return false
.
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).
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.
fn has_reference_clock(&self) -> bool
[src]
Checks if an external reference clock is available