[−][src]Function rusb::open_device_with_vid_pid
pub fn open_device_with_vid_pid(
vendor_id: u16,
product_id: u16
) -> Option<DeviceHandle<GlobalContext>>
Convenience function to open a device by its vendor ID and product ID. Using global context
This function is provided as a convenience for building prototypes without having to
iterate a DeviceList
. It is not meant for production
applications.
Returns a device handle for the first device found matching vendor_id
and product_id
.
On error, or if the device could not be found, it returns None
.