libusb_alloc_transfer() is only used within OpenOCD.
 
Symbols
loading...
Files
loading...
CodeScopeDevelopment ToolsOpenOCDlibusb_alloc_transfer()

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.

Syntax

struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(int iso_packets);
Implemented in io.c:1288

Arguments

iso_packets

number of isochronous packet descriptors to allocate. Must be non-negative.

Return value

a newly allocated transfer, or NULL on error

References

LocationReferrerText
io.c:1289
struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(
cmsis_dap_usb_bulk.c:382
dap->bdata->command_transfers[idx].transfer = libusb_alloc_transfer(0);
libusb.h:1773
struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(int iso_packets);
mpsse.c:876
struct libusb_transfer *write_transfer = libusb_alloc_transfer(0);
stlink_usb.c:663
transfers[i].transfer = libusb_alloc_transfer(0);
cmsis_dap_usb_bulk.c:382cmsis_dap_usb_open()
dap->bdata->command_transfers[idx].transfer = libusb_alloc_transfer(0);
cmsis_dap_usb_bulk.c:390cmsis_dap_usb_open()
dap->bdata->response_transfers[idx].transfer = libusb_alloc_transfer(0);
mpsse.c:876mpsse_flush()
struct libusb_transfer *write_transfer = libusb_alloc_transfer(0);
mpsse.c:884mpsse_flush()
read_transfer = libusb_alloc_transfer(0);
stlink_usb.c:663jtag_libusb_bulk_transfer_n()
transfers[i].transfer = libusb_alloc_transfer(0);

Call Tree

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()::priv_size
libusb_alloc_transfer()::usbi_transfer_size
libusb_alloc_transfer()::libusb_transfer_size
libusb_alloc_transfer()::iso_packets_size
libusb_alloc_transfer()::alloc_size
libusb_alloc_transfer()::ptr
libusb_alloc_transfer()::itransfer
libusb_alloc_transfer()::transfer
all items filtered out
libusb_alloc_transfer()
Type of libusb_alloc_transfer()
libusb_alloc_transfer()
size_t
all items filtered out