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> Freeze for PciConfig<'a>
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<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<'a, T> PciRegion for T
impl<'a, T> PciRegion for T
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