#[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
impl Pwrup
pub const fn source(&self) -> u8
pub fn set_source(&mut self, val: u8)
sourcepub const fn enable(&self) -> bool
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.
sourcepub fn set_enable(&mut self, val: bool)
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.
pub const fn direction(&self) -> Direction
pub fn set_direction(&mut self, val: Direction)
sourcepub const fn mode(&self) -> Mode
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.
sourcepub fn set_mode(&mut self, val: Mode)
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.
sourcepub const fn status(&self) -> bool
pub const fn status(&self) -> bool
Status of gpio wakeup. Write to 1 to clear a latched edge detect.
sourcepub fn set_status(&mut self, val: bool)
pub fn set_status(&mut self, val: bool)
Status of gpio wakeup. Write to 1 to clear a latched edge detect.
sourcepub const fn raw_status(&self) -> bool
pub const fn raw_status(&self) -> bool
Value of selected gpio pin (only if enable == 1)
sourcepub fn set_raw_status(&mut self, val: bool)
pub fn set_raw_status(&mut self, val: bool)
Value of selected gpio pin (only if enable == 1)
Trait Implementations§
impl Copy for Pwrup
impl Eq for Pwrup
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> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)