PERFORCE change 164369 for review
Sylvestre Gallon
syl at FreeBSD.org
Sun Jun 14 18:58:43 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164369
Change 164369 by syl at syl_atuin on 2009/06/14 18:58:10
Add isochronous transfer init.
Affected files ...
.. //depot/projects/soc2009/syl_usb/src/lib/libusb/libusb10.c#32 edit
Differences ...
==== //depot/projects/soc2009/syl_usb/src/lib/libusb/libusb10.c#32 (text+ko) ====
@@ -684,6 +684,8 @@
libusb_transfer *usb_xfer;
libusb_context *ctx;
uint8_t status;
+ uint32_t iso_packets;
+ int i;
usb_backend = (struct usb_transfer *) ((uint8_t *)xfer -
sizeof(struct usb_transfer));
@@ -713,6 +715,14 @@
usb_xfer->timeout);
break ;
case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
+ iso_packets = libusb20_tr_get_max_frames(xfer);
+ if (usb_xfer->num_iso_packets > iso_packets)
+ usb_xfer->num_iso_packets = iso_packets;
+ for (i = 0 ; i < usb_xfer->num_iso_packets ; i++) {
+ libusb20_tr_setup_isoc(usb_xfer,
+ usb_xfer->buffer, usb_xfer->length, i);
+ }
+ libusb20_tr_set_total_frames(i);
break ;
case LIBUSB_TRANSFER_TYPE_BULK:
libusb20_tr_setup_bulk(xfer, usb_xfer->buffer,
More information about the p4-projects
mailing list