Struct Uart1WakeupSource

Source
pub struct Uart1WakeupSource { /* private fields */ }
Available on crate feature unstable only.
Expand description

UART1 wakeup source

The chip can be woken up by reverting RXD for multiple cycles until the number of rising edges is equal to or greater than the given value.

Note that the character which triggers wakeup (and any characters before it) will not be received by the UART after wakeup. This means that the external device typically needs to send an extra character to trigger wakeup before sending the data.

After waking-up from UART, you should send some extra data through the UART port in Active mode, so that the internal wakeup indication signal can be cleared. Otherwise, the next UART wake-up would trigger with two less rising edges than the configured threshold value.

Wakeup from light sleep takes some time, so not every character sent to the UART can be received by the application.

This wakeup source can be used to wake up from light sleep only.

Implementations§

Source§

impl Uart1WakeupSource

Source

pub fn new(threshold: u16) -> Self

Create a new instance of UART1 wakeup source>

§Panics

Panics if threshold is out of bounds.

Trait Implementations§

Source§

impl WakeSource for Uart1WakeupSource

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 Uart1WakeupSource

§

impl RefUnwindSafe for Uart1WakeupSource

§

impl Send for Uart1WakeupSource

§

impl Sync for Uart1WakeupSource

§

impl Unpin for Uart1WakeupSource

§

impl UnwindSafe for Uart1WakeupSource

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.