libusb_alloc_transfer() function
Allocate a libusb transfer with a specified number of isochronous packet descriptors. The returned transfer is pre-initialized for you. When the new transfer is no longer needed, it should be freed with libusb_free_transfer(). Transfers intended for non-isochronous endpoints (e.g. control, bulk, interrupt) should specify an iso_packets count of zero. For transfers intended for isochronous endpoints, specify an appropriate number of packet descriptors to be allocated as part of the transfer. The returned transfer is not specially initialized for isochronous I/O; you are still required to set the
libusb_transfer
::num_iso_packets "num_iso_packets" and
libusb_transfer
::type "type" fields accordingly. It is safe to allocate a transfer with some isochronous packets and then use it on a non-isochronous endpoint. If you do this, ensure that at time of submission, num_iso_packets is 0 and that type is set appropriately.
Arguments
iso_packets
number of isochronous packet descriptors to allocate. Must be non-negative.
Return value
a newly allocated transfer, or NULL on error
Functions calling libusb_alloc_transfer()
Functions called by libusb_alloc_transfer()
libusb_alloc_transfer()
calloc() usbi_mutex_init() all items filtered out
Data read by libusb_alloc_transfer()
Data written by libusb_alloc_transfer()
libusb_alloc_transfer()
Type of libusb_alloc_transfer()
libusb_alloc_transfer()
size_t all items filtered out