When trying async transfer with my FT2232 sync FIFO gadget, I had to apply appended patch. Probably transfer->status is only set when the transfer is complete or otherwise aborted.
Does the patch look resonable? -- Uwe Bonnes [email protected] Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ---------- diff --git a/src/ftdi.c b/src/ftdi.c index 22e746d..f1d3fa5 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -1437,8 +1437,9 @@ int ftdi_transfer_data_done(struct ftdi_transfer_control *tc) return ret; } } - - if (tc->transfer->status == LIBUSB_TRANSFER_COMPLETED) + if (tc->transfer == 0) + return 0; + else if (tc->transfer->status == LIBUSB_TRANSFER_COMPLETED) ret = tc->offset; else ret = -1; -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
