![]() |
Ultibo API
C/C++ API for Ultibo Core
|
#include <usb.h>
Data Fields | |
| DEVICE | device |
| The Device entry for this USB device. | |
| uint32_t | usbid |
| Unique Id of this USB in the USB device table. | |
| uint32_t | usbstate |
| USB device state (eg USB_STATE_ATTACHED). | |
| uint32_t | usbstatus |
| USB device status (eg USB_STATUS_BOUND). | |
| USB_HOST * | host |
| Host controller this USB device is connected to (Set by USB core). | |
| USB_DEVICE * | parent |
| Hub this USB device is connected to, or nil if this is the Root Hub (Set by USB core). | |
| USB_DRIVER * | driver |
| Driver this USB device is bound to, if any (Set by USB core). | |
| MUTEX_HANDLE | lock |
| USB device lock. | |
| uint32_t | address |
| Address of this device (Set by USB core). | |
| uint32_t | speed |
| Speed at which this device is attached (Set by USB core). | |
| uint32_t | depth |
| Depth of this device (Root Hub is 0, next level hub is 1 etc) (Set by USB core). | |
| uint32_t | portnumber |
| 1 based index of the USB port on the parent hub this device is plugged into (0 for the Root Hub) (Set by USB core) | |
| uint32_t | configurationvalue |
| The current configuration value of this USB device (Set by USB core). | |
| USB_DEVICE_DESCRIPTOR * | descriptor |
| Device descriptor of this device (Set by USB core). | |
| USB_CONFIGURATION * | configuration |
| Currently selected configuration of this USB device (Set by USB core). | |
| USB_CONFIGURATION * | configurations |
| All available configurations on this device (Set by USB core). | |
| char | product [128] |
| Null terminated product string (ASCII encoded, English if available) of this device. | |
| char | manufacturer [128] |
| Null terminated manufacturer string (ASCII encoded, English if available) of this device. | |
| char | serialnumber [128] |
| Null terminated serial number string (ASCII encoded, English if available) of this device. | |
| void * | driverdata |
| Private data for the driver of this USB device. | |
| uint32_t | lasterror |
| Last error to occur on this device. | |
| uint32_t | pendingcount |
| Number of USB requests pending for this device (Set by USB core). | |
| THREAD_ID | waiterthread |
| Thread waiting for pending requests to complete (for device detachment) (Set by USB core). | |
| uint32_t | requestcount |
| Number of USB requests that have been submitted to this device. | |
| uint32_t | requesterrors |
| Number of USB requests that have failed on this device. | |
| USB_DEVICE * | prev |
| Previous entry in USB device table. | |
| USB_DEVICE * | next |
| Next entry in USB device table. | |
USB Device Methods None
| DEVICE device |
The Device entry for this USB device.
| uint32_t usbid |
Unique Id of this USB in the USB device table.
| uint32_t usbstate |
USB device state (eg USB_STATE_ATTACHED).
| uint32_t usbstatus |
USB device status (eg USB_STATUS_BOUND).
| USB_HOST* host |
Host controller this USB device is connected to (Set by USB core).
| USB_DEVICE* parent |
Hub this USB device is connected to, or nil if this is the Root Hub (Set by USB core).
| USB_DRIVER* driver |
Driver this USB device is bound to, if any (Set by USB core).
| MUTEX_HANDLE lock |
USB device lock.
| uint32_t address |
Address of this device (Set by USB core).
| uint32_t speed |
Speed at which this device is attached (Set by USB core).
| uint32_t depth |
Depth of this device (Root Hub is 0, next level hub is 1 etc) (Set by USB core).
| uint32_t portnumber |
1 based index of the USB port on the parent hub this device is plugged into (0 for the Root Hub) (Set by USB core)
| uint32_t configurationvalue |
The current configuration value of this USB device (Set by USB core).
| USB_DEVICE_DESCRIPTOR* descriptor |
Device descriptor of this device (Set by USB core).
| USB_CONFIGURATION* configuration |
Currently selected configuration of this USB device (Set by USB core).
| USB_CONFIGURATION* configurations |
All available configurations on this device (Set by USB core).
| char product[128] |
Null terminated product string (ASCII encoded, English if available) of this device.
| char manufacturer[128] |
Null terminated manufacturer string (ASCII encoded, English if available) of this device.
| char serialnumber[128] |
Null terminated serial number string (ASCII encoded, English if available) of this device.
| void* driverdata |
Private data for the driver of this USB device.
| uint32_t lasterror |
Last error to occur on this device.
| uint32_t pendingcount |
Number of USB requests pending for this device (Set by USB core).
| THREAD_ID waiterthread |
Thread waiting for pending requests to complete (for device detachment) (Set by USB core).
| uint32_t requestcount |
Number of USB requests that have been submitted to this device.
| uint32_t requesterrors |
Number of USB requests that have failed on this device.
| USB_DEVICE* prev |
Previous entry in USB device table.
| USB_DEVICE* next |
Next entry in USB device table.