aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hid/hid.h
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2020-10-06 19:42:22 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2021-01-07 23:18:42 +0000
commit961a3535db3ca1d330e5ddf96419ef3904738ae6 (patch)
tree3bfa3f0843fc095bcd98f4b981e24df1061425f0 /sys/dev/hid/hid.h
parenteead9017d28366016dece0dbc027c5baefcf2cfe (diff)
downloadsrc-961a3535db3ca1d330e5ddf96419ef3904738ae6.tar.gz
src-961a3535db3ca1d330e5ddf96419ef3904738ae6.zip
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
Diffstat (limited to 'sys/dev/hid/hid.h')
-rw-r--r--sys/dev/hid/hid.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h
index 5855eeaa1802..cea33f7b4af8 100644
--- a/sys/dev/hid/hid.h
+++ b/sys/dev/hid/hid.h
@@ -331,5 +331,14 @@ bool hid_test_quirk(const struct hid_device_info *dev_info, uint16_t quirk);
int hid_add_dynamic_quirk(struct hid_device_info *dev_info,
uint16_t quirk);
void hid_quirk_unload(void *arg);
+
+int hid_get_rdesc(device_t, void *, hid_size_t);
+int hid_read(device_t, void *, hid_size_t, hid_size_t *);
+int hid_write(device_t, const void *, hid_size_t);
+int hid_get_report(device_t, void *, hid_size_t, hid_size_t *, uint8_t,
+ uint8_t);
+int hid_set_report(device_t, const void *, hid_size_t, uint8_t, uint8_t);
+int hid_set_idle(device_t, uint16_t, uint8_t);
+int hid_set_protocol(device_t, uint16_t);
#endif /* _KERNEL || _STANDALONE */
#endif /* _HID_HID_H_ */