Module rtic_monotonics::nrf::timer

source ·
Expand description

Monotonic implementation for the 32-bit timers of the nRF series.

Not all timers are available on all parts. Ensure that only the available timers are exposed by having the correct nrf52* feature enabled for rtic-monotonics.

§Example

use rtic_monotonics::nrf::timer::prelude::*;
nrf_timer0_monotonic!(Mono);

fn init() {
    // Start the monotonic
    Mono::start(timer);
}

async fn usage() {
    loop {
         // Use the monotonic
         let timestamp = Mono::now();
         Mono::delay(100.millis()).await;
    }
}

Modules§

  • Common definitions and traits for using the nRF Timer monotonics

Structs§