[−][src]Module lpc55s6x_hal::utick
API for the micro-tick timer (UTICK)
The entry point to this API is [UTICK
].
The UTICK peripheral is described in the user manual, chapter 26. It is driven by the FRO 1Mhz clock and has a microsecond resolution.
Examples
extern crate lpc55S6x_hal; extern crate nb; use lpc55S6x_hal::prelude::*; use lpc55S6x_hal::Peripherals; let mut p = Peripherals::take().unwrap(); let mut syscon = p.SYSCON.split(); let mut timer = p.UTICK.enable(&mut syscon.handle); // Start the timer at 1_000_000. Sine the UTICK tuner 1 MHz, // this translates to a one second wait. timer.start(1_000_000u32); while let Err(nb::Error::WouldBlock) = timer.wait() { // do stuff }
Please refer to the [examples in the repository] for more example code.
Structs
UTICK | Interface to the micro-tick timer (UTICK) |
Traits
Clock | A clock that is usable by the micro-tick timer (UTICK) |