add delays to stop device from resetting
[hmcfgusb] / hmcfgusb.c
index 75838fedc50878766f71f9f241d74525c532197d..c3fb60b5c74d3d24ccad414551aa58412e4fe65f 100644 (file)
@@ -152,12 +152,16 @@ int hmcfgusb_send(struct hmcfgusb_dev *usbdev, unsigned char* send_data, int len
                return 0;
        }
 
+       usleep(1000);
+
        if (done) {
                err = libusb_interrupt_transfer(usbdev->usb_devh, EP_OUT, send_data, 0, &cnt, USB_TIMEOUT);
                if (err) {
                        fprintf(stderr, "Can't send data: %s\n", usb_strerror(err));
                        return 0;
                }
+
+               usleep(1000);
        }
 
        return 1;
Impressum, Datenschutz