PERFORCE change 162936 for review

Hans Petter Selasky hselasky at FreeBSD.org
Thu May 28 11:09:57 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=162936

Change 162936 by hselasky at hselasky_laptop001 on 2009/05/28 11:09:46

	
	LibUSB: Add missing function required by isochronous operation.

Affected files ...

.. //depot/projects/usb/src/lib/libusb/libusb.3#11 edit
.. //depot/projects/usb/src/lib/libusb/libusb20.c#3 edit
.. //depot/projects/usb/src/lib/libusb/libusb20.h#3 edit

Differences ...

==== //depot/projects/usb/src/lib/libusb/libusb.3#11 (text+ko) ====

@@ -78,6 +78,8 @@
 .Fn libusb20_tr_set_callback "struct libusb20_transfer *xfer" "libusb20_tr_callback_t *cb"
 .Ft void
 .Fn libusb20_tr_set_flags "struct libusb20_transfer *xfer" "uint8_t flags"
+.Ft uint32_t
+.Fn libusb20_tr_get_length "struct libusb20_transfer *xfer" "uint16_t fr_index"
 .Ft void
 .Fn libusb20_tr_set_length "struct libusb20_transfer *xfer" "uint32_t length" "uint16_t fr_index"
 .Ft void
@@ -383,8 +385,14 @@
 .
 .Pp
 .
+.Fn libusb20_tr_get_length
+returns the length of the given USB frame by index.
+After an USB transfer is complete the USB frame length will get updated to the actual transferred length.
+.
+.Pp
+.
 .Fn libusb20_tr_set_length
-sets the length of a given USB transfer and frame index.
+sets the length of the given USB frame by index.
 .
 .Pp
 .

==== //depot/projects/usb/src/lib/libusb/libusb20.c#3 (text+ko) ====

@@ -319,6 +319,12 @@
 	return;
 }
 
+uint32_t
+libusb20_tr_get_length(struct libusb20_transfer *xfer, uint16_t frIndex)
+{
+	return (xfer->pLength[frIndex]);
+}
+
 void
 libusb20_tr_set_length(struct libusb20_transfer *xfer, uint32_t length, uint16_t frIndex)
 {

==== //depot/projects/usb/src/lib/libusb/libusb20.h#3 (text+ko) ====

@@ -216,6 +216,7 @@
 void	libusb20_tr_set_buffer(struct libusb20_transfer *xfer, void *buffer, uint16_t fr_index);
 void	libusb20_tr_set_callback(struct libusb20_transfer *xfer, libusb20_tr_callback_t *cb);
 void	libusb20_tr_set_flags(struct libusb20_transfer *xfer, uint8_t flags);
+uint32_t libusb20_tr_get_length(struct libusb20_transfer *xfer, uint16_t fr_index);
 void	libusb20_tr_set_length(struct libusb20_transfer *xfer, uint32_t length, uint16_t fr_index);
 void	libusb20_tr_set_priv_sc0(struct libusb20_transfer *xfer, void *sc0);
 void	libusb20_tr_set_priv_sc1(struct libusb20_transfer *xfer, void *sc1);


More information about the p4-projects mailing list