aboutsummaryrefslogtreecommitdiffstats
path: root/libusb/io.c
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2012-02-22 14:21:54 +0100
committerPeter Stuge <peter@stuge.se>2012-02-22 14:21:54 +0100
commite3d0a4cb9e2f9872c9fdbb22d7ded169e111fc8f (patch)
tree9e35f48029780e2d8b84bf12ba3e69a785d56286 /libusb/io.c
parent7e0c747cc5ed0a31f38dff5eb5f03d4043b05ada (diff)
downloadandroid_external_libusbx-e3d0a4cb9e2f9872c9fdbb22d7ded169e111fc8f.tar.gz
android_external_libusbx-e3d0a4cb9e2f9872c9fdbb22d7ded169e111fc8f.tar.bz2
android_external_libusbx-e3d0a4cb9e2f9872c9fdbb22d7ded169e111fc8f.zip
Add LIBUSB_TRANSFER_ADD_ZERO_PACKET flag to indicate need for ZLP
Some protocols which use USB require an extra zero length data packet to signal end-of-transfer on bulk endpoints, if the last data packet is exactly wMaxPacketSize bytes long. This flag allows applications to inform libusb about this requirement, so that libusb can handle the issue transparently. At the moment the new flag is only supported on Linux, and submitting a transfer with the flag set returns an error at submit time on other systems. Hopefully implementations will soon follow for other systems. References #6.
Diffstat (limited to 'libusb/io.c')
-rw-r--r--libusb/io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libusb/io.c b/libusb/io.c
index bb6e275..bb04a8f 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -1281,6 +1281,8 @@ void API_EXPORTED libusb_free_transfer(struct libusb_transfer *transfer)
* \returns 0 on success
* \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
* \returns LIBUSB_ERROR_BUSY if the transfer has already been submitted.
+ * \returns LIBUSB_ERROR_NOT_SUPPORTED if the transfer flags are not supported
+ * by the operating system.
* \returns another LIBUSB_ERROR code on other failure
*/
int API_EXPORTED libusb_submit_transfer(struct libusb_transfer *transfer)