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

fuchsia.hardware.hidbus

PROTOCOLS

Hidbus

Defined in fuchsia.hardware.hidbus/hidbus.fidl

GetDescriptor

Request

NameType
desc_type HidDescriptionType

Response

NameType
s zx/status
data vector<uint8>

GetIdle

Request

NameType
rpt_id uint8

Response

NameType
s zx/status
duration uint8

GetProtocol

Request

NameType

Response

NameType
s zx/status
protocol HidProtocol

GetReport

Request

NameType
rpt_type HidReportType
rpt_id uint8

Response

NameType
s zx/status
data vector<uint8>

Query

Obtain information about the hidbus device and supported features. Safe to call at any time.

Request

NameType
options uint32

Response

NameType
s zx/status
info HidInfo

SetIdle

Request

NameType
rpt_id uint8
duration uint8

Response

NameType
s zx/status

SetProtocol

Request

NameType
protocol HidProtocol

Response

NameType
s zx/status

SetReport

Request

NameType
rpt_type HidReportType
rpt_id uint8
data vector<uint8>

Response

NameType
s zx/status

Start

Start the hidbus device. The device may begin queueing hid reports via ifc->io_queue before this function returns. It is an error to start an already-started hidbus device.

Request

NameType
ifc HidbusIfc

Response

NameType
s zx/status

Stop

Stop the hidbus device. Safe to call if the hidbus is already stopped.

Request

NameType

Response

NameType

HidbusIfc

Defined in fuchsia.hardware.hidbus/hidbus.fidl

IoQueue

Queues a report received by the hidbus device. Timestamp should be whenever the report was created. Ideally it should come from the driver's IRQ callback. If the driver doesn't have something like that it should fill this with zx_clock_get_monotonic()

Request

NameType
buf vector<uint8>
timestamp zx/time

Response

NameType

STRUCTS

HidInfo

Defined in fuchsia.hardware.hidbus/hidbus.fidl

NameTypeDescriptionDefault
dev_num uint8 No default
device_class HidDeviceClass No default
boot_device bool No default
vendor_id uint32 No default
product_id uint32 No default
version uint32 No default

ENUMS

HidDescriptionType

Type: uint8

Defined in fuchsia.hardware.hidbus/hidbus.fidl

NameValueDescription
REPORT 34

HidDeviceClass

Type: uint8

Defined in fuchsia.hardware.hidbus/hidbus.fidl

NameValueDescription
OTHER 0
KBD 1
POINTER 2
KBD_POINTER 3

HidProtocol

Type: uint8

Defined in fuchsia.hardware.hidbus/hidbus.fidl

NameValueDescription
BOOT 0
REPORT 1

HidReportType

Type: uint8

Defined in fuchsia.hardware.hidbus/hidbus.fidl

NameValueDescription
INPUT 1
OUTPUT 2
FEATURE 3

CONSTANTS

NameValueTypeDescription
HID_DEVICE_CLASS_FIRST 0 uint8
HID_DEVICE_CLASS_LAS 3 uint8
HID_MAX_DESC_LEN 8192 uint16