diff --git a/lib/libusb/parse.c b/lib/libusb/parse.c index 024457b4c0d6..64380959aa94 100644 --- a/lib/libusb/parse.c +++ b/lib/libusb/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.7 1999/10/13 17:48:04 drochner Exp $ */ +/* $NetBSD: parse.c,v 1.8 2000/02/22 12:39:22 augustss Exp $ */ /* * Copyright (c) 1999 Lennart Augustsson @@ -226,6 +226,7 @@ hid_get_item(hid_data_t s, hid_item_t *h) c->collevel++; *h = *c; hid_clear_local(c); + c->report_ID = NO_REPORT_ID; s->nusage = 0; return (1); case 11: /* Feature */ @@ -238,7 +239,7 @@ hid_get_item(hid_data_t s, hid_item_t *h) c->kind = hid_endcollection; c->collevel--; *h = *c; - hid_clear_local(c); + /*hid_clear_local(c);*/ s->nusage = 0; return (1); default: @@ -364,7 +365,7 @@ hid_report_size(report_desc_t r, enum hid_kind k, int *idp) *idp = 0; memset(&h, 0, sizeof h); for (d = hid_start_parse(r, 1< .\" All rights reserved. @@ -75,7 +75,7 @@ The .Nm library provides routines to extract data from USB Human Interface Devices. .Ss INTRODUCTION -USB HID devices send and receive data layed out a device dependent +USB HID devices send and receive data layed out in a device dependent way. The .Nm library contains routines to extract the @@ -102,7 +102,7 @@ To parse the report descriptor the .Fn hid_start_parse function should be called with a report descriptor and a set that describes which items that are interesting. The set is obtained -by oring together values +by or-ing together values .Fa "(1 << k)" where .Fa k diff --git a/lib/libusb/usb.h b/lib/libusb/usb.h index 1c3f1de01ecd..5dbd68f38a7f 100644 --- a/lib/libusb/usb.h +++ b/lib/libusb/usb.h @@ -1,4 +1,4 @@ -/* $NetBSD: usb.h,v 1.5 1999/07/02 15:46:53 simonb Exp $ */ +/* $NetBSD: usb.h,v 1.6 2000/02/22 12:39:22 augustss Exp $ */ /* * Copyright (c) 1999 Lennart Augustsson @@ -45,6 +45,7 @@ typedef struct hid_item { int unit; int report_size; int report_ID; +#define NO_REPORT_ID 0 int report_count; /* Local */ unsigned int usage;