Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.hiddevice

PROTOCOLS

HidDevice

Defined in fuchsia.hardware.hiddevice/hiddevice.fidl

GetDescriptor

Request

<EMPTY>

Response

NameType
s zx/status
descriptor vector<uint8>[8192]

GetHidDeviceInfo

Request

<EMPTY>

Response

NameType
info HidDeviceInfo

GetReport

Request a given report. Can be used to get FEATURE and INPUT reports. Getting an OUTPUT report is an error. This should be used most frequently to get FEATURE reports, since most devices will send normal INPUT reports through the Listener API.

Request

NameType
rpt_type HidReportType
rpt_id uint8

Response

NameType
s zx/status
report vector<uint8>[8192]

RegisterListener

Register a listener to begin receiving HID Reports. At the moment only a single listener is supported. It is an error to call this without unregistering.

Request

NameType
listener HidReportListener

Response

NameType
s zx/status

SetReport

Set a given report. Only FEATURE and OUTPUT type reports can be set. Setting an INPUT report is an error.

Request

NameType
rpt_type HidReportType
rpt_id uint8
report vector<uint8>[8192]

Response

NameType
s zx/status

UnregisterListener

Unregister the listener.

Request

<EMPTY>

HidReportListener

Defined in fuchsia.hardware.hiddevice/hiddevice.fidl

ReceiveReport

Sends a single report to the listener. This comes with a timestamp that was gotten from the computer's monotonic clock.

Request

NameType
report vector<uint8>[8192]
report_time zx/time

STRUCTS

HidDeviceInfo

Defined in fuchsia.hardware.hiddevice/hiddevice.fidl

FieldTypeDescriptionDefault
vendor_id uint32 No default
product_id uint32 No default
version uint32 No default

ENUMS

HidReportType strict

Type: uint8

Defined in fuchsia.hardware.hiddevice/hiddevice.fidl

NameValueDescription
INPUT 1
OUTPUT 2
FEATURE 3

CONSTANTS

NameValueTypeDescription
HID_MAX_DESC_LEN 8192 uint16
HID_MAX_REPORT_IDS 256 uint16
HID_MAX_REPORT_LEN 8192 uint16