#define ID_VENDOR 0x1b1f
#define ID_PRODUCT 0xc00f
+#define ID_PRODUCT_BL 0xc010
/* TODO: dynamic */
#define ASYNC_SIZE 0x0040
if (err)
continue;
- if ((desc.idVendor == ID_VENDOR) && (desc.idProduct == ID_PRODUCT)) {
+ if ((desc.idVendor == ID_VENDOR) &&
+ ((desc.idProduct == ID_PRODUCT) || (desc.idProduct == ID_PRODUCT_BL))) {
libusb_device *dev = list[i];
err = libusb_open(dev, &devh);
} else {
if ((tv.tv_sec == 0) && (tv.tv_usec == 0)) {
usb_event = 1;
+ } else if (tv.tv_sec > timeout) {
+ tv.tv_sec = timeout;
+ tv.tv_usec = 0;
}
}