summaryrefslogtreecommitdiffstats
path: root/lib/libusb/libusb20.3
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-11-20 08:57:25 +0000
committerthompsa <thompsa@FreeBSD.org>2009-11-20 08:57:25 +0000
commitc3a431d7190b3a22732569a0a5eb670c4472448c (patch)
treee74fa51115d91a6aafc7339f0f35e68ec522dd82 /lib/libusb/libusb20.3
parentb65660166a38e0c0415e1c20a6958b52801f299b (diff)
downloadFreeBSD-src-c3a431d7190b3a22732569a0a5eb670c4472448c.zip
FreeBSD-src-c3a431d7190b3a22732569a0a5eb670c4472448c.tar.gz
Sync to P4
- fix a transfer cancelling bug/segfault [1] - correct a return code in the transfer cancel function. - add new API function, libusb20_tr_bulk_intr_sync(). Submitted by: HPS Reported by: Robert Jenssen [1]
Diffstat (limited to 'lib/libusb/libusb20.3')
-rw-r--r--lib/libusb/libusb20.327
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3
index f902883..5404013 100644
--- a/lib/libusb/libusb20.3
+++ b/lib/libusb/libusb20.3
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 22, 2009
+.Dd November 18, 2009
.Dt LIBUSB20 3
.Os
.Sh NAME
@@ -98,6 +98,8 @@ USB access library (libusb -lusb)
.Fn libusb20_tr_setup_intr "struct libusb20_transfer *xfer" "void *pbuf" "uint32_t length" "uint32_t timeout"
.Ft void
.Fn libusb20_tr_setup_isoc "struct libusb20_transfer *xfer" "void *pbuf" "uint32_t length" "uint61_t fr_index"
+.Ft uint8_t
+.Fn libusb20_tr_bulk_intr_sync "struct libusb20_transfer *xfer" "void *pbuf" "uint32_t length" "uint32_t *pactlen" "uint32_t timeout"
.Ft void
.Fn libusb20_tr_start "struct libusb20_transfer *xfer"
.Ft void
@@ -451,6 +453,29 @@ is a helper function for setting up a multi frame USB ISOCHRONOUS transfer.
.
.Pp
.
+.Fn libusb20_tr_bulk_intr_sync
+will perform a synchronous BULK or INTERRUPT transfer having length given by the
+.Fa length
+argument and buffer pointer given by the
+.Fa pbuf
+argument on the USB transfer given by the
+.Fa xfer
+argument.
+.
+If the
+.Fa pactlen
+argument is non-NULL the actual transfer length will be stored at the given pointer destination.
+.
+If the
+.Fa timeout
+argument is non-zero the transfer will timeout after the given value in milliseconds.
+.
+This function does not change the transfer flags, like short packet not ok.
+.
+This function returns zero on success else a LIBUSB20_TRANSFER_XXX value is returned.
+.
+.Pp
+.
.Fn libusb20_tr_start
will get the USB transfer started, if not already
started.
OpenPOWER on IntegriCloud