cortexm::systick

Struct SysTick

Source
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

Source

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.

Source

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.
Source

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

Source§

fn start(&self, us: NonZeroU32)

Start a timer for a process timeslice. The us argument is the length of the timeslice in microseconds. Read more
Source§

fn reset(&self)

Reset the SchedulerTimer. Read more
Source§

fn arm(&self)

Arm the SchedulerTimer timer and ensure an interrupt will be generated. Read more
Source§

fn disarm(&self)

Disarm the SchedulerTimer timer indicating an interrupt is no longer required. Read more
Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.