Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/usbhidctl Sync with libusb.



details:   https://anonhg.NetBSD.org/src/rev/7f1e0bfb250d
branches:  trunk
changeset: 472914:7f1e0bfb250d
user:      augustss <augustss%NetBSD.org@localhost>
date:      Wed May 12 00:38:20 1999 +0000

description:
Sync with libusb.

diffstat:

 usr.bin/usbhidctl/usbhid.c |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (80 lines):

diff -r 966f45f4ebe3 -r 7f1e0bfb250d usr.bin/usbhidctl/usbhid.c
--- a/usr.bin/usbhidctl/usbhid.c        Wed May 12 00:37:43 1999 +0000
+++ b/usr.bin/usbhidctl/usbhid.c        Wed May 12 00:38:20 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbhid.c,v 1.10 1999/05/12 00:05:11 augustss Exp $     */
+/*     $NetBSD: usbhid.c,v 1.11 1999/05/12 00:38:20 augustss Exp $     */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -104,8 +104,8 @@
                return;
        printf("%s size=%d count=%d page=%s usage=%s%s", label,
               h->report_size, h->report_count, 
-              usage_page(HID_PAGE(h->usage)), 
-              usage_in_page(h->usage),
+              hid_usage_page(HID_PAGE(h->usage)), 
+              hid_usage_in_page(h->usage),
               h->flags & HIO_CONST ? " Const" : "");
        printf(", logical range %d..%d",
               h->logical_minimum, h->logical_maximum);
@@ -128,8 +128,8 @@
                switch (h.kind) {
                case hid_collection:
                        printf("Collection page=%s usage=%s\n",
-                              usage_page(HID_PAGE(h.usage)), 
-                              usage_in_page(h.usage));
+                              hid_usage_page(HID_PAGE(h.usage)), 
+                              hid_usage_in_page(h.usage));
                        break;
                case hid_endcollection:
                        printf("End collection\n");
@@ -186,7 +186,7 @@
 
        pos = h->pos;
        for (i = 0; i < h->report_count; i++) {
-               data = get_data(buf, h);
+               data = hid_get_data(buf, h);
                if (h->logical_minimum < 0)
                        printf("%d", (int)data);
                else
@@ -241,11 +241,11 @@
                for (n = hids; n; n = n->next) {
                        namep = namebuf;
                        namep += sprintf(namep, "%s:%s.",
-                                        usage_page(HID_PAGE(n->collection)),
-                                        usage_in_page(n->collection));
+                                        hid_usage_page(HID_PAGE(n->collection)),
+                                        hid_usage_in_page(n->collection));
                        namep += sprintf(namep, "%s:%s",
-                                        usage_page(HID_PAGE(n->usage)),
-                                        usage_in_page(n->usage));
+                                        hid_usage_page(HID_PAGE(n->usage)),
+                                        hid_usage_in_page(n->usage));
                        if (all || gotname(namebuf)) {
                                if (!noname)
                                        printf("%s=", namebuf);
@@ -318,13 +318,13 @@
                dev = devname;
        }
 
-       init_hid(table);
+       hid_init(table);
 
        f = open(dev, O_RDWR);
        if (f < 0)
                err(1, "%s", dev);
 
-       r = get_report_desc(f);
+       r = hid_get_report_desc(f);
        if (r == 0) 
                errx(1, "USB_GET_REPORT_DESC");
               
@@ -335,6 +335,6 @@
        if (nnames != 0 || all)
                dumpdata(f, r, loop);
 
-       dispose_report_desc(r);
+       hid_dispose_report_desc(r);
        exit(0);
 }



Home | Main Index | Thread Index | Old Index