nxp-pac

Crates

git

Versions

mcxa577

Flavors

Pcfg

Struct Pcfg 

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

Port Configuration. Configure type/address before enabling the port; TYPE must not change while enabled. Only one port may be OOB; if multiple ports are marked OOB, only the lowest-numbered port receives host writes. Only one port may be used for mastering and only one for flash; attempts to configure a second port are refused. Mastering, OOB and flash are not available with LPC. DIRECTION may change with caution. ERRORIGN polarity conflicts between its field and DIRECTION prose. STALLRD/STALLWR are documented here, but 52.4.2 says application stalling is no longer supported: raw fields do not guarantee this feature. TYPE=8 follows the register definition; 52.3.1.3.3 incorrectly calls Mailbox Shared 1010b.

Tuple Fields§

§0: u32

Implementations§

Source§

impl Pcfg

Source

pub const fn type_(&self) -> PcfgType

TYPE: Port interaction type; do not change while enabled. Only one port may be OOB; if multiple ports are marked OOB, only the lowest-numbered port receives host writes. Only one port may be used for mastering and only one for flash; attempts to configure a second port are refused. Mastering, OOB and flash are not available with LPC. Legal codes: 0=unconfigured, 1=ACPI endpoint, 2=ACPI index-and-data, 4=bus-master memory, 5=bus-master flash, 8=mailbox shared, 9=mailbox single, 10=mailbox split, 11=mailbox OOB split, 12=mailbox OEM; other codes reserved.

Source

pub const fn set_type_(&mut self, val: PcfgType)

TYPE: Port interaction type; do not change while enabled. Only one port may be OOB; if multiple ports are marked OOB, only the lowest-numbered port receives host writes. Only one port may be used for mastering and only one for flash; attempts to configure a second port are refused. Mastering, OOB and flash are not available with LPC. Legal codes: 0=unconfigured, 1=ACPI endpoint, 2=ACPI index-and-data, 4=bus-master memory, 5=bus-master flash, 8=mailbox shared, 9=mailbox single, 10=mailbox split, 11=mailbox OOB split, 12=mailbox OEM; other codes reserved.

Source

pub const fn direction(&self) -> PcfgDirection

Port Direction. Encodings: 0: Endpoint or index-and-data: bidirectional (normal). Mailbox Single: unenforced. Mailbox Split or Mailbox Shared: bidirectional.; 1: Endpoint or index-and-data: ignore read. Mailbox Single: write only. Mailbox Split or Mailbox Shared: ignore read.; 2: Endpoint or index-and-data: ignore write. Mailbox Single: read only. Mailbox Split or Mailbox Shared: ignore write.; 3: Endpoint or index-and-data: Ignore both. Mailbox Single: ignore both. Mailbox Split or Mailbox Shared: ignore both.

Source

pub const fn set_direction(&mut self, val: PcfgDirection)

Port Direction. Encodings: 0: Endpoint or index-and-data: bidirectional (normal). Mailbox Single: unenforced. Mailbox Split or Mailbox Shared: bidirectional.; 1: Endpoint or index-and-data: ignore read. Mailbox Single: write only. Mailbox Split or Mailbox Shared: ignore read.; 2: Endpoint or index-and-data: ignore write. Mailbox Single: read only. Mailbox Split or Mailbox Shared: ignore write.; 3: Endpoint or index-and-data: Ignore both. Mailbox Single: ignore both. Mailbox Split or Mailbox Shared: ignore both.

Source

pub const fn mbintall(&self) -> bool

Mailbox: map interrupt

Source

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

Mailbox: map interrupt

Source

pub const fn stallrd(&self) -> bool

Stall on any read

Source

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

Stall on any read

Source

pub const fn stallwr(&self) -> bool

Stall on write

Source

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

Stall on write

Source

pub const fn errorign(&self) -> bool

Error Origin. Encodings: 0: The host receives an error when trying to perform a read or write that is blocked by PnCFG[DIRECTION].; 1: Ignored silently. Reads return FFh for each byte if ignored (host property). In either case, PnSTAT[INTERR] bit becomes 1, causing an interrupt if masked for it.

Source

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

Error Origin. Encodings: 0: The host receives an error when trying to perform a read or write that is blocked by PnCFG[DIRECTION].; 1: Ignored silently. Reads return FFh for each byte if ignored (host property). In either case, PnSTAT[INTERR] bit becomes 1, causing an interrupt if masked for it.

Trait Implementations§

Source§

impl Clone for Pcfg

Source§

fn clone(&self) -> Pcfg

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 Pcfg

Source§

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

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

impl Default for Pcfg

Source§

fn default() -> Pcfg

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

impl PartialEq for Pcfg

Source§

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

Source§

impl Eq for Pcfg

Source§

impl StructuralPartialEq for Pcfg

Auto Trait Implementations§

§

impl Freeze for Pcfg

§

impl RefUnwindSafe for Pcfg

§

impl Send for Pcfg

§

impl Sync for Pcfg

§

impl Unpin for Pcfg

§

impl UnwindSafe for Pcfg

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.