Trait rubble_nrf5x::timer::NrfTimerExt [−][src]
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;
}
Expand description
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
fn set_interrupt(&mut self, at: Instant)
fn set_interrupt(&mut self, at: Instant)
Configures the timer’s interrupt to fire at the given Instant
.
fn clear_interrupt(&mut self)
fn clear_interrupt(&mut self)
Disables or acknowledges this timer’s interrupt.
fn is_pending(&self) -> bool
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.