Struct cortexm::systick::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: u32)

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<u32>

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> SizedTypeProperties for T

source§

#[doc(hidden)] const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
source§

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

§

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>,

§

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.