[−][src]Struct pci_types::EndpointHeader
Endpoints have a Type-0 header, so the remainder of the header is of the form:
ⓘThis example is not tested
32 16 0 +-----------------------------------------------------------+ 0x00 | | | Predefined region of header | | | | | +-----------------------------------------------------------+ | Base Address Register 0 | 0x10 | | +-----------------------------------------------------------+ | Base Address Register 1 | 0x14 | | +-----------------------------------------------------------+ | Base Address Register 2 | 0x18 | | +-----------------------------------------------------------+ | Base Address Register 3 | 0x1c | | +-----------------------------------------------------------+ | Base Address Register 4 | 0x20 | | +-----------------------------------------------------------+ | Base Address Register 5 | 0x24 | | +-----------------------------------------------------------+ | CardBus CIS Pointer | 0x28 | | +----------------------------+------------------------------+ | Subsystem ID | Subsystem vendor ID | 0x2c | | | +----------------------------+------------------------------+ | Expansion ROM Base Address | 0x30 | | +--------------------------------------------+--------------+ | Reserved | Capabilities | 0x34 | | Pointer | +--------------------------------------------+--------------+ | Reserved | 0x38 | | +--------------+--------------+--------------+--------------+ | Max_Lat | Min_Gnt | Interrupt | Interrupt | 0x3c | | | line | line | +--------------+--------------+--------------+--------------+
Implementations
impl EndpointHeader
[src]
pub fn from_header(
header: PciHeader,
access: &impl ConfigRegionAccess
) -> Option<EndpointHeader>
[src]
header: PciHeader,
access: &impl ConfigRegionAccess
) -> Option<EndpointHeader>
pub fn header(&self) -> PciHeader
[src]
pub fn bar(&self, slot: u8, access: &impl ConfigRegionAccess) -> Option<Bar>
[src]
Get the contents of a BAR in a given slot. Empty bars will return None
.
Note
64-bit memory BARs use two slots, so if one is decoded in e.g. slot #0, this method should not be called for slot #1
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,