fuchsia.hardware.input

PROTOCOLS

Device

Defined in fuchsia.hardware.input/input.fidl

GetBootProtocol

Get the HID boot interface protocol this device supports

Request

NameType

Response

NameType
protocol BootProtocol

GetDeviceIds

Get the Device's IDs. If this is a real HID device, the IDs will come from the device. If it is a mock HID decice, the IDs will either be 0's or user defined.

Request

NameType

Response

NameType
ids DeviceIds

GetReportDescSize

Get the size of the report descriptor

Request

NameType

Response

NameType
size uint16

GetReportDesc

Get the report descriptor

Request

NameType

Response

NameType
desc vector<uint8>[8192]

GetNumReports

Get the number of reports in the report descriptor

Request

NameType

Response

NameType
count uint16

GetReportIds

Get the report ids that are used in the report descriptor

Request

NameType

Response

NameType
ids vector<uint8>[256]

GetReportSize

Get the size of a single report for the given (type, id) pair.

Request

NameType
type ReportType
id ReportId

Response

NameType
status zx/status
size uint16

GetMaxInputReportSize

Get the maximum size of a single input report.

Request

NameType

Response

NameType
size uint16

GetReports

Receive up to MAX_REPORT_DATA bytes of reports that have been sent from a device. This is the interface that is supposed to be used for continuous polling. Multiple reports can be returned from this API at a time, it is up to the client to do the parsing of the reports with the correct sizes and offset. It is guaranteed that only whole reports will be sent. If there are no reports, this will return ZX_ERR_SHOULD_WAIT, and the client can wait on the event from |GetReportsEvent|.

Request

NameType

Response

NameType
status zx/status
data vector<uint8>[8192]

GetReportsEvent

Receive an event that will be signalled when there are reports in the Device's report FIFO.

Request

NameType

Response

NameType
status zx/status
event handle<event>

GetReport

Get a single report of the given (type, id) pair. This interface is not intended to be used for continuous polling of the reports.

Request

NameType
type ReportType
id ReportId

Response

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

SetReport

Set a single report of the given (type, id) pair.

Request

NameType
type ReportType
id ReportId
report vector<uint8>[8192]

Response

NameType
status zx/status

SetTraceId

Set the trace ID that is used for HID report flow events.

Request

NameType
id uint32

STRUCTS

DeviceIds

Defined in fuchsia.hardware.input/input.fidl

DeviceIds lets a clients determine the vendor and product id for a device. If the device is real HID device, then the id information will come from the device itself. Mock HID devices may assign the ids in the driver. If the mock HID driver does not assign ids, zeros will be used instead.

NameTypeDescriptionDefault
vendor_id uint32 No default
product_id uint32 No default
version uint32 No default

ENUMS

BootProtocol

Type: uint32

Defined in fuchsia.hardware.input/input.fidl

NameValueDescription
NONE 0
KBD 1
MOUSE 2

ReportType

Type: uint8

Defined in fuchsia.hardware.input/input.fidl

NameValueDescription
INPUT 1
OUTPUT 2
FEATURE 3

CONSTANTS

NameValueTypeDescription
MAX_DESC_LEN 8192 uint16
MAX_REPORT_LEN 8192 uint16
MAX_REPORT_DATA 8192 uint16
MAX_REPORT_IDS 256 uint16

TYPE ALIASES

NameValueDescription
ReportId uint8