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,
}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
Reads config u8.
Sourcepub fn read_config_u16(&self, offset: u8) -> u16
pub fn read_config_u16(&self, offset: u8) -> u16
Reads config u16.
Sourcepub fn read_config_u32(&self, offset: u8) -> u32
pub fn read_config_u32(&self, offset: u8) -> u32
Reads config u32.
Sourcepub fn write_config_u8(&self, offset: u8, value: u8)
pub fn write_config_u8(&self, offset: u8, value: u8)
Writes config u8.
Sourcepub fn write_config_u16(&self, offset: u8, value: u16)
pub fn write_config_u16(&self, offset: u8, value: u16)
Writes config u16.
Sourcepub fn write_config_u32(&self, offset: u8, value: u32)
pub fn write_config_u32(&self, offset: u8, value: u32)
Writes config u32.
Sourcepub fn read_bar_raw(&self, bar_index: u8) -> Option<u64>
pub fn read_bar_raw(&self, bar_index: u8) -> Option<u64>
Reads bar raw.
Sourcepub fn enable_bus_master(&self)
pub fn enable_bus_master(&self)
Enables bus master.
Sourcepub fn enable_memory_space(&self)
pub fn enable_memory_space(&self)
Enables memory space.
Sourcepub fn enable_io_space(&self)
pub fn enable_io_space(&self)
Enables io space.
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