libusb_transfer is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

libusb_transfer struct

The generic USB transfer structure. The user populates this structure and then submits it in order to request a transfer. After the transfer has completed, the library populates the transfer with the results and passes it back to the user.

Syntax

struct libusb_transfer;
Implemented in libusb.h:1356

Fields

iso_packet_desc

Isochronous packet descriptors, for isochronous transfers only. Read more...

dev_handle

Handle of the device that this transfer will be submitted to. Read more...

flags

A bitwise OR combination of libusb_transfer_flags . Read more...

endpoint

Address of the endpoint where this transfer will be sent. Read more...

type

Type of the transfer from libusb_transfer_type . Read more...

timeout

Timeout for this transfer in milliseconds. A value of 0 indicates no timeout. Read more...

status

The status of the transfer. Read-only, and only for use within transfer callback function. If this is an isochronous transfer, this field may read COMPLETED even if there were errors in the frames. Use the libusb_iso_packet_descriptor ::status "status" field in each packet to determine if errors occurred. Read more...

length

Length of the data buffer. Must be non-negative. Read more...

actual_length

Actual length of data that was transferred. Read-only, and only for use within transfer callback function. Not valid for isochronous endpoint transfers. Read more...

callback

Callback function. This will be invoked when the transfer completes, fails, or is cancelled. Read more...

user_data

User context data. Useful for associating specific data to a transfer that can be accessed from within the callback function. This field may be set manually or is taken as the `user_data` parameter of the following functions: - libusb_fill_bulk_transfer() - libusb_fill_bulk_stream_transfer() - libusb_fill_control_transfer() - libusb_fill_interrupt_transfer() - libusb_fill_iso_transfer(). Read more...

buffer

Data buffer. Read more...

num_iso_packets

Number of isochronous packets. Only used for I/O with isochronous endpoints. Must be non-negative. Read more...

References

LocationReferrerScopeText
libusb.h:1356
struct libusb_transfer {
cmsis_dap_usb_bulk.c:43
struct libusb_transfer *transfer;
libusb.h:1337
struct libusb_transfer;
stlink_usb.c:147
struct libusb_transfer *trans;
cmsis_dap_usb_bulk.c:43cmsis_dap_bulk_transfer::transfercmsis_dap_bulk_transfer
struct libusb_transfer *transfer;
io.c:1247calculate_timeout()
struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
io.c:1298libusb_alloc_transfer()
size_t libusb_transfer_size = PTR_ALIGN(sizeof(struct libusb_transfer));
io.c:1309libusb_alloc_transfer()
struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer);
libusb.h:1348transfer
typedef void (LIBUSB_CALL *libusb_transfer_cb_fn)(struct libusb_transfer *transfer);
libusb.h:1715libusb_control_transfer_get_data()
struct libusb_transfer *transfer)
libusb.h:1733libusb_control_transfer_get_setup()
struct libusb_transfer *transfer)
libusb.h:1773libusb_alloc_transfer()
struct libusb_transfer * LIBUSB_CALL libusb_alloc_transfer(int iso_packets);
libusb.h:1774libusb_submit_transfer()::transferlibusb_submit_transfer()
int LIBUSB_CALL libusb_submit_transfer(struct libusb_transfer *transfer);
libusb.h:1775libusb_cancel_transfer()::transferlibusb_cancel_transfer()
int LIBUSB_CALL libusb_cancel_transfer(struct libusb_transfer *transfer);
libusb.h:1776libusb_free_transfer()::transferlibusb_free_transfer()
void LIBUSB_CALL libusb_free_transfer(struct libusb_transfer *transfer);
libusb.h:1778libusb_transfer_set_stream_id()::transferlibusb_transfer_set_stream_id()
struct libusb_transfer *transfer, uint32_t stream_id);
libusb.h:1780libusb_transfer_get_stream_id()::transferlibusb_transfer_get_stream_id()
struct libusb_transfer *transfer);
libusb.h:1811libusb_fill_control_transfer()
struct libusb_transfer *transfer, libusb_device_handle *dev_handle,
libusb.h:1841libusb_fill_bulk_transfer()
static inline void libusb_fill_bulk_transfer(struct libusb_transfer *transfer,
libusb.h:1873libusb_fill_bulk_stream_transfer()
struct libusb_transfer *transfer, libusb_device_handle *dev_handle,
libusb.h:1898libusb_fill_interrupt_transfer()
struct libusb_transfer *transfer, libusb_device_handle *dev_handle,
libusb.h:1926libusb_fill_iso_transfer()
static inline void libusb_fill_iso_transfer(struct libusb_transfer *transfer,
libusb.h:1951libusb_set_iso_packet_lengths()
struct libusb_transfer *transfer, unsigned int length)
libusb.h:1976libusb_get_iso_packet_buffer()
struct libusb_transfer *transfer, unsigned int packet)
libusb.h:2018libusb_get_iso_packet_buffer_simple()
struct libusb_transfer *transfer, unsigned int packet)
stlink_usb.c:147stlink_usb_priv::transstlink_usb_priv
struct libusb_transfer *trans;
stlink_usb.c:590sync_transfer_wait_for_completion()
static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)
stlink_usb.c:606transfer_error_status()::transfertransfer_error_status()
static int transfer_error_status(const struct libusb_transfer *transfer)
stlink_usb.c:646jtag_xfer::transferjtag_xfer
struct libusb_transfer *transfer;
sync.c:35sync_transfer_cb()
static void LIBUSB_CALL sync_transfer_cb(struct libusb_transfer *transfer)
sync.c:48sync_transfer_wait_for_completion()
static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)