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

#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_HOSThost
 Host controller this USB device is connected to (Set by USB core).
USB_DEVICEparent
 Hub this USB device is connected to, or nil if this is the Root Hub (Set by USB core).
USB_DRIVERdriver
 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_DESCRIPTORdescriptor
 Device descriptor of this device (Set by USB core).
USB_CONFIGURATIONconfiguration
 Currently selected configuration of this USB device (Set by USB core).
USB_CONFIGURATIONconfigurations
 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_DEVICEprev
 Previous entry in USB device table.
USB_DEVICEnext
 Next entry in USB device table.

Detailed Description

USB Device Methods None

Field Documentation

◆ device

DEVICE device

The Device entry for this USB device.

◆ usbid

uint32_t usbid

Unique Id of this USB in the USB device table.

◆ usbstate

uint32_t usbstate

USB device state (eg USB_STATE_ATTACHED).

◆ usbstatus

uint32_t usbstatus

USB device status (eg USB_STATUS_BOUND).

◆ host

USB_HOST* host

Host controller this USB device is connected to (Set by USB core).

◆ parent

USB_DEVICE* parent

Hub this USB device is connected to, or nil if this is the Root Hub (Set by USB core).

◆ driver

USB_DRIVER* driver

Driver this USB device is bound to, if any (Set by USB core).

◆ lock

USB device lock.

◆ address

uint32_t address

Address of this device (Set by USB core).

◆ speed

uint32_t speed

Speed at which this device is attached (Set by USB core).

◆ depth

uint32_t depth

Depth of this device (Root Hub is 0, next level hub is 1 etc) (Set by USB core).

◆ portnumber

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)

◆ configurationvalue

uint32_t configurationvalue

The current configuration value of this USB device (Set by USB core).

◆ descriptor

USB_DEVICE_DESCRIPTOR* descriptor

Device descriptor of this device (Set by USB core).

◆ configuration

USB_CONFIGURATION* configuration

Currently selected configuration of this USB device (Set by USB core).

◆ configurations

USB_CONFIGURATION* configurations

All available configurations on this device (Set by USB core).

◆ product

char product[128]

Null terminated product string (ASCII encoded, English if available) of this device.

◆ manufacturer

char manufacturer[128]

Null terminated manufacturer string (ASCII encoded, English if available) of this device.

◆ serialnumber

char serialnumber[128]

Null terminated serial number string (ASCII encoded, English if available) of this device.

◆ driverdata

void* driverdata

Private data for the driver of this USB device.

◆ lasterror

uint32_t lasterror

Last error to occur on this device.

◆ pendingcount

uint32_t pendingcount

Number of USB requests pending for this device (Set by USB core).

◆ waiterthread

THREAD_ID waiterthread

Thread waiting for pending requests to complete (for device detachment) (Set by USB core).

◆ requestcount

uint32_t requestcount

Number of USB requests that have been submitted to this device.

◆ requesterrors

uint32_t requesterrors

Number of USB requests that have failed on this device.

◆ prev

USB_DEVICE* prev

Previous entry in USB device table.

◆ next

USB_DEVICE* next

Next entry in USB device table.


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