![]() |
Ultibo API
C/C++ API for Ultibo Core
|
#include <usb.h>
Data Fields | |
| USB_DEVICE * | device |
| USB Device to send this request to. | |
| USB_ENDPOINT_DESCRIPTOR * | endpoint |
| 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_DATA * | setupdata |
| 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). | |
| USB_DEVICE* device |
USB Device to send this request to.
| USB_ENDPOINT_DESCRIPTOR* endpoint |
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_DATA* setupdata |
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).