rp-pac

Crates

git

Versions

rp235x

Flavors

Struct rp_pac::powman::regs::Pwrup

source ·
#[repr(transparent)]
pub struct Pwrup(pub u32);
Expand description

4 GPIO powerup events can be configured to wake the chip up from a low power state. The pwrups are level/edge sensitive and can be set to trigger on a high/rising or low/falling event The number of gpios available depends on the package option. An invalid selection will be ignored source = 0 selects gpio0 . . source = 47 selects gpio47 source = 48 selects qspi_ss source = 49 selects qspi_sd0 source = 50 selects qspi_sd1 source = 51 selects qspi_sd2 source = 52 selects qspi_sd3 source = 53 selects qspi_sclk level = 0 triggers the pwrup when the source is low level = 1 triggers the pwrup when the source is high

Tuple Fields§

§0: u32

Implementations§

source§

impl Pwrup

source

pub const fn source(&self) -> u8

source

pub fn set_source(&mut self, val: u8)

source

pub const fn enable(&self) -> bool

Set to 1 to enable the wakeup source. Set to 0 to disable the wakeup source and clear a pending wakeup event. If using edge detect a latched edge needs to be cleared by writing 1 to the status register also.

source

pub fn set_enable(&mut self, val: bool)

Set to 1 to enable the wakeup source. Set to 0 to disable the wakeup source and clear a pending wakeup event. If using edge detect a latched edge needs to be cleared by writing 1 to the status register also.

source

pub const fn direction(&self) -> Direction

source

pub fn set_direction(&mut self, val: Direction)

source

pub const fn mode(&self) -> Mode

Edge or level detect. Edge will detect a 0 to 1 transition (or 1 to 0 transition). Level will detect a 1 or 0. Both types of event get latched into the current_pwrup_req register.

source

pub fn set_mode(&mut self, val: Mode)

Edge or level detect. Edge will detect a 0 to 1 transition (or 1 to 0 transition). Level will detect a 1 or 0. Both types of event get latched into the current_pwrup_req register.

source

pub const fn status(&self) -> bool

Status of gpio wakeup. Write to 1 to clear a latched edge detect.

source

pub fn set_status(&mut self, val: bool)

Status of gpio wakeup. Write to 1 to clear a latched edge detect.

source

pub const fn raw_status(&self) -> bool

Value of selected gpio pin (only if enable == 1)

source

pub fn set_raw_status(&mut self, val: bool)

Value of selected gpio pin (only if enable == 1)

Trait Implementations§

source§

impl Clone for Pwrup

source§

fn clone(&self) -> Pwrup

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for Pwrup

source§

fn default() -> Pwrup

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

impl PartialEq for Pwrup

source§

fn eq(&self, other: &Pwrup) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Pwrup

source§

impl Eq for Pwrup

source§

impl StructuralPartialEq for Pwrup

Auto Trait Implementations§

§

impl Freeze for Pwrup

§

impl RefUnwindSafe for Pwrup

§

impl Send for Pwrup

§

impl Sync for Pwrup

§

impl Unpin for Pwrup

§

impl UnwindSafe for Pwrup

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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>,

source§

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>,

source§

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.