rp-pac

Crates

git

Versions

rp2040

Flavors

Struct rp_pac::usb::regs::UsbphyDirect

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

Note that most functions are driven directly from usb_fsls controller. This register allows more detailed control/status from the USB PHY. Useful for debug but not expected to be used in normal operation Use in conjunction with usbphy_direct_override register

Tuple Fields§

§0: u32

Implementations§

source§

impl UsbphyDirect

source

pub const fn dp_pullup_hisel(&self) -> bool

when dp_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2

source

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

when dp_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2

source

pub const fn dp_pullup_en(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller

source

pub const fn dp_pulldn_en(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPP

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPP

source

pub const fn dm_pullup_hisel(&self) -> bool

when dm_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2

source

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

when dm_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2

source

pub const fn dm_pullup_en(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpu on DPM

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpu on DPM

source

pub const fn dm_pulldn_en(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPM

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPM

source

pub const fn tx_dp_oe(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving TX_SEMODE=1, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving TX_SEMODE=1, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving

source

pub const fn tx_dm_oe(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored. TX_SEMODE=1, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored. TX_SEMODE=1, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving

source

pub const fn tx_dp(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP TX_SEMODE=1, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP TX_SEMODE=1, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP

source

pub const fn tx_dm(&self) -> bool

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored TX_SEMODE=1, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM

source

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

Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored TX_SEMODE=1, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM

source

pub const fn rx_pd(&self) -> bool

source

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

source

pub const fn tx_pd(&self) -> bool

source

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

source

pub const fn tx_fsslew(&self) -> bool

source

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

source

pub const fn tx_diffmode(&self) -> bool

source

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

source

pub const fn rx_dd(&self) -> bool

Status bit from USB PHY RX Diff data

source

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

Status bit from USB PHY RX Diff data

source

pub const fn rx_dp(&self) -> bool

Status bit from USB PHY DPP pin state

source

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

Status bit from USB PHY DPP pin state

source

pub const fn rx_dm(&self) -> bool

Status bit from USB PHY DPM pin state

source

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

Status bit from USB PHY DPM pin state

source

pub const fn dp_ovcn(&self) -> bool

Status bit from USB PHY

source

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

Status bit from USB PHY

source

pub const fn dm_ovcn(&self) -> bool

Status bit from USB PHY

source

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

Status bit from USB PHY

source

pub const fn dp_ovv(&self) -> bool

Status bit from USB PHY

source

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

Status bit from USB PHY

source

pub const fn dm_ovv(&self) -> bool

Status bit from USB PHY

source

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

Status bit from USB PHY

Trait Implementations§

source§

impl Clone for UsbphyDirect

source§

fn clone(&self) -> UsbphyDirect

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 UsbphyDirect

source§

fn default() -> UsbphyDirect

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

impl PartialEq for UsbphyDirect

source§

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

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

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

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

impl Copy for UsbphyDirect

source§

impl Eq for UsbphyDirect

source§

impl StructuralPartialEq for UsbphyDirect

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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>,

source§

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>,

source§

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.