[][src]Struct hermit::x86_64::kernel::pci::PciAdapter

pub struct PciAdapter {
    pub bus: u8,
    pub device: u8,
    pub vendor_id: u16,
    pub device_id: u16,
    pub class_id: u8,
    pub subclass_id: u8,
    pub programming_interface_id: u8,
    pub base_addresses: Vec<PciBar>,
    pub irq: u8,
}

Fields

bus: u8device: u8vendor_id: u16device_id: u16class_id: u8subclass_id: u8programming_interface_id: u8base_addresses: Vec<PciBar>irq: u8

Implementations

impl PciAdapter[src]

pub fn make_bus_master(&self)[src]

pub fn get_bar(&self, baridx: u8) -> Option<PciBar>[src]

Returns the bar at bar-register baridx.

pub fn memory_map_bar(
    &self,
    index: u8,
    no_cache: bool
) -> Option<(usize, usize)>
[src]

Memory maps pci bar with specified index to identical location in virtual memory. no_cache determines if we set the Cache Disable flag in the page-table-entry. Returns (virtual-pointer, size) if successful, else None (if bar non-existent or IOSpace)

Trait Implementations

impl Clone for PciAdapter[src]

impl Debug for PciAdapter[src]

impl Display for PciAdapter[src]

Auto Trait Implementations

impl Send for PciAdapter

impl Sync for PciAdapter

impl Unpin for PciAdapter

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.