nxp-pac

Crates

git

Versions

mcxa457

Flavors

Portsc1

Struct Portsc1 

Source
#[repr(transparent)]
pub struct Portsc1(pub u32);
Expand description

Port Status and Control. F70RM 44.6.1.32 (text line 115111). Mixed control/read-only status and W1C CSC, PEC, OCC. Unmasked read-modify-write can acknowledge pending changes. PR and SUSP are read-only in Device mode; PR/FPR self-clear after signaling. PE is always 1 in Device mode; in Host mode software can disable but cannot enable it by writing 1. This chip uses the 16-bit UTMI interface (HWGENERAL reset 0x1015); generic alternative PHY encodings do not establish chip support.

Tuple Fields§

§0: u32

Implementations§

Source§

impl Portsc1

Source

pub const fn ccs(&self) -> bool

Current Connect Status. Read-only status/value; writes do not configure this field. Raw encoding: 0b - No device present or attached; 1b - Device present and attached.

Source

pub const fn set_ccs(&mut self, val: bool)

Current Connect Status. Read-only status/value; writes do not configure this field. Raw encoding: 0b - No device present or attached; 1b - Device present and attached.

Source

pub const fn csc(&self) -> bool

Connect Status Change Flag. Raw encoding: 0b - No change occurred; 1b - Change occurred; 0b - No effect; 1b - Clear the flag.

Source

pub const fn set_csc(&mut self, val: bool)

Connect Status Change Flag. Raw encoding: 0b - No change occurred; 1b - Change occurred; 0b - No effect; 1b - Clear the flag.

Source

pub const fn pe(&self) -> bool

Port Enable and Disable. Raw encoding: 0b - Disables; 1b - Enables.

Source

pub const fn set_pe(&mut self, val: bool)

Port Enable and Disable. Raw encoding: 0b - Disables; 1b - Enables.

Source

pub const fn pec(&self) -> bool

Port Enable and Disable Change Flag. Raw encoding: 0b - No change occurred; 1b - Change occurred; 0b - No effect; 1b - Clear the flag.

Source

pub const fn set_pec(&mut self, val: bool)

Port Enable and Disable Change Flag. Raw encoding: 0b - No change occurred; 1b - Change occurred; 0b - No effect; 1b - Clear the flag.

Source

pub const fn oca(&self) -> bool

Overcurrent Active. Read-only status/value; writes do not configure this field. Raw encoding: 0b - No overcurrent condition exists; 1b - Overcurrent condition exists.

Source

pub const fn set_oca(&mut self, val: bool)

Overcurrent Active. Read-only status/value; writes do not configure this field. Raw encoding: 0b - No overcurrent condition exists; 1b - Overcurrent condition exists.

Source

pub const fn occ(&self) -> bool

Overcurrent Change Flag. Raw encoding: 0b - No change occurred; 1b - Change occurred; 0b - No effect; 1b - Clear the flag.

Source

pub const fn set_occ(&mut self, val: bool)

Overcurrent Change Flag. Raw encoding: 0b - No change occurred; 1b - Change occurred; 0b - No effect; 1b - Clear the flag.

Source

pub const fn fpr(&self) -> bool

Force Port Resume. Raw encoding: 0b - No resume (K-state) detected or driven on port; 1b - Resume detected or driven on port.

Source

pub const fn set_fpr(&mut self, val: bool)

Force Port Resume. Raw encoding: 0b - No resume (K-state) detected or driven on port; 1b - Resume detected or driven on port.

Source

pub const fn susp(&self) -> bool

Suspend. Raw encoding: 0b - Port not in Suspended state; 1b - Port in Suspended state.

Source

pub const fn set_susp(&mut self, val: bool)

Suspend. Raw encoding: 0b - Port not in Suspended state; 1b - Port in Suspended state.

Source

pub const fn pr(&self) -> bool

Port Reset. Raw encoding: 0b - Port not in reset; 1b - Port in reset.

Source

pub const fn set_pr(&mut self, val: bool)

Port Reset. Raw encoding: 0b - Port not in reset; 1b - Port in reset.

Source

pub const fn hsp(&self) -> bool

High-Speed Port. Read-only status/value; writes do not configure this field. Raw encoding: 0b - Not in HS mode; 1b - In HS mode.

Source

pub const fn set_hsp(&mut self, val: bool)

High-Speed Port. Read-only status/value; writes do not configure this field. Raw encoding: 0b - Not in HS mode; 1b - In HS mode.

Source

pub const fn ls(&self) -> u8

Line Status. Read-only status/value; writes do not configure this field. Raw encoding: 00b - SE0; 01b - K-state; 10b - J-state; 11b - Undefined.

Source

pub const fn set_ls(&mut self, val: u8)

Line Status. Read-only status/value; writes do not configure this field. Raw encoding: 00b - SE0; 01b - K-state; 10b - J-state; 11b - Undefined.

Source

pub const fn pp(&self) -> bool

Port Power (PP). Raw encoding: 0b - Off; 1b - On.

Source

pub const fn set_pp(&mut self, val: bool)

Port Power (PP). Raw encoding: 0b - Off; 1b - On.

Source

pub const fn po(&self) -> bool

Port Owner. Read-only status/value; writes do not configure this field.

Source

pub const fn set_po(&mut self, val: bool)

Port Owner. Read-only status/value; writes do not configure this field.

Source

pub const fn pic(&self) -> u8

