diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-20 20:29:45 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-20 20:29:45 +0000 |
commit | 5590301e7fb72350ca26fffa01174b96b02e8da6 (patch) | |
tree | 170c1723e06c3d6e3e7ddfedb6bc98b49bd538b8 /examples/xusb.c | |
parent | 8242029421bb27e7568ca9be29982b902d62d681 (diff) | |
download | libusb-5590301e7fb72350ca26fffa01174b96b02e8da6.tar.gz |
r93: HID part 2 (WIP)
- added composite HID device support in xusb.c
- fixed signed/unsigned bug in windows_compat.c (Orin Eman)
- added support for synchronous completion of async requests
- composite HID device support (ClassGUID fallback for driver unavail., read interface number from MI_##, extra path for HID)
- generic interface_by_endpoint and get_valid_interface
- added HID struct in priv
- HID submit_control_transfer
Diffstat (limited to 'examples/xusb.c')
-rw-r--r-- | examples/xusb.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/examples/xusb.c b/examples/xusb.c index ecb6070..3e0b0ac 100644 --- a/examples/xusb.c +++ b/examples/xusb.c @@ -402,9 +402,9 @@ int test_device(uint16_t vid, uint16_t pid) if (iface == 0) { // Maybe we need to detach the driver perr("failed. Trying to detach driver...\n"); - CALL_CHECK(libusb_detach_kernel_driver(handle, iface)); + libusb_detach_kernel_driver(handle, iface); printf("Claiming interface again...\n"); - CALL_CHECK(libusb_claim_interface(handle, iface)); + libusb_claim_interface(handle, iface); } else { printf("failed.\n"); } @@ -449,7 +449,7 @@ int main(int argc, char** argv) if (argc == 2) { if ((argv[1][0] != '-') || (argv[1][1] == 'h')) { - printf("usage: %s [-h] [-i] [-j] [-k] [-x]\n", argv[0]); + printf("usage: %s [-h] [-i] [-j] [-k] [-l] [-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"); @@ -476,6 +476,12 @@ int main(int argc, char** argv) PID = 0x6025; test_mode = USE_KEY; break; + case 'l': + // Plantronics DSP 400, 2 channel HID composite device - 1 HID interface + VID = 0x047F; + PID = 0x0CA1; + test_mode = USE_HID; + break; default: break; } |