Hardware Reference
In-Depth Information
40 desc->bDeviceProtocol);
41 printf(" device %u, manuf %u, serial %u\n",
42 desc->bcdDevice,
43 desc->iManufacturer,
44 desc->iSerial Number);
45
46 hdev = usb_open(dev);
47 assert(hdev);
48
49 rc = usb_claim_interface(hdev,0);
50 if ( !rc ) {
51 puts(" CLAIMED..");
52 rc = usb_release_interface(hdev, 0);
53 puts(" RELEASED..");
54 assert(!rc);
55 }
56 usb_close(hdev);
57
58 /
/
59 for ( cx=0; cx <dev->descriptor.bNumConfigurations;
++cx ) {
60 /
Configurations
/
61 for ( ix=0; ix < dev->config[cx].bNumInterfaces;
++ix ) {
62 /
Interfaces
/
63 for ( ax=0; ax < dev->config[cx].interface[ix].
num_altsetting;
++ax ) {
64 printf(" %d.%d.%d class %u\n",
65 cx,ix,ax,
66 dev->config[cx].interface[ix].
altsetting[ax].bInterfaceClass);
67 }
68 }
69 }
70 }
71 }
72
73 return 0;
74 }
75
76 /
Alternates
End tusb.c
/
 
Search WWH ::




Custom Search