blob: 697912bc3ee4811333504be6901b755306c70006 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
extern crate libusb;
fn main() {
println!("Running");
let ctx = libusb::Context::new().unwrap();
for mut dev in ctx.devices().unwrap().iter() {
let desc = dev.device_descriptor().unwrap();
println!("Bus {:03} Device {:03} ID {:04x}:{:04x}",
dev.bus_number(),
dev.address(),
desc.vendor_id(),
desc.product_id());
}
}
|