[−][src]Trait rubble_nrf52810::timer::NrfTimerExt
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
.