[][src]Struct stm32l0xx_hal::rtc::WakeupTimer

pub struct WakeupTimer<'r> { /* fields omitted */ }

The RTC wakeup timer

This timer can be used in two ways:

  1. Continually call wait until it returns Ok(()).
  2. Set up the RTC interrupt.

If you use an interrupt, you should still call wait once, after the interrupt fired. This should return Ok(()) immediately. Doing this will reset the timer flag. If you don't do this, the interrupt will not fire again, if you go to sleep.

You don't need to call wait, if you call cancel, as that also resets the flag. Restarting the timer by calling start will also reset the flag.

Trait Implementations

impl<'_> CountDown for WakeupTimer<'_>[src]

type Time = u32

The unit of time used by this timer

fn start<T>(&mut self, delay: T) where
    T: Into<Self::Time>, 
[src]

Starts the wakeup timer

The delay argument specifies the timer delay in seconds. Up to 17 bits of delay are supported, giving us a range of over 36 hours.

Panics

The delay argument must be in the range 1 <= delay <= 2^17. Panics, if delay is outside of that range.

impl<'_> Periodic for WakeupTimer<'_>[src]

impl<'_> Cancel for WakeupTimer<'_>[src]

type Error = Void

Error returned when a countdown can't be canceled.

Auto Trait Implementations

impl<'r> Unpin for WakeupTimer<'r>

impl<'r> Send for WakeupTimer<'r>

impl<'r> !Sync for WakeupTimer<'r>

Blanket Implementations

impl<T> From<T> for T[src]

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

type Error = !

The type returned in the event of a conversion error.

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

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self