Struct pci_driver::config::PciConfig
source · pub struct PciConfig<'a> { /* private fields */ }Expand description
This lets you interact with the config space (conventional or extended) of a PCI device.
This doesn’t have a definite length because we want to preserve the PciSubregion over the
whole of config space.
Implementations§
source§impl<'a> PciConfig<'a>
impl<'a> PciConfig<'a>
pub fn vendor_id(&self) -> PciRegisterRo<'a, u16>
pub fn device_id(&self) -> PciRegisterRo<'a, u16>
pub fn command(&self) -> PciCommand<'a>
pub fn status(&self) -> PciStatus<'a>
pub fn revision_id(&self) -> PciRegisterRo<'a, u8>
pub fn class_code(&self) -> PciClassCode<'a>
pub fn cache_line_size(&self) -> PciRegisterRw<'a, u8>
pub fn latency_timer(&self) -> PciRegisterRo<'a, u8>
pub fn header_type(&self) -> PciHeaderType<'a>
pub fn bist(&self) -> PciBist<'a>
pub fn cardbus_cis_pointer(&self) -> PciRegisterRo<'a, u32>
pub fn subsystem_vendor_id(&self) -> PciRegisterRo<'a, u16>
pub fn subsystem_id(&self) -> PciRegisterRo<'a, u16>
pub fn interrupt_line(&self) -> PciRegisterRw<'a, u8>
pub fn interrupt_pin(&self) -> PciRegisterRo<'a, u8>
pub fn min_gnt(&self) -> PciRegisterRo<'a, u8>
pub fn max_lat(&self) -> PciRegisterRo<'a, u8>
source§impl<'a> PciConfig<'a>
impl<'a> PciConfig<'a>
sourcepub fn capabilities(&self) -> Result<PciCapabilities<'a>>
pub fn capabilities(&self) -> Result<PciCapabilities<'a>>
Returns a thing that lets you access the PCI Capabilities.
Calling this will (re)scan all Capabilities, which is why it can fail.
sourcepub fn extended_capabilities(&self) -> Result<PciExtendedCapabilities<'a>>
pub fn extended_capabilities(&self) -> Result<PciExtendedCapabilities<'a>>
Returns a thing that lets you access the PCI Extended Capabilities.
Calling this will (re)scan all Extended Capabilities, which is why it can fail.
Trait Implementations§
source§impl<'a> AsPciSubregion<'a> for PciConfig<'a>
impl<'a> AsPciSubregion<'a> for PciConfig<'a>
source§fn as_subregion(&self) -> PciSubregion<'a>
fn as_subregion(&self) -> PciSubregion<'a>
Returns a
PciSubregion corresponding to self.source§fn subregion(&self, range: impl RangeBounds<u64>) -> PciSubregion<'a>
fn subregion(&self, range: impl RangeBounds<u64>) -> PciSubregion<'a>
Returns a
PciSubregion corresponding to a range of self.source§impl<'a> BackedByPciSubregion<'a> for PciConfig<'a>
impl<'a> BackedByPciSubregion<'a> for PciConfig<'a>
source§fn backed_by(as_subregion: impl AsPciSubregion<'a>) -> Self
fn backed_by(as_subregion: impl AsPciSubregion<'a>) -> Self
Does not check whether the subregion is big enough. If it isn’t, accesses may later fail.
impl<'a> Copy for PciConfig<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PciConfig<'a>
impl<'a> Send for PciConfig<'a>
impl<'a> Sync for PciConfig<'a>
impl<'a> Unpin for PciConfig<'a>
impl<'a> !UnwindSafe for PciConfig<'a>
Blanket Implementations§
source§impl<'a, T> PciRegion for Twhere
T: AsPciSubregion<'a> + Debug + Send + Sync,
impl<'a, T> PciRegion for Twhere T: AsPciSubregion<'a> + Debug + Send + Sync,
source§fn permissions(&self) -> Permissions
fn permissions(&self) -> Permissions
Whether the region may be read, written, or both.
source§fn read_bytes(&self, offset: u64, buffer: &mut [u8]) -> Result<(), Error>
fn read_bytes(&self, offset: u64, buffer: &mut [u8]) -> Result<(), Error>
Read from a contiguous range of the region into a byte buffer. Read more