pub struct TimerWakeupSource { /* private fields */ }Expand description
Represents a timer wake-up source, triggering an event after a specified duration.
let delay = Delay::new();
let mut rtc = Rtc::new(peripherals.LPWR);
let reason = reset_reason(Cpu::ProCpu);
let wake_reason = wakeup_cause();
println!("{:?} {?}", reason, wake_reason);
let timer = TimerWakeupSource::new(Duration::from_secs(5));
delay.delay_millis(100);
rtc.sleep_deep(&[&timer]);
Implementations§
Trait Implementations§
Source§impl Clone for TimerWakeupSource
Available on crate feature unstable only. 
impl Clone for TimerWakeupSource
Available on crate feature 
unstable only.Source§fn clone(&self) -> TimerWakeupSource
 
fn clone(&self) -> TimerWakeupSource
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for TimerWakeupSource
Available on crate feature unstable only. 
impl Debug for TimerWakeupSource
Available on crate feature 
unstable only.Source§impl Default for TimerWakeupSource
Available on crate feature unstable only. 
impl Default for TimerWakeupSource
Available on crate feature 
unstable only.Source§fn default() -> TimerWakeupSource
 
fn default() -> TimerWakeupSource
Returns the “default value” for a type. Read more
Source§impl WakeSource for TimerWakeupSource
Available on crate feature unstable only. 
impl WakeSource for TimerWakeupSource
Available on crate feature 
unstable only.Source§fn apply(
    &self,
    rtc: &Rtc<'_>,
    triggers: &mut WakeTriggers,
    _sleep_config: &mut RtcSleepConfig,
)
 
fn apply( &self, rtc: &Rtc<'_>, triggers: &mut WakeTriggers, _sleep_config: &mut RtcSleepConfig, )
Configures the RTC and applies the wakeup triggers.
impl Copy for TimerWakeupSource
Available on crate feature 
unstable only.Auto Trait Implementations§
impl Freeze for TimerWakeupSource
impl RefUnwindSafe for TimerWakeupSource
impl Send for TimerWakeupSource
impl Sync for TimerWakeupSource
impl Unpin for TimerWakeupSource
impl UnwindSafe for TimerWakeupSource
Blanket Implementations§
§impl<T> Any for Twhere
    T: 'static + ?Sized,
 
impl<T> Any for Twhere
    T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
    T: ?Sized,
 
impl<T> Borrow<T> for Twhere
    T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
 
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)