#[repr(transparent)]pub struct Portmode(pub u32);Expand description
Controls the port if it is attached to the host block or the device block
Tuple Fields§
§0: u32Implementations§
Source§impl Portmode
impl Portmode
Sourcepub const fn dev_enable(&self) -> bool
pub const fn dev_enable(&self) -> bool
If this bit is set to one, one of the ports will behave as a USB device.
Sourcepub const fn set_dev_enable(&mut self, val: bool)
pub const fn set_dev_enable(&mut self, val: bool)
If this bit is set to one, one of the ports will behave as a USB device.
Sourcepub const fn sw_ctrl_pdcom(&self) -> bool
pub const fn sw_ctrl_pdcom(&self) -> bool
This bit indicates if the PHY power-down input is controlled by software or by hardware.
Sourcepub const fn set_sw_ctrl_pdcom(&mut self, val: bool)
pub const fn set_sw_ctrl_pdcom(&mut self, val: bool)
This bit indicates if the PHY power-down input is controlled by software or by hardware.
Sourcepub const fn set_sw_pdcom(&mut self, val: bool)
pub const fn set_sw_pdcom(&mut self, val: bool)
This bit is only used when SW_CTRL_PDCOM is set to 1b.
Trait Implementations§
impl Copy for Portmode
impl Eq for Portmode
impl StructuralPartialEq for Portmode
Auto Trait Implementations§
impl Freeze for Portmode
impl RefUnwindSafe for Portmode
impl Send for Portmode
impl Sync for Portmode
impl Unpin for Portmode
impl UnwindSafe for Portmode
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
Mutably borrows from an owned value. Read more