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.