pub struct PciDevice {
pub id: usize,
pub physical: PhysicalDevice,
pub arch: Arch,
pub read_checking_enabled: bool,
pub dma_config: Option<DmaConfig>,
/* private fields */
}
Fields§
§id: usize
§physical: PhysicalDevice
§arch: Arch
§read_checking_enabled: bool
§dma_config: Option<DmaConfig>
Implementations§
Source§impl PciDevice
impl PciDevice
pub fn read_cfg( &self, byte_offset: u32, data: &mut [u8], ) -> Result<(), PciError>
pub fn write_cfg(&self, byte_offset: u32, data: &[u8]) -> Result<(), PciError>
pub fn detect_ffffffff_read( &self, data_read: Option<u32>, ) -> Result<(), PciError>
pub fn read32(&self, addr: u32) -> Result<u32, PciError>
pub fn write32(&mut self, addr: u32, data: u32) -> Result<(), PciError>
pub fn write_no_dma<T>(&mut self, addr: u32, data: &[T])
Source§impl PciDevice
impl PciDevice
pub fn pcie_dma_transfer_turbo( &mut self, chip_addr: u32, host_buffer_addr: u64, size: u32, write: bool, ) -> Result<(), PciError>
pub fn write_block(&mut self, addr: u32, data: &[u8]) -> Result<(), PciError>
pub fn read_block(&mut self, addr: u32, data: &mut [u8]) -> Result<(), PciError>
Source§impl PciDevice
impl PciDevice
pub fn open(device_id: usize) -> Result<PciDevice, PciOpenError>
pub fn allocate_transfer_buffers(&mut self) -> bool
pub fn allocate_dma_buffer_range( &mut self, min_size: u32, max_size: u32, ) -> Result<DmaBuffer, PciError>
pub fn allocate_dma_buffer(&mut self, size: u32) -> Result<DmaBuffer, PciError>
pub fn scan() -> Vec<usize>
Auto Trait Implementations§
impl Freeze for PciDevice
impl RefUnwindSafe for PciDevice
impl Send for PciDevice
impl Sync for PciDevice
impl Unpin 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