]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
hid: Import HID transport method definitions and helper functions.
authorVladimir Kondratyev <wulf@FreeBSD.org>
Tue, 6 Oct 2020 19:42:22 +0000 (22:42 +0300)
committerVladimir Kondratyev <wulf@FreeBSD.org>
Thu, 7 Jan 2021 23:18:42 +0000 (02:18 +0300)
commit961a3535db3ca1d330e5ddf96419ef3904738ae6
tree3bfa3f0843fc095bcd98f4b981e24df1061425f0
parenteead9017d28366016dece0dbc027c5baefcf2cfe
hid: Import HID transport method definitions and helper functions.

Create an abstract HID interface that provides hardware independent
access to HID capabilities and functions through the device tree.

hid_if.m resembles existing USBHID KPI and consist of next methods:

HID method USBHID variant
-----------------------------------------------------------------------
hid_intr_setup usbd_transfer_setup (INTERRUPT IN xfer)
hid_intr_unsetup usbd_transfer_unsetup (INTERRUPT IN xfer)
hid_intr_start usbd_transfer_start (INTERRUPT IN xfer)
hid_intr_stop usbd_transfer_drain (INTERRUPT IN xfer)
hid_intr_poll usbd_transfer_poll (INTERRUPT IN xfer)

hid_get_rdesc usbd_req_get_report_descriptor
hid_read No direct analog. Not intended for common use.
hid_write uhid(4) write()
hid_get_report usbd_req_get_report
hid_set_report usbd_req_set_report
hid_set_idle usbd_req_set_idle
hid_set_protocol usbd_req_set_protocol

This change is part of D27888
sys/conf/files
sys/dev/hid/hid.c
sys/dev/hid/hid.h
sys/dev/hid/hid_if.m [new file with mode: 0644]
sys/modules/hid/hid/Makefile