Struct teensy4_bsp::SysTick[][src]

pub struct SysTick(_);
This is supported on crate feature systick only.
Expand description

A type that represents the system timer, SYSTICK

SysTick implements the embedded_hal’s DelayMs trait. It may be used to implement simple, blocking delays.

Example

use teensy4_bsp as bsp;

let core_peripherals = cortex_m::Peripherals::take().unwrap();
let mut systick = bsp::SysTick::new(core_peripherals.SYST);

systick.delay(50 /* ms */);

Implementations

Convert the normal cortex-m SYST peripheral into a Teensy SysTick

new will configure the systick counter for a 1ms tick. When new() returns, systick is counting.

Safety

new is safe because it assumes that it has the only SYST instance. The only way you could acquire two SysTick is if you’ve unsafely obtained a second SYST instance.

Blocks for ms milliseconds

Trait Implementations

Pauses execution for ms milliseconds

Pauses execution for ms milliseconds

Pauses execution for ms milliseconds

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.