pub struct SysTick { /* private fields */ }
Expand description
The ARM Cortex-M SysTick peripheral
Documented in the Cortex-MX Devices Generic User Guide, Chapter 4.4
Implementations§
Source§impl SysTick
impl SysTick
Sourcepub unsafe fn new() -> SysTick
pub unsafe fn new() -> SysTick
Initialize the SysTick
with default values
Use this constructor if the core implementation has a pre-calibration value in hardware.
Sourcepub unsafe fn new_with_calibration(clock_speed: u32) -> SysTick
pub unsafe fn new_with_calibration(clock_speed: u32) -> SysTick
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.
Sourcepub unsafe fn new_with_calibration_and_external_clock(
clock_speed: u32,
) -> SysTick
pub unsafe fn new_with_calibration_and_external_clock( clock_speed: u32, ) -> SysTick
Initialize the SysTick
with an explicit clock speed and external source
Use this constructor if the core implementation does not have a pre-calibration value and you need an external clock source for the Systick.
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.
Trait Implementations§
Source§impl SchedulerTimer for SysTick
impl SchedulerTimer for SysTick
Source§fn start(&self, us: NonZeroU32)
fn start(&self, us: NonZeroU32)
Start a timer for a process timeslice. The
us
argument is the length
of the timeslice in microseconds. Read moreSource§fn arm(&self)
fn arm(&self)
Arm the SchedulerTimer timer and ensure an interrupt will be generated. Read more
Source§fn disarm(&self)
fn disarm(&self)
Disarm the SchedulerTimer timer indicating an interrupt is no longer
required. Read more
Source§fn get_remaining_us(&self) -> Option<NonZeroU32>
fn get_remaining_us(&self) -> Option<NonZeroU32>
Return the number of microseconds remaining in the process’s timeslice
if the timeslice is still active. Read more
Auto Trait Implementations§
impl Freeze for SysTick
impl RefUnwindSafe for SysTick
impl Send for SysTick
impl Sync for SysTick
impl Unpin for SysTick
impl UnwindSafe for SysTick
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more