Expand description
Monotonic
implementation for the nRF Real Time Clocks (RTC).
§Example
use rtic_monotonics::nrf::rtc::prelude::*;
// Create the type `Mono`. It will manage the RTC timer, and
// run with a resolution of 30.517 µs (32,768 ticks per second).
nrf_rtc0_monotonic!(Mono);
fn init() {
// Start the monotonic, passing ownership of the appropriate RTC object
// relevant nRF52x PAC.
Mono::start(RTC0);
}
async fn usage() {
loop {
// You can use the monotonic to get the time...
let timestamp = Mono::now();
// ...and you can use it to add a delay to this async function
Mono::delay(100.millis()).await;
}
}
Modules§
- prelude
- Common definitions and traits for using the nRF RTC monotonics
Structs§
- Rtc0
Backend - RTC based
TimerQueueBackend
. - Rtc1
Backend - RTC based
TimerQueueBackend
. - Rtc2
Backend - RTC based
TimerQueueBackend
.