summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_hid.h
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-02-24 03:34:05 +0000
committerthompsa <thompsa@FreeBSD.org>2009-02-24 03:34:05 +0000
commitd44ad0b47ee7004b108619a1cb93438a59e47ad9 (patch)
tree9040787a9ebd2efae390395c1027b740aeeec158 /sys/dev/usb/usb_hid.h
parentfb76cfd34b3ad91438117b0d283ba16c28f08efb (diff)
downloadFreeBSD-src-d44ad0b47ee7004b108619a1cb93438a59e47ad9.zip
FreeBSD-src-d44ad0b47ee7004b108619a1cb93438a59e47ad9.tar.gz
MFp4 //depot/projects/usb; 157814, 157863, 157868
- The software computed HID size is not always correct, because the algoritm does not handle unsorted HID descriptors. - Change the way we obtain the report ID. - Use the X/Y/Z+button locations instead for report ID source for ums. - Add more range checks. - Remove Microsoft Mouse quirks. If the positions are moduloed the report length multiplied by 8, the values seem correct. - Some minor style changes. Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/usb_hid.h')
-rw-r--r--sys/dev/usb/usb_hid.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_hid.h b/sys/dev/usb/usb_hid.h
index 3fb7368..7ba858d 100644
--- a/sys/dev/usb/usb_hid.h
+++ b/sys/dev/usb/usb_hid.h
@@ -79,9 +79,11 @@ struct hid_item {
struct hid_data *hid_start_parse(const void *d, int len, int kindset);
void hid_end_parse(struct hid_data *s);
int hid_get_item(struct hid_data *s, struct hid_item *h);
-int hid_report_size(const void *buf, int len, enum hid_kind k, uint8_t *id);
+int hid_report_size(const void *buf, int len, enum hid_kind k,
+ uint8_t *id);
int hid_locate(const void *desc, int size, uint32_t usage,
- enum hid_kind kind, struct hid_location *loc, uint32_t *flags);
+ enum hid_kind kind, struct hid_location *loc,
+ uint32_t *flags, uint8_t *id);
uint32_t hid_get_data(const uint8_t *buf, uint32_t len,
struct hid_location *loc);
int hid_is_collection(const void *desc, int size, uint32_t usage);
OpenPOWER on IntegriCloud