#[repr(transparent)]pub struct State(pub u32);
Expand description
This register controls the power state of the 4 power domains. The current power state is indicated in POWMAN_STATE_CURRENT which is read-only. To change the state, write to POWMAN_STATE_REQ. The coding of POWMAN_STATE_CURRENT & POWMAN_STATE_REQ corresponds to the power states defined in the datasheet: bit 3 = SWCORE bit 2 = XIP cache bit 1 = SRAM0 bit 0 = SRAM1 0 = powered up 1 = powered down When POWMAN_STATE_REQ is written, the POWMAN_STATE_WAITING flag is set while the Power Manager determines what is required. If an invalid transition is requested the Power Manager will still register the request in POWMAN_STATE_REQ but will also set the POWMAN_BAD_REQ flag. It will then implement the power-up requests and ignore the power down requests. To do nothing would risk entering an unrecoverable lock-up state. Invalid requests are: any combination of power up and power down requests any request that results in swcore boing powered and xip unpowered If the request is to power down the switched-core domain then POWMAN_STATE_WAITING stays active until the processors halt. During this time the POWMAN_STATE_REQ field can be re-written to change or cancel the request. When the power state transition begins the POWMAN_STATE_WAITING_flag is cleared, the POWMAN_STATE_CHANGING flag is set and POWMAN register writes are ignored until the transition completes.
Tuple Fields§
§0: u32
Implementations§
source§impl State
impl State
pub const fn current(&self) -> u8
pub fn set_current(&mut self, val: u8)
pub const fn req(&self) -> u8
pub fn set_req(&mut self, val: u8)
pub const fn req_ignored(&self) -> bool
pub fn set_req_ignored(&mut self, val: bool)
sourcepub const fn pwrup_while_waiting(&self) -> bool
pub const fn pwrup_while_waiting(&self) -> bool
Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down.
sourcepub fn set_pwrup_while_waiting(&mut self, val: bool)
pub fn set_pwrup_while_waiting(&mut self, val: bool)
Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down.
sourcepub const fn bad_sw_req(&self) -> bool
pub const fn bad_sw_req(&self) -> bool
Bad software initiated state request. No action taken.
sourcepub fn set_bad_sw_req(&mut self, val: bool)
pub fn set_bad_sw_req(&mut self, val: bool)
Bad software initiated state request. No action taken.
sourcepub const fn bad_hw_req(&self) -> bool
pub const fn bad_hw_req(&self) -> bool
Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up)
sourcepub fn set_bad_hw_req(&mut self, val: bool)
pub fn set_bad_hw_req(&mut self, val: bool)
Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up)
pub const fn waiting(&self) -> bool
pub fn set_waiting(&mut self, val: bool)
pub const fn changing(&self) -> bool
pub fn set_changing(&mut self, val: bool)
Trait Implementations§
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
)