Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libusb Handle report IDs a little better (but still not ...



details:   https://anonhg.NetBSD.org/src/rev/93d9a977a8b2
branches:  trunk
changeset: 482818:93d9a977a8b2
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Feb 22 12:39:22 2000 +0000

description:
Handle report IDs a little better (but still not right).

diffstat:

 lib/libusb/parse.c |  7 ++++---
 lib/libusb/usb.3   |  6 +++---
 lib/libusb/usb.h   |  3 ++-
 3 files changed, 9 insertions(+), 7 deletions(-)

diffs (79 lines):

diff -r e2090b9161f6 -r 93d9a977a8b2 lib/libusb/parse.c
--- a/lib/libusb/parse.c        Tue Feb 22 12:29:56 2000 +0000
+++ b/lib/libusb/parse.c        Tue Feb 22 12:39:22 2000 +0000
@@ -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 <augustss%netbsd.org@localhost>
@@ -226,6 +226,7 @@
                                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 @@
                                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 @@
                *idp = 0;
        memset(&h, 0, sizeof h);
        for (d = hid_start_parse(r, 1<<k); hid_get_item(d, &h); ) {
-               if (h.report_ID != 0) {
+               if (h.report_ID != NO_REPORT_ID) {
                        if (idp)
                                *idp = h.report_ID;
                        id = 8;
diff -r e2090b9161f6 -r 93d9a977a8b2 lib/libusb/usb.3
--- a/lib/libusb/usb.3  Tue Feb 22 12:29:56 2000 +0000
+++ b/lib/libusb/usb.3  Tue Feb 22 12:39:22 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: usb.3,v 1.9 1999/11/08 22:33:40 augustss Exp $
+.\"    $NetBSD: usb.3,v 1.10 2000/02/22 12:39:22 augustss Exp $
 .\"
 .\" Copyright (c) 1999 Lennart Augustsson <augustss%netbsd.org@localhost>
 .\" All rights reserved.
@@ -75,7 +75,7 @@
 .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 @@
 .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 -r e2090b9161f6 -r 93d9a977a8b2 lib/libusb/usb.h
--- a/lib/libusb/usb.h  Tue Feb 22 12:29:56 2000 +0000
+++ b/lib/libusb/usb.h  Tue Feb 22 12:39:22 2000 +0000
@@ -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 <augustss%netbsd.org@localhost>
@@ -45,6 +45,7 @@
        int unit;
        int report_size;
        int report_ID;
+#define NO_REPORT_ID 0
        int report_count;
        /* Local */
        unsigned int usage;



Home | Main Index | Thread Index | Old Index