]> git.zerfleddert.de Git - hmcfgusb/commitdiff
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 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