pub struct WakeupTimer<'r> { /* private fields */ }
Expand description

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

Error returned when a countdown can’t be canceled.

Tries to cancel this countdown. Read more

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.

The unit of time used by this timer

Non-blockingly “waits” until the count down finishes 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

Returns the argument unchanged.

Calls U::from(self).

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

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.