Skip to main content

UlpWakeupSource

Struct UlpWakeupSource 

Source
pub struct UlpWakeupSource { /* private fields */ }
Expand description

ULP wakeup source

Wake up from ULP software interrupt, and/or ULP-RISCV Trap condition. Both of these triggers are enabled by default. This source will clear any outstanding software interrupts prior to entering sleep, by default.

S2 supports the following triggers (Refer to ESP32-S2 Technical Reference Manual, Table 9.4-3. Wakeup Source)

  • ULP-FSM software interrupt (unsure if this ALSO supports ULP-RISCV software interrupt)
  • ULP-RISCV Trap

S3 supports the following triggers (Refer to ESP32-S3 Technical Reference Manual, Table 10.4-3. Wakeup Source)

  • ULP-FSM software interrupt and ULP-RISCV software interrupt
  • ULP-RISCV Trap

This wakeup source can be used to wake up from both light and deep sleep.

Implementations§

Source§

impl UlpWakeupSource

Source

pub const fn new() -> Self

Create a new instance of WakeFromUlpWakeupSource

Source

pub fn set_wake_on_interrupt(self, value: bool) -> Self

Enable wakeup triggered by software interrupt from ULP-FSM or ULP-RISCV

Source

pub fn set_wake_on_trap(self, value: bool) -> Self

Enable wakeup triggered by ULP-RISCV Trap

Source

pub fn set_clear_interrupts_on_sleep(self, value: bool) -> Self

Enable clearing of latched wake-up interrupts prior to entering sleep

Source

pub fn clear_interrupts(&self)

Clears the wake-up interrupts

Trait Implementations§

Source§

impl Default for UlpWakeupSource

Available on crate feature unstable only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl WakeSource for UlpWakeupSource

Available on crate feature unstable only.
Source§

fn apply( &self, _rtc: &Rtc<'_>, triggers: &mut WakeTriggers, sleep_config: &mut RtcSleepConfig, )

Configures the RTC and applies the wakeup triggers.

Auto Trait Implementations§

§

impl Freeze for UlpWakeupSource

§

impl RefUnwindSafe for UlpWakeupSource

§

impl Send for UlpWakeupSource

§

impl Sync for UlpWakeupSource

§

impl Unpin for UlpWakeupSource

§

impl UnsafeUnpin for UlpWakeupSource

§

impl UnwindSafe for UlpWakeupSource

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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.
§

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

Performs the conversion.