Struct rubble_nrf5x::timer::BleTimer [−][src]
pub struct BleTimer<T: NrfTimerExt> {
inner: T,
next: Instant,
interrupt_enabled: bool,
}
Expand description
Implements Rubble’s Timer
trait for the timers on the nRF chip.
(note: on the nRF51, only TIMER0
is usable)
Fields
inner: T
next: Instant
interrupt_enabled: bool
Implementations
Configures the timer interrupt to fire according to next
.
Checks whether this timer’s interrupt is pending.
This will return true
when interrupt handler should execute. To prevent spurious wakeups,
the handler must check that this is true
when it gets executed. The handler should
acknowledge the interrupt by calling clear_interrupt
, otherwise the handler will be run
immediately after returning.
Clears a pending interrupt and disables generation of further interrupts.
Creates a new StampSource
using this timer.
The StampSource
can be used to obtain the current time, but can not do anything else. This
restriction makes it safe to use even when the BleTimer
it was created from is modified.