summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-01-18 20:32:38 +0000
committerPete Batard <pbatard@gmail.com>2010-01-18 20:32:38 +0000
commit7a8f7d1826c754aed2a4ae5f369b8882cc4cb884 (patch)
tree95e4b7cfe4bc9999d196974eb4f23d5ce9f4b1bd /examples
parent2012ca7b23b2199022c51e84ca1d82838a9a570c (diff)
downloadlibusb-7a8f7d1826c754aed2a4ae5f369b8882cc4cb884.tar.gz
r89: extended API support
- composite devices as a separate backend API - mutidriver support in composite devices interface - HID: device interface path, open/close (WIP) - added HID test in xusb.c - fixed Windows version and DDK support - smaller fixes
Diffstat (limited to 'examples')
-rw-r--r--examples/xusb.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/xusb.c b/examples/xusb.c
index 4775194..ecb6070 100644
--- a/examples/xusb.c
+++ b/examples/xusb.c
@@ -116,6 +116,7 @@ enum test_type {
USE_XBOX,
USE_KEY,
USE_JTAG,
+ USE_HID,
} test_mode;
uint16_t VID, PID;
@@ -448,14 +449,21 @@ int main(int argc, char** argv)
if (argc == 2) {
if ((argv[1][0] != '-') || (argv[1][1] == 'h')) {
- printf("usage: %s [-h] [-j] [-k] [-x]\n", argv[0]);
+ printf("usage: %s [-h] [-i] [-j] [-k] [-x]\n", argv[0]);
printf(" -h: display usage\n");
+ printf(" -i: test IBM HID Optical Mouse\n");
printf(" -j: test OLIMEX ARM-USB-TINY JTAG, 2 channel composite device\n");
printf(" -k: test Generic 2 GB USB Key\n");
printf(" -x: test Microsoft XBox Controller Type S (default)\n");
return 0;
}
switch(argv[1][1]) {
+ case 'i':
+ // IBM HID Optical mouse - 1 interface
+ VID = 0x04B3;
+ PID = 0x3108;
+ test_mode = USE_HID;
+ break;
case 'j':
// OLIMEX ARM-USB-TINY JTAG, 2 channel composite device - 2 interfaces
VID = 0x15BA;