#[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: u32Implementations§
Source§impl Pcfg
impl Pcfg
Sourcepub const fn type_(&self) -> PcfgType
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.
Sourcepub const fn set_type_(&mut self, val: PcfgType)
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.
Sourcepub const fn direction(&self) -> PcfgDirection
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.
Sourcepub const fn set_direction(&mut self, val: PcfgDirection)
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.
Sourcepub const fn set_mbintall(&mut self, val: bool)
pub const fn set_mbintall(&mut self, val: bool)
Mailbox: map interrupt
Sourcepub const fn set_stallrd(&mut self, val: bool)
pub const fn set_stallrd(&mut self, val: bool)
Stall on any read
Sourcepub const fn set_stallwr(&mut self, val: bool)
pub const fn set_stallwr(&mut self, val: bool)
Stall on write
Sourcepub const fn errorign(&self) -> bool
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.
Sourcepub const fn set_errorign(&mut self, val: bool)
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.