pub struct PciDevice {
pub address: PciAddress,
pub vendor_id: u16,
pub device_id: u16,
pub class_code: u8,
pub subclass: u8,
pub prog_if: u8,
pub revision: u8,
pub header_type: u8,
pub interrupt_line: u8,
pub interrupt_pin: u8,
}Expand description
PCI device information
Fields§
§address: PciAddress§vendor_id: u16§device_id: u16§class_code: u8§subclass: u8§prog_if: u8§revision: u8§header_type: u8§interrupt_line: u8§interrupt_pin: u8Implementations§
Source§impl PciDevice
impl PciDevice
Sourcepub fn read_config_u8(&self, offset: u8) -> u8
pub fn read_config_u8(&self, offset: u8) -> u8
Read a configuration register (8-bit)
Sourcepub fn read_config_u16(&self, offset: u8) -> u16
pub fn read_config_u16(&self, offset: u8) -> u16
Read a configuration register (16-bit)
Sourcepub fn read_config_u32(&self, offset: u8) -> u32
pub fn read_config_u32(&self, offset: u8) -> u32
Read a configuration register (32-bit)
Sourcepub fn write_config_u8(&self, offset: u8, value: u8)
pub fn write_config_u8(&self, offset: u8, value: u8)
Write to a configuration register (8-bit)
Sourcepub fn write_config_u16(&self, offset: u8, value: u16)
pub fn write_config_u16(&self, offset: u8, value: u16)
Write to a configuration register (16-bit)
Sourcepub fn write_config_u32(&self, offset: u8, value: u32)
pub fn write_config_u32(&self, offset: u8, value: u32)
Write to a configuration register (32-bit)
Sourcepub fn read_bar_raw(&self, bar_index: u8) -> Option<u64>
pub fn read_bar_raw(&self, bar_index: u8) -> Option<u64>
Get the raw BAR value (for legacy compatibility)
Sourcepub fn enable_bus_master(&self)
pub fn enable_bus_master(&self)
Enable bus mastering for this device
Sourcepub fn enable_memory_space(&self)
pub fn enable_memory_space(&self)
Enable memory space access for this device
Sourcepub fn enable_io_space(&self)
pub fn enable_io_space(&self)
Enable I/O space access for this device
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PciDevice
impl RefUnwindSafe for PciDevice
impl Send for PciDevice
impl Sync for PciDevice
impl Unpin for PciDevice
impl UnsafeUnpin for PciDevice
impl UnwindSafe for PciDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more