diff options
author | Nathan Binkert <nate@cvs.openbsd.org> | 2002-05-09 15:06:30 +0000 |
---|---|---|
committer | Nathan Binkert <nate@cvs.openbsd.org> | 2002-05-09 15:06:30 +0000 |
commit | 23dcee9d39acf0acbda3ed2e33b4038f9d5e8132 (patch) | |
tree | c27e422c42192be2a5812b0859e70bb3754bd8b5 /sys/dev/usb/hid.h | |
parent | 02a2153e2ea77635df4c6b97678b0749f66bee42 (diff) |
Sync hid stuff including ukbd, ums, and uhid with NetBSD
This adds a uhidev device which can be thought of as something like a
uhid bus. It allows more than one ukbd, ums, or uhid to attach to the same
device instance. This functionality is found on many of the newer keyboards
that have extra buttons. (The extra buttons show up as uhid device(s)).
Tested by me on i386, dale on macppc, and jason on sparc64
Diffstat (limited to 'sys/dev/usb/hid.h')
-rw-r--r-- | sys/dev/usb/hid.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/usb/hid.h b/sys/dev/usb/hid.h index 096a34e270f..18dac5988e5 100644 --- a/sys/dev/usb/hid.h +++ b/sys/dev/usb/hid.h @@ -1,5 +1,5 @@ -/* $OpenBSD: hid.h,v 1.6 2002/05/07 18:29:18 nate Exp $ */ -/* $NetBSD: hid.h,v 1.6 2000/06/01 14:28:57 augustss Exp $ */ +/* $OpenBSD: hid.h,v 1.7 2002/05/09 15:06:29 nate Exp $ */ +/* $NetBSD: hid.h,v 1.7 2001/12/28 17:32:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/hid.h,v 1.7 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -40,7 +40,12 @@ */ enum hid_kind { - hid_input, hid_output, hid_feature, hid_collection, hid_endcollection + hid_input, + hid_output, + hid_feature, + hid_collection, + hid_endcollection, + hid_none }; struct hid_location { @@ -81,11 +86,11 @@ struct hid_item { struct hid_item *next; }; -struct hid_data *hid_start_parse(void *d, int len, int kindset); +struct hid_data *hid_start_parse(void *d, int len, enum hid_kind kind); void hid_end_parse(struct hid_data *s); int hid_get_item(struct hid_data *s, struct hid_item *h); -int hid_report_size(void *buf, int len, enum hid_kind k, u_int8_t *id); -int hid_locate(void *desc, int size, u_int32_t usage, enum hid_kind kind, - struct hid_location *loc, u_int32_t *flags); +int hid_report_size(void *buf, int len, enum hid_kind k, u_int8_t id); +int hid_locate(void *desc, int size, u_int32_t usage, u_int8_t id, + enum hid_kind kind, struct hid_location *loc, u_int32_t *flags); u_long hid_get_data(u_char *buf, struct hid_location *loc); -int hid_is_collection(void *desc, int size, u_int32_t usage); +int hid_is_collection(void *desc, int size, u_int8_t id, u_int32_t usage); |