[][src]Trait rubble_nrf52810::timer::NrfTimerExt

pub trait NrfTimerExt: Sealed {
    unsafe fn duplicate(&self) -> Self;
fn init(&mut self);
fn set_interrupt(&mut self, at: Instant);
fn clear_interrupt(&mut self);
fn is_pending(&self) -> bool;
fn now(&self) -> Instant; }

Extension trait implemented for the nRF timer peripherals.

We use CC[0] to read the counter value, and CC[1] to set timer interrupts.

Required methods

unsafe fn duplicate(&self) -> Self

fn init(&mut self)

Initialize the timer so that it counts at a rate of 1 MHz.

fn set_interrupt(&mut self, at: Instant)

Configures the timer's interrupt to fire at the given Instant.

fn clear_interrupt(&mut self)

Disables or acknowledges this timer's interrupt.

fn is_pending(&self) -> bool

Returns whether a timer interrupt is currently pending.

This must be called by the interrupt handler to avoid spurious timer events.

fn now(&self) -> Instant

Obtains the current time as an Instant.

Loading content...

Implementations on Foreign Types

impl NrfTimerExt for TIMER0[src]

impl NrfTimerExt for TIMER1[src]

impl NrfTimerExt for TIMER2[src]

Loading content...

Implementors

Loading content...