INtime SDK Help
ST_UsbAsyncNotifyArgs

Used to indicate completion of an asynchronous transfer. The user specifies a mailbox handle in the asynchronous call, and an instance of this structure is returned via the mailbox on completion of the requested operation. The user should then call the function indicated by the cb_func field with the cb_data field value passed as an argument.

typedef struct { 
int32_t status; // USB status
void * buf; // data buffer
uint32_t buflen; // data request length
uint32_t actlen; // actual length of transferred data
int32_t udev; // device handle
uint32_t pipe; // pipe
void (*cb_func)(); // callback function
void *cb_data; // callback data
} UsbAsynchNotifyArgs;

Common Status Values

USB_ERR_NORMAL_COMPLETION
The transfer completed successfully.
USB_ERR_NO_STACK
The stack is not ready.
USB_ERR_INVAL
flags or pipe are invalid. Buf or buflen are 0.
USB_ERR_TIMEOUT
The device did not respond.
USB_ERR_FAULT
A fault occurred copying data to buf.
USB_ERR_NO_DEVICE
udev does not correspond to a valid device.
USB_ERR_BAD_BUFSIZE
buflen is greater than 16K
USB_ERR_NO_MEM
memory could not be allocated to complete the operation.
USB_ERR_SHORT_XFER
The device transferred less data than the amount expected.
USB_ERR_STALLED
The device stalled and the endpoint halted while tying to complete an operation.

Transfer Flags

USB_FORCE_SHORT_XFER  - force a short transmit last

USB_SHORT_XFER_OK  - allow short reads

USB_DELAY_STATUS_STAGE  - insert delay before STATUS

USB_MULTI_SHORT_OK  - allow multiple short frames

Requirements

Versions Defined in Include Link to
INtime 5.0 intime/rt/include/usbif3.h usbif3.h -
See Also