#[repr(transparent)]pub struct Portsc1(pub u32);Expand description
Port Status and Control register
Tuple Fields§
§0: u32Implementations§
Source§impl Portsc1
impl Portsc1
Sourcepub const fn ccs(&self) -> bool
pub const fn ccs(&self) -> bool
Current Connect Status: Logic 1 indicates a device is present on the port.
Sourcepub const fn set_ccs(&mut self, val: bool)
pub const fn set_ccs(&mut self, val: bool)
Current Connect Status: Logic 1 indicates a device is present on the port.
Sourcepub const fn csc(&self) -> bool
pub const fn csc(&self) -> bool
Connect Status Change: Logic 1 means that the value of CCS has changed.
Sourcepub const fn set_csc(&mut self, val: bool)
pub const fn set_csc(&mut self, val: bool)
Connect Status Change: Logic 1 means that the value of CCS has changed.
Sourcepub const fn pedc(&self) -> bool
pub const fn pedc(&self) -> bool
Port Enabled/Disabled Change: Logic 1 means that the value of PED has changed.
Sourcepub const fn set_pedc(&mut self, val: bool)
pub const fn set_pedc(&mut self, val: bool)
Port Enabled/Disabled Change: Logic 1 means that the value of PED has changed.
Sourcepub const fn oca(&self) -> bool
pub const fn oca(&self) -> bool
Over-current active: Logic 1 means that this port has an over-current condition.
Sourcepub const fn set_oca(&mut self, val: bool)
pub const fn set_oca(&mut self, val: bool)
Over-current active: Logic 1 means that this port has an over-current condition.
Sourcepub const fn occ(&self) -> bool
pub const fn occ(&self) -> bool
Over-current change: Logic 1 means that the value of OCA has changed.
Sourcepub const fn set_occ(&mut self, val: bool)
pub const fn set_occ(&mut self, val: bool)
Over-current change: Logic 1 means that the value of OCA has changed.
Sourcepub const fn fpr(&self) -> bool
pub const fn fpr(&self) -> bool
Force Port Resume: Logic 1 means resume (K-state) detected or driven on the port.
Sourcepub const fn set_fpr(&mut self, val: bool)
pub const fn set_fpr(&mut self, val: bool)
Force Port Resume: Logic 1 means resume (K-state) detected or driven on the port.
Sourcepub const fn susp(&self) -> bool
pub const fn susp(&self) -> bool
Suspend: Logic 1 means port is in the suspend state.Logic 0 means the port is not suspended.
Sourcepub const fn set_susp(&mut self, val: bool)
pub const fn set_susp(&mut self, val: bool)
Suspend: Logic 1 means port is in the suspend state.Logic 0 means the port is not suspended.
Sourcepub const fn set_pr(&mut self, val: bool)
pub const fn set_pr(&mut self, val: bool)
Port Reset: Logic 1 means the port is in the reset state.
Sourcepub const fn sus_l1(&self) -> bool
pub const fn sus_l1(&self) -> bool
Suspend using L1 0b = Suspend using L2 1b = Suspend using L1 When this bit is set to a 1 and a non-zero value is specified in the Device Address field, the host controller will generate an LPM Token to enter the L1 state whenever software writes a one to the Suspend bit, as well as L1 exit timing during any device or host-initiated resume.
Sourcepub const fn set_sus_l1(&mut self, val: bool)
pub const fn set_sus_l1(&mut self, val: bool)
Suspend using L1 0b = Suspend using L2 1b = Suspend using L1 When this bit is set to a 1 and a non-zero value is specified in the Device Address field, the host controller will generate an LPM Token to enter the L1 state whenever software writes a one to the Suspend bit, as well as L1 exit timing during any device or host-initiated resume.
Sourcepub const fn ls(&self) -> u8
pub const fn ls(&self) -> u8
Line Status: This field reflects the current logical levels of the DP (bit 11) and DM (bit 10) signal lines.
Sourcepub const fn set_ls(&mut self, val: u8)
pub const fn set_ls(&mut self, val: u8)
Line Status: This field reflects the current logical levels of the DP (bit 11) and DM (bit 10) signal lines.
Sourcepub const fn pp(&self) -> bool
pub const fn pp(&self) -> bool
Port Power: The function of this bit depends on the value of the Port Power Control (PPC) bit in the HCSPARAMS register.
Sourcepub const fn set_pp(&mut self, val: bool)
pub const fn set_pp(&mut self, val: bool)
Port Power: The function of this bit depends on the value of the Port Power Control (PPC) bit in the HCSPARAMS register.
Sourcepub const fn pic(&self) -> u8
pub const fn pic(&self) -> u8
Port Indicator Control : Writing to this field has no effect if the P_INDICATOR bit in the HCSPARAMS register is logic 0.
Sourcepub const fn set_pic(&mut self, val: u8)
pub const fn set_pic(&mut self, val: u8)
Port Indicator Control : Writing to this field has no effect if the P_INDICATOR bit in the HCSPARAMS register is logic 0.
Sourcepub const fn ptc(&self) -> u8
pub const fn ptc(&self) -> u8
Port Test Control: A non-zero value indicates that the port is operating in the test mode as indicated by the value.
Sourcepub const fn set_ptc(&mut self, val: u8)
pub const fn set_ptc(&mut self, val: u8)
Port Test Control: A non-zero value indicates that the port is operating in the test mode as indicated by the value.
Sourcepub const fn pspd(&self) -> u8
pub const fn pspd(&self) -> u8
Port Speed: 00b: Low-speed 01b: Full-speed 10b: High-speed 11b: Reserved.
Sourcepub const fn set_pspd(&mut self, val: u8)
pub const fn set_pspd(&mut self, val: u8)
Port Speed: 00b: Low-speed 01b: Full-speed 10b: High-speed 11b: Reserved.
Sourcepub const fn woo(&self) -> bool
pub const fn woo(&self) -> bool
Wake on overcurrent enable: Writing this bit to a one enables the port to be sensitive to overcurrent conditions as wake-up events.
Sourcepub const fn set_woo(&mut self, val: bool)
pub const fn set_woo(&mut self, val: bool)
Wake on overcurrent enable: Writing this bit to a one enables the port to be sensitive to overcurrent conditions as wake-up events.
Sourcepub const fn sus_stat(&self) -> u8
pub const fn sus_stat(&self) -> u8
These two bits are used by software to determine whether the most recent L1 suspend request was successful: 00b: Success-state transition was successful (ACK) 01b: Not Yet - Device was unable to enter the L1 state at this time (NYET) 10b: Not supported - Device does not support the L1 state (STALL) 11b: Timeout/Error - Device failed to respond or an error occurred.
Sourcepub const fn set_sus_stat(&mut self, val: u8)
pub const fn set_sus_stat(&mut self, val: u8)
These two bits are used by software to determine whether the most recent L1 suspend request was successful: 00b: Success-state transition was successful (ACK) 01b: Not Yet - Device was unable to enter the L1 state at this time (NYET) 10b: Not supported - Device does not support the L1 state (STALL) 11b: Timeout/Error - Device failed to respond or an error occurred.
Sourcepub const fn set_dev_add(&mut self, val: u8)
pub const fn set_dev_add(&mut self, val: u8)
Device Address for LPM tokens.