Struct esp32c3_hal::Rtc
source · pub struct Rtc<'d> {
pub rwdt: Rwdt,
pub swd: Swd,
/* private fields */
}
Expand description
Low-power Management
Fields§
§rwdt: Rwdt
§swd: Swd
Implementations§
source§impl<'d> Rtc<'d>
impl<'d> Rtc<'d>
pub fn new(rtc_cntl: impl Peripheral<P = RTC_CNTL> + 'd) -> Rtc<'d>
pub fn estimate_xtal_frequency(&mut self) -> u32
sourcepub fn get_time_raw(&self) -> u64
pub fn get_time_raw(&self) -> u64
read the current value of the rtc time registers.
sourcepub fn get_time_us(&self) -> u64
pub fn get_time_us(&self) -> u64
read the current value of the rtc time registers in microseconds.
sourcepub fn get_time_ms(&self) -> u64
pub fn get_time_ms(&self) -> u64
read the current value of the rtc time registers in milliseconds
sourcepub fn sleep_deep<'a>(
&mut self,
wake_sources: &[&'a dyn WakeSource],
delay: &mut Delay
) -> !
pub fn sleep_deep<'a>( &mut self, wake_sources: &[&'a dyn WakeSource], delay: &mut Delay ) -> !
enter deep sleep and wake with the provided wake_sources
sourcepub fn sleep_light<'a>(
&mut self,
wake_sources: &[&'a dyn WakeSource],
delay: &mut Delay
)
pub fn sleep_light<'a>( &mut self, wake_sources: &[&'a dyn WakeSource], delay: &mut Delay )
enter light sleep and wake with the provided wake_sources
sourcepub fn sleep<'a>(
&mut self,
config: &RtcSleepConfig,
wake_sources: &[&'a dyn WakeSource],
delay: &mut Delay
)
pub fn sleep<'a>( &mut self, config: &RtcSleepConfig, wake_sources: &[&'a dyn WakeSource], delay: &mut Delay )
enter sleep with the provided config
and wake with the provided
wake_sources
Auto Trait Implementations§
impl<'d> RefUnwindSafe for Rtc<'d>
impl<'d> Send for Rtc<'d>
impl<'d> Sync for Rtc<'d>
impl<'d> Unpin for Rtc<'d>
impl<'d> !UnwindSafe for Rtc<'d>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more