Embassy
embassy-usb-synopsys-otg

Crates

git

Versions

default

Flavors

Struct embassy_usb_synopsys_otg::otg_v1::regs::Hprt

source ·
#[repr(transparent)]
pub struct Hprt(pub u32);
Expand description

Host port control and status register

Tuple Fields§

§0: u32

Implementations§

source§

impl Hprt

source

pub const fn pcsts(&self) -> bool

Port connect status

source

pub fn set_pcsts(&mut self, val: bool)

Port connect status

source

pub const fn pcdet(&self) -> bool

Port connect detected

source

pub fn set_pcdet(&mut self, val: bool)

Port connect detected

source

pub const fn pena(&self) -> bool

Port enable

source

pub fn set_pena(&mut self, val: bool)

Port enable

source

pub const fn penchng(&self) -> bool

Port enable/disable change

source

pub fn set_penchng(&mut self, val: bool)

Port enable/disable change

source

pub const fn poca(&self) -> bool

Port overcurrent active

source

pub fn set_poca(&mut self, val: bool)

Port overcurrent active

source

pub const fn pocchng(&self) -> bool

Port overcurrent change

source

pub fn set_pocchng(&mut self, val: bool)

Port overcurrent change

source

pub const fn pres(&self) -> bool

Port resume

source

pub fn set_pres(&mut self, val: bool)

Port resume

source

pub const fn psusp(&self) -> bool

Port suspend

source

pub fn set_psusp(&mut self, val: bool)

Port suspend

source

pub const fn prst(&self) -> bool

Port reset

source

pub fn set_prst(&mut self, val: bool)

Port reset

source

pub const fn plsts(&self) -> u8

Port line status

source

pub fn set_plsts(&mut self, val: u8)

Port line status

source

pub const fn ppwr(&self) -> bool

Port power

source

pub fn set_ppwr(&mut self, val: bool)

Port power

source

pub const fn ptctl(&self) -> u8

Port test control

source

pub fn set_ptctl(&mut self, val: u8)

Port test control

source

pub const fn pspd(&self) -> u8

Port speed

source

pub fn set_pspd(&mut self, val: u8)

Port speed

Trait Implementations§

source§

impl Clone for Hprt

source§

fn clone(&self) -> Hprt

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for Hprt

source§

fn default() -> Hprt

Returns the “default value” for a type. Read more
source§

impl PartialEq for Hprt

source§

fn eq(&self, other: &Hprt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Hprt

source§

impl Eq for Hprt

source§

impl StructuralPartialEq for Hprt

Auto Trait Implementations§

§

impl Freeze for Hprt

§

impl RefUnwindSafe for Hprt

§

impl Send for Hprt

§

impl Sync for Hprt

§

impl Unpin for Hprt

§

impl UnwindSafe for Hprt

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.