Deleted Added
full compact
usbhid.h (72065) usbhid.h (92917)
1/* $NetBSD: usb.h,v 1.8 2000/08/13 22:22:02 augustss Exp $ */
2
3/*
4 * Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/* $NetBSD: usb.h,v 1.8 2000/08/13 22:22:02 augustss Exp $ */
2
3/*
4 * Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/lib/libusbhid/usbhid.h 72065 2001-02-06 00:54:00Z bde $
28 * $FreeBSD: head/lib/libusbhid/usbhid.h 92917 2002-03-21 23:54:04Z obrien $
29 *
30 */
31
32#include <sys/cdefs.h>
33
34typedef struct report_desc *report_desc_t;
35
36typedef struct hid_data *hid_data_t;

--- 36 unchanged lines hidden (view full) ---

73 /* */
74 struct hid_item *next;
75} hid_item_t;
76
77#define HID_PAGE(u) (((u) >> 16) & 0xffff)
78#define HID_USAGE(u) ((u) & 0xffff)
79
80/* Obtaining a report descriptor, descr.c: */
29 *
30 */
31
32#include <sys/cdefs.h>
33
34typedef struct report_desc *report_desc_t;
35
36typedef struct hid_data *hid_data_t;

--- 36 unchanged lines hidden (view full) ---

73 /* */
74 struct hid_item *next;
75} hid_item_t;
76
77#define HID_PAGE(u) (((u) >> 16) & 0xffff)
78#define HID_USAGE(u) ((u) & 0xffff)
79
80/* Obtaining a report descriptor, descr.c: */
81report_desc_t hid_get_report_desc __P((int file));
82report_desc_t hid_use_report_desc __P((unsigned char *data, unsigned int size));
83void hid_dispose_report_desc __P((report_desc_t));
81report_desc_t hid_get_report_desc(int file);
82report_desc_t hid_use_report_desc(unsigned char *data, unsigned int size);
83void hid_dispose_report_desc(report_desc_t);
84
85/* Parsing of a HID report descriptor, parse.c: */
84
85/* Parsing of a HID report descriptor, parse.c: */
86hid_data_t hid_start_parse __P((report_desc_t d, int kindset));
87void hid_end_parse __P((hid_data_t s));
88int hid_get_item __P((hid_data_t s, hid_item_t *h));
89int hid_report_size __P((report_desc_t d, unsigned int id, enum hid_kind k));
90int hid_locate __P((report_desc_t d, unsigned int usage, enum hid_kind k, hid_item_t *h));
86hid_data_t hid_start_parse(report_desc_t d, int kindset);
87void hid_end_parse(hid_data_t s);
88int hid_get_item(hid_data_t s, hid_item_t *h);
89int hid_report_size(report_desc_t d, unsigned int id, enum hid_kind k);
90int hid_locate(report_desc_t d, unsigned int usage, enum hid_kind k, hid_item_t *h);
91
92/* Conversion to/from usage names, usage.c: */
91
92/* Conversion to/from usage names, usage.c: */
93int hid_parse_usage_page __P((const char *name));
94int hid_parse_usage_in_page __P((const char *name));
95const char *hid_usage_page __P((int i));
96const char *hid_usage_in_page __P((unsigned int u));
97void hid_init __P((const char *file));
93int hid_parse_usage_page(const char *name);
94int hid_parse_usage_in_page(const char *name);
95const char *hid_usage_page(int i);
96const char *hid_usage_in_page(unsigned int u);
97void hid_init(const char *file);
98
99/* Extracting/insertion of data, data.c: */
98
99/* Extracting/insertion of data, data.c: */
100int hid_get_data __P((const void *p, const hid_item_t *h));
101void hid_set_data __P((void *p, const hid_item_t *h, int data));
100int hid_get_data(const void *p, const hid_item_t *h);
101void hid_set_data(void *p, const hid_item_t *h, int data);