class Control
Defined at line 48 of file fidling/gen/sdk/fidl/fuchsia.hardware.usb.function/fuchsia.hardware.usb.function/cpp/fidl/fuchsia.hardware.usb.function/cpp/markers.h
Callback for handling EP0 class/vendor-specific control requests targeting the interface(s)
owned by this function.
This is called when the host sends a control request to the device. The protocol server (of
[`UsbFunctionInterface`]) should process the request and return the result.
The host expects a response within a strict timeout period defined by the USB specification
Section 9.2.6 (50ms for requests without data, and 500ms for read data stages). Because of
these hardware-enforced limits, the implementation must reply as quickly as possible and
avoid blocking the dispatcher.
`setup` is the control request metadata (setup packet). `write` contains the raw bytes sent
by the host in the Data Stage of a host-to-device (OUT) control transfer. It is empty for
device-to-host (IN) transfers. `read` in the response payload contains the raw bytes
returned to the host in the Data Stage of a device-to-host (IN) control transfer. It must
be empty for host-to-device (OUT) transfers.
Any error returned by this method (including `ZX_ERR_NOT_SUPPORTED`) causes the
peripheral controller to stall Endpoint 0, signaling a "Request Error" to the host.
* error:
* `ZX_ERR_NOT_SUPPORTED` if the request is not supported by the protocol server.
* `ZX_ERR_INVALID_ARGS` if the setup packet or data is invalid.
* `ZX_ERR_IO_NOT_PRESENT` if the device was disconnected while processing the request.
Public Members
static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal