summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..697912b
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,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());
+ }
+}