#[repr(transparent)]pub struct P2addr(pub u32);Expand description
The Port Address register is used to set the mapped address in the LPC/eSPI memory space. For normal Ports, this is a 16-bit location in IO space or a 32-bit offset into PCIe address mapped space. It is not used for OOB, Bus Mastering, or Flash; see the PnOMFLEN register for those. For Endpoints, it is the base of a dword (64 bits). For Index/Data, it is the base of a word (32 bits). For mailbox memory, the address is modulus the length of the mailbox (x2 for both directions). So, if a 16-byte mailbox (single), the offset must have bits 3:0 set to 0 (that is &~0xF). If split directions, then normally bits 4:0 would be set to 0 (that is &~0x1F).
Tuple Fields§
§0: u32Implementations§
Source§impl P2addr
impl P2addr
Sourcepub const fn off(&self) -> u16
pub const fn off(&self) -> u16
Offset from 0 or the selected mapped base for matching memory or IO
Sourcepub const fn set_off(&mut self, val: u16)
pub const fn set_off(&mut self, val: u16)
Offset from 0 or the selected mapped base for matching memory or IO
Sourcepub const fn base_or_asz(&self) -> P2addrBaseOrAsz
pub const fn base_or_asz(&self) -> P2addrBaseOrAsz
The meaning is dependent on type of port:
Sourcepub const fn set_base_or_asz(&mut self, val: P2addrBaseOrAsz)
pub const fn set_base_or_asz(&mut self, val: P2addrBaseOrAsz)
The meaning is dependent on type of port:
Sourcepub const fn idxoff(&self) -> u8
pub const fn idxoff(&self) -> u8
For index/register only: This is the byte offset of the Index relative to the data (before or after, based on IDX1ST)
Sourcepub const fn set_idxoff(&mut self, val: u8)
pub const fn set_idxoff(&mut self, val: u8)
For index/register only: This is the byte offset of the Index relative to the data (before or after, based on IDX1ST)
Sourcepub const fn idx1st(&self) -> bool
pub const fn idx1st(&self) -> bool
For index/data register only: Is 1 if index is lower address than data (e
Sourcepub const fn set_idx1st(&mut self, val: bool)
pub const fn set_idx1st(&mut self, val: bool)
For index/data register only: Is 1 if index is lower address than data (e