6.0.2 |
|
---|---|
6.0.1 |
|
6.0.0 |
|
5.1.0 |
|
3.4.2 |
|
#17 in #pci
641 每月下载量
47KB
1K SLoC
免责声明
-
不建议使用
main
分支,因为该项目尚处于起步阶段,API 的更改很可能发生。相反,您应使用在 crates.io 中提供的crate。 -
目前aparato仅在Linux上工作,未来将支持更多平台。
用法
将以下内容添加到您的项目Cargo.toml文件中
aparato = "4.0.0" # Be sure to use the latest version
示例
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]
}
贡献
欢迎任何形式的贡献,无论是单元测试、重构还是修复错误。建议在开始工作之前报告问题。
依赖
~25KB