Struct cortexm4::systick::SysTick
[−]
[src]
pub struct SysTick { regs: &'static Registers, hertz: u32, }
The ARM Cortex-M4 SysTick peripheral
Documented in the Cortex-M4 Devices Generic User Guide, Chapter 4.4 (pagees 249-252)
Fields
regs: &'static Registers
hertz: u32
Methods
impl SysTick
[src]
pub unsafe fn new() -> SysTick
[src]
Initialize the SysTick
with default values
Use this constructor if the core implementation has a pre-calibration value in hardware.
pub unsafe fn new_with_calibration(clock_speed: u32) -> SysTick
[src]
Initialize the SysTick
with an explicit clock speed
Use this constructor if the core implementation does not have a pre-calibration value.
clock_speed
- the frequency of SysTick tics in Hertz. For example, if the SysTick is driven by the CPU clock, it is simply the CPU speed.
fn hertz(&self) -> u32
[src]
Trait Implementations
impl SysTick for SysTick
[src]
fn set_timer(&self, us: u32)
[src]
Sets the timer as close as possible to the given interval in microseconds. Read more
fn value(&self) -> u32
[src]
Returns the time left in microseconds
fn overflowed(&self) -> bool
[src]
Returns true if the timer has expired
fn reset(&self)
[src]
Resets the timer Read more
fn enable(&self, with_interrupt: bool)
[src]
Enables the timer Read more