mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
tools/lib: atusb can now be selected by bus/device or by bus-port path
Examples: usb:1/6 select logical device 6 on bus 1 usb:1-3.1.4 starting at bus 1, choose ports 3, 1, and 4 - usbopen.c (initialize, open_usb): moved libusb initialization to separate function, to allow for sharing - usbopen.h (restrict_usb_path), usbopen.c (restricted_path, open_usb, restrict_usb_dev, restrict_usb_by_dev, read_num, restrict_usb_by_port, restrict_usb_path): added mechanism to restrict USB path - atusb.c (atusb_open): if an argument is given, call restrict_usb_path with it
This commit is contained in:
@@ -54,6 +54,8 @@ static void *atusb_open(const char *arg)
|
||||
{
|
||||
usb_dev_handle *dev;
|
||||
|
||||
if (arg)
|
||||
restrict_usb_path(arg);
|
||||
dev = open_usb(USB_VENDOR, USB_PRODUCT);
|
||||
if (dev) {
|
||||
error = 0;
|
||||
|
||||
Reference in New Issue
Block a user