#[repr(transparent)]pub struct Devcmdstat(pub u32);Expand description
USB Device Command/Status register
Tuple Fields§
§0: u32Implementations§
Source§impl Devcmdstat
impl Devcmdstat
Sourcepub const fn set_dev_addr(&mut self, val: u8)
pub const fn set_dev_addr(&mut self, val: u8)
USB device address.
Sourcepub const fn set_dev_en(&mut self, val: bool)
pub const fn set_dev_en(&mut self, val: bool)
USB device enable.
Sourcepub const fn force_needclk(&self) -> bool
pub const fn force_needclk(&self) -> bool
Forces the NEEDCLK output to always be on:.
Sourcepub const fn set_force_needclk(&mut self, val: bool)
pub const fn set_force_needclk(&mut self, val: bool)
Forces the NEEDCLK output to always be on:.
Sourcepub const fn force_vbus(&self) -> bool
pub const fn force_vbus(&self) -> bool
If this bit is set to 1, the VBUS voltage indicators from the PHY are overruled.
Sourcepub const fn set_force_vbus(&mut self, val: bool)
pub const fn set_force_vbus(&mut self, val: bool)
If this bit is set to 1, the VBUS voltage indicators from the PHY are overruled.
Sourcepub const fn set_lpm_sup(&mut self, val: bool)
pub const fn set_lpm_sup(&mut self, val: bool)
LPM Supported:.
Sourcepub const fn intonnak_ao(&self) -> bool
pub const fn intonnak_ao(&self) -> bool
Interrupt on NAK for interrupt and bulk OUT EP:.
Sourcepub const fn set_intonnak_ao(&mut self, val: bool)
pub const fn set_intonnak_ao(&mut self, val: bool)
Interrupt on NAK for interrupt and bulk OUT EP:.
Sourcepub const fn intonnak_ai(&self) -> bool
pub const fn intonnak_ai(&self) -> bool
Interrupt on NAK for interrupt and bulk IN EP:.
Sourcepub const fn set_intonnak_ai(&mut self, val: bool)
pub const fn set_intonnak_ai(&mut self, val: bool)
Interrupt on NAK for interrupt and bulk IN EP:.
Sourcepub const fn intonnak_co(&self) -> bool
pub const fn intonnak_co(&self) -> bool
Interrupt on NAK for control OUT EP:.
Sourcepub const fn set_intonnak_co(&mut self, val: bool)
pub const fn set_intonnak_co(&mut self, val: bool)
Interrupt on NAK for control OUT EP:.
Sourcepub const fn intonnak_ci(&self) -> bool
pub const fn intonnak_ci(&self) -> bool
Interrupt on NAK for control IN EP:.
Sourcepub const fn set_intonnak_ci(&mut self, val: bool)
pub const fn set_intonnak_ci(&mut self, val: bool)
Interrupt on NAK for control IN EP:.
Sourcepub const fn set_lpm_sus(&mut self, val: bool)
pub const fn set_lpm_sus(&mut self, val: bool)
Device status - LPM Suspend.
Sourcepub const fn set_lpm_rewp(&mut self, val: bool)
pub const fn set_lpm_rewp(&mut self, val: bool)
LPM Remote Wake-up Enabled by USB host.
Sourcepub const fn speed(&self) -> u8
pub const fn speed(&self) -> u8
This field indicates the speed at which the device operates: 00b: reserved 01b: full-speed 10b: high-speed 11b: super-speed (reserved for future use).
Sourcepub const fn set_speed(&mut self, val: u8)
pub const fn set_speed(&mut self, val: u8)
This field indicates the speed at which the device operates: 00b: reserved 01b: full-speed 10b: high-speed 11b: super-speed (reserved for future use).
Sourcepub const fn set_dcon_c(&mut self, val: bool)
pub const fn set_dcon_c(&mut self, val: bool)
Device status - connect change.
Sourcepub const fn set_dsus_c(&mut self, val: bool)
pub const fn set_dsus_c(&mut self, val: bool)
Device status - suspend change.
Sourcepub const fn set_dres_c(&mut self, val: bool)
pub const fn set_dres_c(&mut self, val: bool)
Device status - reset change.
Sourcepub const fn vbus_debounced(&self) -> bool
pub const fn vbus_debounced(&self) -> bool
This bit indicates if VBUS is detected or not.
Sourcepub const fn set_vbus_debounced(&mut self, val: bool)
pub const fn set_vbus_debounced(&mut self, val: bool)
This bit indicates if VBUS is detected or not.
Sourcepub const fn phy_test_mode(&self) -> u8
pub const fn phy_test_mode(&self) -> u8
This field is written by firmware to put the PHY into a test mode as defined by the USB2.0 specification.
Sourcepub const fn set_phy_test_mode(&mut self, val: u8)
pub const fn set_phy_test_mode(&mut self, val: u8)
This field is written by firmware to put the PHY into a test mode as defined by the USB2.0 specification.
Trait Implementations§
Source§impl Clone for Devcmdstat
impl Clone for Devcmdstat
Source§fn clone(&self) -> Devcmdstat
fn clone(&self) -> Devcmdstat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more