PROTOCOLS
Device
Defined in fuchsia.hardware.usb.peripheral/usb-peripheral.fidl
ClearFunctions
Tells the device to remove the child devices for the configuration's interfaces
and reset the list of functions to empty.
The caller should wait for the FunctionsCleared
event.
Request
Response
SetConfiguration
Sets the device's descriptors, adds the functions and creates the child devices for the
configuration's interfaces.
At least one function descriptor must be provided.
Request
Response
SetStateChangeListener
Adds a state change listener that is invoked when a state change completes.
Request
Name | Type |
listener |
request<Events>
|
Events
Defined in fuchsia.hardware.usb.peripheral/usb-peripheral.fidl
Events protocol that is used as a callback to inform the client
of the completion of various server-side events.
This callback interface can be registered using the SetStateChangeListener
method on the Device protocol.
FunctionRegistered
Invoked when a function registers
Request
Response
FunctionsCleared
Invoked when all functions have been cleared.
Request
STRUCTS
DeviceDescriptor
Defined in fuchsia.hardware.usb.peripheral/usb-peripheral.fidl
The fields in DeviceDescriptor match those in usb_descriptor_t in the USB specification,
except for the string fields.
Name | Type | Description | Default |
---|
bcd_usb |
uint16
|
|
No default |
b_device_class |
uint8
|
|
No default |
b_device_sub_class |
uint8
|
|
No default |
b_device_protocol |
uint8
|
|
No default |
b_max_packet_size0 |
uint8
|
|
No default |
id_vendor |
uint16
|
|
No default |
id_product |
uint16
|
|
No default |
bcd_device |
uint16
|
|
No default |
manufacturer |
string[127]
|
|
No default |
product |
string[127]
|
|
No default |
serial |
string[127]
|
|
No default |
b_num_configurations |
uint8
|
|
No default |
Device_SetConfiguration_Response
Defined in fuchsia.hardware.usb.peripheral/usb-peripheral.fidl
Name | Type | Description | Default |
FunctionDescriptor
Defined in fuchsia.hardware.usb.peripheral/usb-peripheral.fidl
Name | Type | Description | Default |
---|
interface_class |
uint8
|
|
No default |
interface_subclass |
uint8
|
|
No default |
interface_protocol |
uint8
|
|
No default |
UNIONS
Device_SetConfiguration_Result
Defined in fuchsia.hardware.usb.peripheral/usb-peripheral.fidl
CONSTANTS
TYPE ALIASES