1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
7 "usb" "libusb.so" "cdecl" add-library
14 FIELD: char[4097] dirname
20 ! __attribute__ ((packed))
21 BEGIN-STRUCT: usb_device_descriptor
22 PACKED-FIELD: uchar bLength
23 PACKED-FIELD: uchar bDescriptorType
24 PACKED-FIELD: ushort bcdUSB
25 PACKED-FIELD: uchar bDeviceClass
26 PACKED-FIELD: uchar bDeviceSubClass
27 PACKED-FIELD: uchar bDeviceProtocol
28 PACKED-FIELD: uchar bMaxPacketSize0
29 PACKED-FIELD: ushort idVendor
30 PACKED-FIELD: ushort idProduct
31 PACKED-FIELD: ushort bcdDevice;
32 PACKED-FIELD: uchar iManufacturer
33 PACKED-FIELD: uchar iProduct
34 PACKED-FIELD: uchar iSerialNumber
35 PACKED-FIELD: uchar bNumConfigurations
38 BEGIN-STRUCT: usb_config_descriptor
39 PACKED-FIELD: uchar bLength ! __attribute__ ((packed))
40 PACKED-FIELD: uchar bDescriptorType ! __attribute__ ((packed))
41 PACKED-FIELD: ushort wTotalLength ! __attribute__ ((packed))
42 PACKED-FIELD: uchar bNumInterfaces ! __attribute__ ((packed))
43 PACKED-FIELD: uchar bConfigurationValue ! __attribute__ ((packed))
44 PACKED-FIELD: uchar iConfiguration ! __attribute__ ((packed))
45 PACKED-FIELD: uchar bmAttributes ! __attribute__ ((packed))
46 PACKED-FIELD: uchar MaxPower ! __attribute__ ((packed))
48 FIELD: void* interface
54 BEGIN-STRUCT: usb_device
57 FIELD: char[4097] filename
59 FIELD: usb_device_descriptor descriptor
60 FIELD: usb_config_descriptor* config
63 FIELD: uchar num_children