Struct esp32_hal::Rtc

source ·
pub struct Rtc<'d> {
    pub rwdt: Rwdt,
    /* private fields */
}
Expand description

Low-power Management

Fields§

§rwdt: Rwdt

Implementations§

source§

impl<'d> Rtc<'d>

source

pub fn new(rtc_cntl: impl Peripheral<P = LPWR> + 'd) -> Rtc<'d>

source

pub fn estimate_xtal_frequency(&mut self) -> u32

source

pub fn get_time_raw(&self) -> u64

read the current value of the rtc time registers.

source

pub fn get_time_us(&self) -> u64

read the current value of the rtc time registers in microseconds.

source

pub fn get_time_ms(&self) -> u64

read the current value of the rtc time registers in milliseconds

source

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

source

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

source

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.