[][src]Struct rubble_nrf52810::timer::BleTimer

pub struct BleTimer<T: NrfTimerExt> { /* fields omitted */ }

Implements Rubble's Timer trait for the timers on the nRF chip.

Methods

impl<T: NrfTimerExt> BleTimer<T>[src]

pub fn init(peripheral: T) -> Self[src]

Initializes the timer.

pub fn configure_interrupt(&mut self, next: NextUpdate)[src]

Configures the timer interrupt to fire according to next.

pub fn is_interrupt_pending(&self) -> bool[src]

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.

pub fn clear_interrupt(&mut self)[src]

Clears a pending interrupt and disables generation of further interrupts.

pub fn inner(&mut self) -> &mut T[src]

Provides access to the raw peripheral. Use with caution.

pub fn create_stamp_source(&self) -> StampSource<T>[src]

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

impl<T: NrfTimerExt> Timer for BleTimer<T>[src]

Auto Trait Implementations

impl<T> Send for BleTimer<T> where
    T: Send

impl<T> Sync for BleTimer<T> where
    T: Sync

Blanket Implementations

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> From for T[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self