* usb_libusb.c (usbdev_drain): actually implement draining to aid
synchronizing against a JTAG ICE in weird state. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@497 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
29310a6f20
commit
cf046b8f9d
|
@ -1,3 +1,8 @@
|
|||
2005-09-16 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||
|
||||
* usb_libusb.c (usbdev_drain): actually implement draining to aid
|
||||
synchronizing against a JTAG ICE in weird state.
|
||||
|
||||
2005-09-16 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||
|
||||
* butterfly.c: improve the butterfly initialization so it is more likely
|
||||
|
|
10
usb_libusb.c
10
usb_libusb.c
|
@ -259,6 +259,16 @@ static int usbdev_recv(int fd, unsigned char *buf, size_t nbytes)
|
|||
|
||||
static int usbdev_drain(int fd, int display)
|
||||
{
|
||||
usb_dev_handle *udev = (usb_dev_handle *)fd;
|
||||
int rv;
|
||||
|
||||
do {
|
||||
rv = usb_bulk_read(udev, JTAGICE_BULK_EP, usbbuf, JTAGICE_MAX_XFER, 100);
|
||||
if (rv > 0 && verbose >= 4)
|
||||
fprintf(stderr, "%s: usbdev_drain(): flushed %d characters\n",
|
||||
progname, rv);
|
||||
} while (rv > 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue