LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
libusb_transfer Struct Reference

#include <libusb.h>

Data Fields

libusb_device_handledev_handle
 
uint8_t flags
 
unsigned char endpoint
 
unsigned char type
 
unsigned int timeout
 
enum libusb_transfer_status status
 
int length
 
int actual_length
 
libusb_transfer_cb_fn callback
 
void * user_data
 
unsigned char * buffer
 
int num_iso_packets
 
struct libusb_iso_packet_descriptor iso_packet_desc [0]
 

Detailed Description

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.

Definition at line 716 of file libusb.h.

Field Documentation

int 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.

Definition at line 748 of file libusb.h.

unsigned char* buffer

Data buffer

Definition at line 758 of file libusb.h.

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

Definition at line 752 of file libusb.h.

libusb_device_handle* dev_handle

Handle of the device that this transfer will be submitted to

Definition at line 718 of file libusb.h.

unsigned char endpoint

Address of the endpoint where this transfer will be sent.

Definition at line 724 of file libusb.h.

uint8_t flags

A bitwise OR combination of libusb_transfer_flags.

Definition at line 721 of file libusb.h.

struct libusb_iso_packet_descriptor iso_packet_desc[0]

Isochronous packet descriptors, for isochronous transfers only.

Definition at line 765 of file libusb.h.

int length

Length of the data buffer

Definition at line 743 of file libusb.h.

int num_iso_packets

Number of isochronous packets. Only used for I/O with isochronous endpoints.

Definition at line 762 of file libusb.h.

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 status field in each packet to determine if errors occurred.

Definition at line 740 of file libusb.h.

unsigned int timeout

Timeout for this transfer in millseconds. A value of 0 indicates no timeout.

Definition at line 731 of file libusb.h.

unsigned char type

Type of the endpoint from libusb_transfer_type

Definition at line 727 of file libusb.h.

void* user_data

User context data to pass to the callback function.

Definition at line 755 of file libusb.h.


The documentation for this struct was generated from the following file: