Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
_USB_REQUEST Struct Reference

#include <usb.h>

Data Fields

USB_DEVICEdevice
 USB Device to send this request to.
USB_ENDPOINT_DESCRIPTORendpoint
 Endpoint descriptor on the device to send this request to.
void * data
 Data buffer for the request (IN or OUT).
uint32_t size
 Size of data buffer (For IN requests, the maximum number of bytes of data to receive) (For OUT requests, the exact number of bytes of data to send).
uint32_t flags
 Flags for the request (eg USB_REQUEST_FLAG_ALIGNED).
usb_request_completed_cb callback
 Callback function that will be called when this USB request has been successfully completed or has failed.
void * driverdata
 USB device driver private data for the completion callback (Optional).
USB_CONTROL_SETUP_DATAsetupdata
 Data for the Setup phase of a USB control request (Must be provided for control requests, ignored otherwise).
uint32_t statusdata
 Data for the Status phase of a USB control request (For safety only as no data is normally transferred in the status phase).
uint32_t status
 Status of the transfer (USB_STATUS_SUCCESS if successful, or another error code if the transfer failed).
uint32_t actualsize
 Actual size of the data transferred (Should be checked after a successful IN request).
void * transferdata
 Host driver private data for transfer handling.
void * currentdata
 Host driver data pointer during transaction processing.
LONGBOOL isping
 Ping request in progress as part of request processing.
LONGBOOL issplit
 Request is a split transaction due to full or low speed device.
LONGBOOL completesplit
 On a split transaction indicates if the request is on the start split or complete split phase.
LONGBOOL shortattempt
 The current transaction for this request is a short read or write.
LONGBOOL startofframe
 The request needs to wait for the next start of frame to be started.
uint32_t controlphase
 The currently processing phase of a control request.
uint32_t nextdatapid
 The next Data PID for the data toggle during IN or OUT (Data0/Data1 etc).
uint32_t attemptedpackets
 The number of packets attempted in the current transaction.
uint32_t attemptedbytes
 The number of bytes attempted in the current transaction.
uint32_t attemptedpacketsremaining
 The number of packets remaining in the current transaction.
uint32_t attemptedbytesremaining
 The number of bytes remaining in the current transaction.
uint32_t totalpacketsattempted
 The total number of packets attempted for this request.
uint32_t totalbytesattempted
 The total number of bytes attempted for this request.
uint32_t packetstransferred
 The number of packets transferred for this request.
uint32_t bytestransferred
 The number of bytes transferred for this request.
uint32_t spliterrorcount
 The number of split transaction errors for this request.
uint32_t completesplitretries
 The number of complete split retries for this request.
THREAD_HANDLE resubmitthread
 The handle of the thread performing resubmit for this request (or INVALID_HANDLE_VALUE).
SEMAPHORE_HANDLE resubmitsemaphore
 The handle of the semaphore used to signal the resubmit thread (or INVALID_HANDLE_VALUE).

Field Documentation

◆ device

USB_DEVICE* device

USB Device to send this request to.

◆ endpoint

Endpoint descriptor on the device to send this request to.

◆ data

void* data

Data buffer for the request (IN or OUT).

◆ size

uint32_t size

Size of data buffer (For IN requests, the maximum number of bytes of data to receive) (For OUT requests, the exact number of bytes of data to send).

◆ flags

uint32_t flags

Flags for the request (eg USB_REQUEST_FLAG_ALIGNED).

◆ callback

Callback function that will be called when this USB request has been successfully completed or has failed.

◆ driverdata

void* driverdata

USB device driver private data for the completion callback (Optional).

◆ setupdata

Data for the Setup phase of a USB control request (Must be provided for control requests, ignored otherwise).

◆ statusdata

uint32_t statusdata

Data for the Status phase of a USB control request (For safety only as no data is normally transferred in the status phase).

◆ status

uint32_t status

Status of the transfer (USB_STATUS_SUCCESS if successful, or another error code if the transfer failed).

◆ actualsize

uint32_t actualsize

Actual size of the data transferred (Should be checked after a successful IN request).

◆ transferdata

void* transferdata

Host driver private data for transfer handling.

◆ currentdata

void* currentdata

Host driver data pointer during transaction processing.

◆ isping

LONGBOOL isping

Ping request in progress as part of request processing.

◆ issplit

LONGBOOL issplit

Request is a split transaction due to full or low speed device.

◆ completesplit

LONGBOOL completesplit

On a split transaction indicates if the request is on the start split or complete split phase.

◆ shortattempt

LONGBOOL shortattempt

The current transaction for this request is a short read or write.

◆ startofframe

LONGBOOL startofframe

The request needs to wait for the next start of frame to be started.

◆ controlphase

uint32_t controlphase

The currently processing phase of a control request.

◆ nextdatapid

uint32_t nextdatapid

The next Data PID for the data toggle during IN or OUT (Data0/Data1 etc).

◆ attemptedpackets

uint32_t attemptedpackets

The number of packets attempted in the current transaction.

◆ attemptedbytes

uint32_t attemptedbytes

The number of bytes attempted in the current transaction.

◆ attemptedpacketsremaining

uint32_t attemptedpacketsremaining

The number of packets remaining in the current transaction.

◆ attemptedbytesremaining

uint32_t attemptedbytesremaining

The number of bytes remaining in the current transaction.

◆ totalpacketsattempted

uint32_t totalpacketsattempted

The total number of packets attempted for this request.

◆ totalbytesattempted

uint32_t totalbytesattempted

The total number of bytes attempted for this request.

◆ packetstransferred

uint32_t packetstransferred

The number of packets transferred for this request.

◆ bytestransferred

uint32_t bytestransferred

The number of bytes transferred for this request.

◆ spliterrorcount

uint32_t spliterrorcount

The number of split transaction errors for this request.

◆ completesplitretries

uint32_t completesplitretries

The number of complete split retries for this request.

◆ resubmitthread

THREAD_HANDLE resubmitthread

The handle of the thread performing resubmit for this request (or INVALID_HANDLE_VALUE).

◆ resubmitsemaphore

SEMAPHORE_HANDLE resubmitsemaphore

The handle of the semaphore used to signal the resubmit thread (or INVALID_HANDLE_VALUE).


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