usbw 0.0.2

basic USB driver. So far just a wrapper for `rusb`. Planning on wrapping `libusb` later
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use usbw::libusb;
pub fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
    let context = libusb::context::Context::new()?;
    for device in context.device_list().iter() {
        if let Ok(descriptor) = device.device_descriptor() {
            println!(
                "vid: {:04X} pid: {:04X}",
                descriptor.device_identifier().vendor_id.0,
                descriptor.device_identifier().product_id.0
            )
        }
    }
    Ok(())
}