add delays to stop device from resetting
authorMichael Gernoth <michael@gernoth.net>
Wed, 29 May 2013 21:22:33 +0000 (23:22 +0200)
committerMichael Gernoth <michael@gernoth.net>
Wed, 29 May 2013 21:22:33 +0000 (23:22 +0200)
hmcfgusb.c

index 75838fe..c3fb60b 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