From: Bas v. D. <v.d...@gm...> - 2009-10-22 21:23:41
|
Hello, I'm the author of the high-level Haskell binding[1] for libusb-1.0. I have a question regarding timeouts in transfers: The documentation for 'libusb_bulk_transfer' and 'libusb_interrupt_transfer' states: "...Also check transferred when dealing with a timeout error code. libusb may have to split your transfer into a number of chunks to satisfy underlying O/S requirements, meaning that the timeout may expire after the first few chunks have completed. libusb is careful not to lose any data that may have been transferred; do not assume that timeout conditions indicate a complete lack of I/O..." Does this apply to both reads and writes? So if I do a bulk read and a timeout occurs can I still expect 'transferred' number of bytes in my data buffer. And if I do a bulk write and a timeout occurs can I still expect that 'transferred' number of bytes have been written? And does this also apply to control transfers? Thanks, Bas van Dijk [1] http://hackage.haskell.org/package/usb |