class UsbProtocolClient
Defined at line 252 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
Public Members
static const uint32_t kProtocolId
Public Methods
void UsbProtocolClient ()
Defined at line 257 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void UsbProtocolClient (const usb_protocol_t * proto)
Defined at line 259 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void UsbProtocolClient (zx_device_t * parent)
Defined at line 262 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void UsbProtocolClient (zx_device_t * parent, const char * fragment_name)
Defined at line 273 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t CreateFromDevice (zx_device_t * parent, UsbProtocolClient * result)
Create a UsbProtocolClient from the given parent device + "fragment".
If ZX_OK is returned, the created object will be initialized in |result|.
Defined at line 287 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t CreateFromDevice (zx_device_t * parent, const char * fragment_name, UsbProtocolClient * result)
Create a UsbProtocolClient from the given parent device.
If ZX_OK is returned, the created object will be initialized in |result|.
Defined at line 302 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void GetProto (usb_protocol_t * proto)
Defined at line 314 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
bool is_valid ()
Defined at line 318 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void clear ()
Defined at line 321 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t ControlOut (uint8_t request_type, uint8_t request, uint16_t value, uint16_t index, zx_time_t timeout, const uint8_t * write_buffer, size_t write_size)
Defined at line 326 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t ControlIn (uint8_t request_type, uint8_t request, uint16_t value, uint16_t index, zx_time_t timeout, uint8_t * out_read_buffer, size_t read_size, size_t * out_read_actual)
Defined at line 330 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void RequestQueue (usb_request_t * usb_request, const usb_request_complete_callback_t * complete_cb)
Queues a USB request.
Defined at line 335 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
usb_speed_t GetSpeed ()
Returns the speed of the device.
Defined at line 340 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t SetInterface (uint8_t interface_number, uint8_t alt_setting)
Selects an alternate setting for a USB interface.
Defined at line 345 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
uint8_t GetConfiguration ()
Returns the currently selected configuration for the device.
Defined at line 350 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t SetConfiguration (uint8_t configuration)
Selects the configuration for the device.
Defined at line 355 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t EnableEndpoint (const usb_endpoint_descriptor_t * ep_desc, const usb_ss_ep_comp_descriptor_t * ss_com_desc, bool enable)
Enables a USB endpoint, configuring it as specified by the provided descriptors.
Defined at line 360 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t ResetEndpoint (uint8_t ep_address)
Resets an endpoint that is in a halted or error state.
Endpoints will be halted if the device returns a STALL in response to a USB transaction.
When that occurs, the transaction will fail with ERR_IO_REFUSED.
usb_reset_endpoint() the endpoint to normal running state.
Defined at line 368 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t ResetDevice ()
Resets the device and restores the prior configuration.
Returns ZX_ERR_BAD_STATE if the device is already being reset.
Defined at line 374 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
uint64_t GetMaxTransferSize (uint8_t ep_address)
Returns the maximum amount of data that can be transferred on an endpoint in a single
transaction.
Defined at line 380 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
uint32_t GetDeviceId ()
Returns the device ID for the device.
This ID is generated by and used internally by the USB HCI controller driver.
Defined at line 386 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void GetDeviceDescriptor (usb_device_descriptor_t * out_desc)
Returns the device's device descriptor.
Defined at line 391 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t GetConfigurationDescriptorLength (uint8_t configuration, uint64_t * out_length)
Returns the length of the configuration descriptor for the specified configuration.
Defined at line 396 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t GetConfigurationDescriptor (uint8_t configuration, uint8_t * out_desc_buffer, size_t desc_size, size_t * out_desc_actual)
Returns the configuration descriptor for the specified configuration.
Defined at line 401 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
uint64_t GetDescriptorsLength ()
Returns the length of the USB descriptors for the USB device or interface.
Defined at line 406 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
void GetDescriptors (uint8_t * out_descs_buffer, size_t descs_size, size_t * out_descs_actual)
returns the USB descriptors for the USB device or interface.
Defined at line 411 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t GetStringDescriptor (uint8_t desc_id, uint16_t lang_id, uint16_t * out_lang_id, uint8_t * out_string_buffer, size_t string_size, size_t * out_string_actual)
Fetch the descriptor using the provided descriptor ID and language ID. If
the language ID requested is not available, the first entry of the language
ID table will be used instead and be provided in the updated version of the
parameter.
The string will be encoded using UTF-8, and will be truncated to fit the
space provided by the buflen parameter. buflen will be updated to indicate
the amount of space needed to hold the actual UTF-8 encoded string lenth, and
may be larger than the original value passed. Embedded nulls may be present
in the string, and the result may not be null terminated if the string
occupies the entire provided buffer.
Defined at line 426 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
zx_status_t CancelAll (uint8_t ep_address)
Cancels all transactions currently queued on the specified endpoint.
Defined at line 431 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
uint64_t GetCurrentFrame ()
Returns the current frame (in milliseconds), used for isochronous transfers.
Defined at line 436 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h
uint64_t GetRequestSize ()
Returns the size needed for a |usb_request_t|, including private storage needed by
all layers of the USB stack.
Defined at line 442 of file fidling/gen/sdk/banjo/fuchsia.hardware.usb/fuchsia.hardware.usb/banjo/cpp/fuchsia/hardware/usb/cpp/banjo.h