RtcBackend

Struct RtcBackend 

Source
pub struct RtcBackend;
Expand description

An RTC-based TimerQueueBackend using half-period counting that uses the RTC in mode 1.

Implementations§

Source§

impl RtcBackend

Source

pub unsafe fn interrupt_handler()

RTC interrupt handler called before control passes to the TimerQueue handler`.

§Safety

This should only be called from the RTC interrupt handler.

Source

pub fn _start(rtc: Rtc)

Starts the clock.

Do not use this function directly.

Use the crate level macros instead, then call start on the monotonic.

Trait Implementations§

Source§

impl TimerQueueBackend for RtcBackend

Source§

type Ticks = u64

The type for ticks.
Source§

fn now() -> Self::Ticks

Get the current time.
Source§

fn enable_timer()

Optional. This is used to save power, this is called when the timer queue is not empty. Read more
Source§

fn disable_timer()

Optional. This is used to save power, this is called when the timer queue is empty. Read more
Source§

fn on_interrupt()

Optional. Runs on interrupt before any timer queue handling.
Source§

fn set_compare(instant: Self::Ticks)

Set the compare value of the timer interrupt. Read more
Source§

fn clear_compare_flag()

Clear the compare interrupt flag.
Source§

fn pend_interrupt()

Pend the timer’s interrupt.
Source§

fn timer_queue() -> &'static TimerQueue<Self>

Returns a reference to the underlying timer queue.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.