Port Indicator Control. Raw encoding: 00b - Port indicators are off; 01b - Amber; 10b - Green; 11b - Undefined.

Source

pub const fn set_pic(&mut self, val: u8)

Port Indicator Control. Raw encoding: 00b - Port indicators are off; 01b - Amber; 10b - Green; 11b - Undefined.

Source

pub const fn ptc(&self) -> u8

Port Test Control. Raw encoding: 0000b - TEST_MODE_DISABLE; 0001b - J_STATE; 0010b - K_STATE; 0011b - SE0 (host) or NAK (device); 0100b - Packet; 0101b - FORCE_ENABLE_HS; 0110b - FORCE_ENABLE_FS; 0111b - FORCE_ENABLE_LS; 1000b-1111b - Reserved.

Source

pub const fn set_ptc(&mut self, val: u8)

Port Test Control. Raw encoding: 0000b - TEST_MODE_DISABLE; 0001b - J_STATE; 0010b - K_STATE; 0011b - SE0 (host) or NAK (device); 0100b - Packet; 0101b - FORCE_ENABLE_HS; 0110b - FORCE_ENABLE_FS; 0111b - FORCE_ENABLE_LS; 1000b-1111b - Reserved.

Source

pub const fn wkcn(&self) -> bool

Wake on Connect Enable (WKCNNT_E). Raw encoding: 0b - Disables; 1b - Enables.

Source

pub const fn set_wkcn(&mut self, val: bool)

Wake on Connect Enable (WKCNNT_E). Raw encoding: 0b - Disables; 1b - Enables.

Source

pub const fn wkdc(&self) -> bool

Wake on Disconnect Enable (WKDSCNNT_E). Raw encoding: 0b - Disables; 1b - Enables.

Source

pub const fn set_wkdc(&mut self, val: bool)

Wake on Disconnect Enable (WKDSCNNT_E). Raw encoding: 0b - Disables; 1b - Enables.

Source

pub const fn wkoc(&self) -> bool

Wake on Overcurrent Enable (WKOC).

Source

pub const fn set_wkoc(&mut self, val: bool)

Wake on Overcurrent Enable (WKOC).

Source

pub const fn phcd(&self) -> bool

PHY Low-Power Suspend - Clock Disable (PLPSCD). Raw encoding: 0b - Enables; 1b - Disables.

Source

pub const fn set_phcd(&mut self, val: bool)

PHY Low-Power Suspend - Clock Disable (PLPSCD). Raw encoding: 0b - Enables; 1b - Disables.

Source

pub const fn pfsc(&self) -> bool

Port Force Full Speed Connect. Raw encoding: 0b - Normal operation; 1b - Forced to full speed.

Source

pub const fn set_pfsc(&mut self, val: bool)

Port Force Full Speed Connect. Raw encoding: 0b - Normal operation; 1b - Forced to full speed.

Source

pub const fn pts_2(&self) -> bool

Parallel Transceiver Select 2. Read-only status/value; writes do not configure this field.

Source

pub const fn set_pts_2(&mut self, val: bool)

Parallel Transceiver Select 2. Read-only status/value; writes do not configure this field.

Source

pub const fn pspd(&self) -> u8

Port Speed. Raw encoding: 00b - FS; 01b - LS; 10b - HS; 11b - Undefined.

Source

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

Port Speed. Raw encoding: 00b - FS; 01b - LS; 10b - HS; 11b - Undefined.

Source

pub const fn ptw(&self) -> bool

Parallel Transceiver Width. Read-only status/value; writes do not configure this field. Raw encoding: 0b - 8-bit UTMI interface (60 MHz); 1b - 16-bit UTMI interface (30 MHz).

Source

pub const fn set_ptw(&mut self, val: bool)

Parallel Transceiver Width. Read-only status/value; writes do not configure this field. Raw encoding: 0b - 8-bit UTMI interface (60 MHz); 1b - 16-bit UTMI interface (30 MHz).

Source

pub const fn sts(&self) -> bool

Serial Transceiver Select. Read-only status/value; writes do not configure this field. Raw encoding: 0b - Parallel interface signals; 1b - Serial interface engine.

Source

pub const fn set_sts(&mut self, val: bool)

Serial Transceiver Select. Read-only status/value; writes do not configure this field. Raw encoding: 0b - Parallel interface signals; 1b - Serial interface engine.

Source

pub const fn pts_1(&self) -> u8

Parallel Transceiver Select 1. Read-only status/value; writes do not configure this field. Raw encoding: 000b - UTMI/UTMI+; 001b - Reserved; 010b - ULPI; 011b - Serial/USB 1.1 PHY/IC-USB (FS only); 100b - HSIC.

Source

pub const fn set_pts_1(&mut self, val: u8)

Parallel Transceiver Select 1. Read-only status/value; writes do not configure this field. Raw encoding: 000b - UTMI/UTMI+; 001b - Reserved; 010b - ULPI; 011b - Serial/USB 1.1 PHY/IC-USB (FS only); 100b - HSIC.

Trait Implementations§

Source§

impl Clone for Portsc1

Source§

fn clone(&self) -> Portsc1

Returns a duplicate 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 Debug for Portsc1

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Portsc1

Source§

fn default() -> Portsc1

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

impl PartialEq for Portsc1

Source§

fn eq(&self, other: &Portsc1) -> 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 Portsc1

Source§

impl Eq for Portsc1

Source§

impl StructuralPartialEq for Portsc1

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, dest: *mut u8)

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