#pci #hardware #library

yanked aparato

A pci.ids-compliant library for getting information about available PCI devices

6.0.2 Aug 10, 2021
6.0.1 Aug 9, 2021
6.0.0 Jul 13, 2021
5.1.0 Jul 12, 2021
3.4.2 Jun 28, 2021

#20 in #pci

MIT license

47KB
1K SLoC

aparato

A pci.ids-compliant library for getting information about available PCI devices.

version docs

Disclaimer

  • It isn't recommended to utilize the main branch, as the project is still brand new and changes to the API are very likely to happen. Instead, you should use the crate provided in crates.io.

  • aparato right now only works on Linux, more platforms will receive support in the future.

Usage

Add the following to your project's Cargo.toml file:

aparato = "4.0.0" # Be sure to use the latest version

Examples

use aparato::{Device, PCIDevice};

fn main() {

    // Know the domain of the PCI device?
    // Instantiate a new PCIDevice so we can get to know it a bit.
    let device = PCIDevice::new("00:02.0");

    println!("Class Name: {}", device.class_name());       // e.g. Display Controller
    println!("Subclass Name: {}", device.subclass_name()); // e.g. VGA compatible controller
    println!("Vendor Name: {}", device.vendor_name());     // e.g. Intel Corporation
    println!("Device Name: {}", device.device_name());     // e.g. WhiskeyLake-U GT2 [UHD Graphics 620]
}

Contributing

Any form of contribution is welcome, whether it be unit tests, refactoring, or bug-fixing. It's recommended you report issues before beginning to work on them.

Dependencies

~25KB