PROTOCOLS
Device
Defined in fuchsia.hardware.usb.device/usb-device.fidl
GetConfiguration
Returns the device's current configuration.
Request
Response
Name | Type |
configuration |
uint8
|
GetConfigurationDescriptor
Returns the device's USB configuration descriptor for the given configuration.
Request
Response
Name | Type |
s |
zx/status
|
desc |
vector<uint8>[65536]
|
GetConfigurationDescriptorSize
Returns the total size of the USB configuration descriptor for the given configuration.
Request
Response
GetDeviceDescriptor
Returns the device's USB device descriptor.
Request
Response
GetDeviceId
Returns an implementation specific device ID for a USB device.
For informational purposes only.
Request
Response
Name | Type |
device_id |
uint32
|
GetDeviceSpeed
Returns the speed of the USB device as a usb_speed_t value.
Request
Response
GetHubDeviceId
Returns the implementation specific device ID for the hub that a USB device is connected to.
For informational purposes only.
Request
Response
Name | Type |
hub_device_id |
uint32
|
GetStringDescriptor
Fetches a string descriptor from the USB device.
desc_id : The ID of the string descriptor to fetch, or 0 to fetch
the language table instead.
lang_id : The language ID of the string descriptor to fetch.
If no matching language ID is present in the device's language
ID table, the first entry of the language ID table will
be substituted.
actual_lang_id : The actual language ID of the string fetched, or 0 for
the language ID table.
The worst case size for the payload of a language ID table should be 252
bytes, meaning that a 256 byte buffer should always be enough to hold any
language ID table.
The worst case size for a UTF-8 encoded string descriptor payload should be
378 bytes (126 UTF-16 code units with a worst case expansion factor of 3)
Request
Name | Type |
desc_id |
uint8
|
lang_id |
uint16
|
Response
Name | Type |
s |
zx/status
|
desc |
string[384]
|
actual_lang_id |
uint16
|
SetConfiguration
Sets the device's current configuration.
Request
Name | Type |
configuration |
uint8
|
Response
SetInterface
Selects an alternate setting for an interface on a USB device.
Request
Name | Type |
interface_number |
uint8
|
alt_setting |
uint8
|
Response
STRUCTS
CONSTANTS