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: Tnext: Instantinterrupt_enabled: bool

Implementations

Initializes the timer.

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.

Provides access to the raw peripheral. Use with caution.

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.

Trait Implementations

Obtain the current time as an Instant. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.