[−][src]Struct teensy4_bsp::SysTick
This is supported on crate feature
systick
only.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
impl SysTick
[src]
pub fn new(systick: SYST) -> SysTick
[src]
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.
pub fn delay(&mut self, ms: u32)
[src]
Blocks for ms
milliseconds
Trait Implementations
impl DelayMs<u16> for SysTick
[src]
impl DelayMs<u32> for SysTick
[src]
impl DelayMs<u8> for SysTick
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,