diff options
author | 2016-01-20 01:19:28 +0000 | |
---|---|---|
committer | 2016-01-20 01:19:28 +0000 | |
commit | fc330ebd793031aa9743badc33736c733fa549bd (patch) | |
tree | 2dcdd6394dd5faaa71fb260842a6c0bcb0d1d3c6 /sys/dev/i2c/ihidev.h | |
parent | add hid_get_udata (diff) | |
download | wireguard-openbsd-fc330ebd793031aa9743badc33736c733fa549bd.tar.xz wireguard-openbsd-fc330ebd793031aa9743badc33736c733fa549bd.zip |
add the ability to set and get reports
establish interrupt before probing for devices to handle each report id
sign an int, found by jsg
Diffstat (limited to 'sys/dev/i2c/ihidev.h')
-rw-r--r-- | sys/dev/i2c/ihidev.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/dev/i2c/ihidev.h b/sys/dev/i2c/ihidev.h index 47c0e153c11..a10259fa7f4 100644 --- a/sys/dev/i2c/ihidev.h +++ b/sys/dev/i2c/ihidev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ihidev.h,v 1.2 2016/01/13 10:25:31 kettenis Exp $ */ +/* $OpenBSD: ihidev.h,v 1.3 2016/01/20 01:19:28 jcs Exp $ */ /* * HID-over-i2c driver * @@ -80,7 +80,7 @@ struct ihidev_softc { uint8_t *sc_report; int sc_reportlen; - u_int sc_nrepid; + int sc_nrepid; struct ihidev **sc_subdevs; u_int sc_isize; @@ -109,13 +109,20 @@ struct ihidev_attach_arg { #define IHIDEV_CLAIM_ALLREPORTID 255 }; +struct i2c_hid_report_request { + u_int id; + u_int type; +#define I2C_HID_REPORT_TYPE_INPUT 0x1 +#define I2C_HID_REPORT_TYPE_OUTPUT 0x2 +#define I2C_HID_REPORT_TYPE_FEATURE 0x3 + void *data; + u_int len; +}; + void ihidev_get_report_desc(struct ihidev_softc *, void **, int *); int ihidev_open(struct ihidev *); void ihidev_close(struct ihidev *); int ihidev_ioctl(struct ihidev *, u_long, caddr_t, int, struct proc *); -int ihidev_set_report(struct ihidev_softc *, int, int, void *, int); -int ihidev_set_report_async(struct ihidev_softc *, int, int, void *, int); -int ihidev_get_report(struct ihidev_softc *, int, int, void *, int); -int ihidev_get_report_async(struct ihidev_softc *, int, int, void *, int, - void *, void (*)(void *, int, void *, int)); +int ihidev_set_report(struct device *, int, int, void *, int); +int ihidev_get_report(struct device *, int, int, void *, int); |