Module rtic_monotonics::imxrt
source · Expand description
Monotonic
implementations for i.MX RT’s GPT peripherals.
§Example
use rtic_monotonics::imxrt::prelude::*;
imxrt_gpt1_monotonic!(Mono, 1_000_000);
fn init() {
// Obtain ownership of the timer register block.
let gpt1 = unsafe { imxrt_ral::gpt::GPT1::instance() };
// Configure the timer tick rate as specified earlier
todo!("Configure the gpt1 peripheral to a tick rate of 1_000_000");
// Start the monotonic
Mono::start(gpt1);
}
async fn usage() {
loop {
// Use the monotonic
let timestamp = Mono::now();
Mono::delay(100.millis()).await;
}
}
Re-exports§
pub use imxrt_ral as ral;
Modules§
- Common definitions and traits for using the i.MX RT monotonics
Structs§
- GPT based
TimerQueueBackend
. - GPT based
TimerQueueBackend
.