pub struct PciHeader(/* private fields */);Expand description
Every PCI configuration region starts with a header made up of two parts:
- a predefined region that identify the function (bytes 
0x00..0x10) - a device-dependent region that depends on the Header Type field
 
The predefined region is of the form:
ⓘ
    32                            16                              0
     +-----------------------------+------------------------------+
     |       Device ID             |       Vendor ID              | 0x00
     |                             |                              |
     +-----------------------------+------------------------------+
     |         Status              |       Command                | 0x04
     |                             |                              |
     +-----------------------------+---------------+--------------+
     |               Class Code                    |   Revision   | 0x08
     |                                             |      ID      |
     +--------------+--------------+---------------+--------------+
     |     BIST     |    Header    |    Latency    |  Cacheline   | 0x0c
     |              |     type     |     timer     |    size      |
     +--------------+--------------+---------------+--------------+Implementations§
Source§impl PciHeader
 
impl PciHeader
pub fn new(address: PciAddress) -> PciHeader
pub fn address(&self) -> PciAddress
pub fn id(&self, access: impl ConfigRegionAccess) -> (VendorId, DeviceId)
pub fn header_type(&self, access: impl ConfigRegionAccess) -> HeaderType
pub fn has_multiple_functions(&self, access: impl ConfigRegionAccess) -> bool
pub fn revision_and_class( &self, access: impl ConfigRegionAccess, ) -> (DeviceRevision, BaseClass, SubClass, Interface)
pub fn status(&self, access: impl ConfigRegionAccess) -> StatusRegister
pub fn command(&self, access: impl ConfigRegionAccess) -> CommandRegister
pub fn update_command<F>(&mut self, access: impl ConfigRegionAccess, f: F)
Auto Trait Implementations§
impl Freeze for PciHeader
impl RefUnwindSafe for PciHeader
impl Send for PciHeader
impl Sync for PciHeader
impl Unpin for PciHeader
impl UnwindSafe for PciHeader
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