[−][src]Struct stm32l0xx_hal::rtc::WakeupTimer
The RTC wakeup timer
This timer can be used in two ways:
- Continually call
wait
until it returnsOk(())
. - 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]
T: Into<Self::Time>,
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.
fn wait(&mut self) -> Result<(), Void>
[src]
impl<'_> Periodic for WakeupTimer<'_>
[src]
impl<'_> Cancel for WakeupTimer<'_>
[src]
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]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self