diff options
author | mav <mav@FreeBSD.org> | 2011-09-28 14:52:25 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2011-09-28 14:52:25 +0000 |
commit | 3a1a19715027c5c03af47ff8d3ce06461e3b4d65 (patch) | |
tree | ed5b81a92c39c4c34a4ab0631b21d7f1764a740f /lib/libusbhid/usbhid.h | |
parent | 3383aff65a84084093f4575d6098fac891dcbab9 (diff) | |
download | FreeBSD-src-3a1a19715027c5c03af47ff8d3ce06461e3b4d65.zip FreeBSD-src-3a1a19715027c5c03af47ff8d3ce06461e3b4d65.tar.gz |
MFprojects/hid:
Import the rest of HID improvements from the branch:
- improve report descriptor parser in libusbhid to handle several kinds of
reports same time;
- add to the libusbhid API two functions wrapping respective kernel IOCTLs
for reading and writing reports;
- tune uhid IOCTL interface to allow reading and writing arbitrary report,
when multiple supported by the device;
- teach usbhidctl to set output and feature reports;
- make usbhidaction support all the same item names as bhidctl.
Sponsored by: iXsystems, inc.
Diffstat (limited to 'lib/libusbhid/usbhid.h')
-rw-r--r-- | lib/libusbhid/usbhid.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libusbhid/usbhid.h b/lib/libusbhid/usbhid.h index 5e098ea..231ee1f 100644 --- a/lib/libusbhid/usbhid.h +++ b/lib/libusbhid/usbhid.h @@ -76,6 +76,7 @@ typedef struct hid_item { #define HID_PAGE(u) (((u) >> 16) & 0xffff) #define HID_USAGE(u) ((u) & 0xffff) +#define HID_HAS_GET_SET_REPORT 1 __BEGIN_DECLS @@ -104,5 +105,9 @@ int hid_parse_usage_page(const char *name); /* Extracting/insertion of data, data.c: */ int32_t hid_get_data(const void *p, const hid_item_t *h); void hid_set_data(void *p, const hid_item_t *h, int32_t data); +int hid_get_report(int fd, enum hid_kind k, + unsigned char *data, unsigned int size); +int hid_set_report(int fd, enum hid_kind k, + unsigned char *data, unsigned int size); __END_DECLS |