[−][src]Struct sunrise_ahci::pci::PciDevice
A pci device, addressed by its bus number, slot, and function.
Fields
bus: u8
The device's bus number.
slot: u8
The device's slot number on its bus.
function: u8
The device's function number.
did: u16
Device id.
vid: u16
Vendor id.
class: u8
subclass: u8
prog_if: u8
rev_id: u8
header_type: u8
latency_timer: u8
cache_line_size: u8
header: PciHeader
Remaining registers values, based on header type.
Implementations
impl PciDevice
[src]
fn probe(bus: u8, slot: u8, function: u8) -> Option<Self>
[src]
Checks if a device exists on given bus>slot>function.
This is done by reading the Device ID - Vendor ID register (register 0).
If 0xFFFF_FFFF
is read back, this means that the device was non-existent, and we return None.
fn read_config_register(&self, register: u8) -> u32
[src]
Reads a configuration space register.
fn write_config_register(&self, register: u8, value: u32)
[src]
Writes to a configuration space register.
fn status(&self) -> u16
[src]
Reads the status register.
fn command(&self) -> u16
[src]
Reads the command register.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PciDevice
impl Send for PciDevice
impl Sync for PciDevice
impl Unpin for PciDevice
impl UnwindSafe for PciDevice
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,