pub struct Header {Show 14 fields
pub vendor_id: u16,
pub device_id: u16,
pub command: Command,
pub status: Status<'P'>,
pub revision_id: u8,
pub class_code: ClassCode,
pub cache_line_size: u8,
pub latency_timer: u8,
pub is_multi_function: bool,
pub header_type: HeaderType,
pub bist: BuiltInSelfTest,
pub capabilities_pointer: u8,
pub interrupt_line: u8,
pub interrupt_pin: InterruptPin,
}Expand description
Main structure
Fields§
§vendor_id: u16Identifies the manufacturer of the device. Where valid IDs are allocated by PCI-SIG to ensure uniqueness and 0xFFFF is an invalid value that will be returned on read accesses to Configuration Space registers of non-existent devices.
device_id: u16Identifies the particular device. Where valid IDs are allocated by the vendor
command: Command§status: Status<'P'>§revision_id: u8Device specific revision identifier.
class_code: ClassCode§cache_line_size: u8Specifies the system cache line size in 32-bit units. A device can limit the number of cacheline sizes it can support, if a unsupported value is written to this field, the device will behave as if a value of 0 was written.
latency_timer: u8Specifies the latency timer in units of PCI bus clocks.
is_multi_function: boolUsed to identify a multi-function device
header_type: HeaderType§bist: BuiltInSelfTest§capabilities_pointer: u8Used to point to a linked list of new capabilities implemented by this device
interrupt_line: u8Specifies which input of the system interrupt controllers the device’s interrupt pin is connected to and is implemented by any device that makes use of an interrupt pin. For the x86 architecture this register corresponds to the PIC IRQ numbers 0-15 (and not I/O APIC IRQ numbers) and a value of 0xFF defines no connection.
interrupt_pin: InterruptPinImplementations§
Source§impl Header
impl Header
Sourcepub const TOTAL_SIZE: usize = 0x40
pub const TOTAL_SIZE: usize = 0x40
Predefined header region is 64 bytes long
Sourcepub const COMMON_SIZE: usize = 0x10
pub const COMMON_SIZE: usize = 0x10
The first 16 bytes are defined the same for all types of devices