#[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)