13 /* All standard descriptors have these 2 fields in common */
14 struct usb_descriptor_header {
16 - u_int8_t bDescriptorType;
18 + uint8_t bDescriptorType;
21 /* String descriptor */
22 struct usb_string_descriptor {
24 - u_int8_t bDescriptorType;
27 + uint8_t bDescriptorType;
32 struct usb_hid_descriptor {
34 - u_int8_t bDescriptorType;
36 - u_int8_t bCountryCode;
37 - u_int8_t bNumDescriptors;
38 - /* u_int8_t bReportDescriptorType; */
39 - /* u_int16_t wDescriptorLength; */
41 + uint8_t bDescriptorType;
43 + uint8_t bCountryCode;
44 + uint8_t bNumDescriptors;
45 + /* uint8_t bReportDescriptorType; */
46 + /* uint16_t wDescriptorLength; */
50 /* Endpoint descriptor */
51 #define USB_MAXENDPOINTS 32
52 struct usb_endpoint_descriptor {
54 - u_int8_t bDescriptorType;
55 - u_int8_t bEndpointAddress;
56 - u_int8_t bmAttributes;
57 - u_int16_t wMaxPacketSize;
60 - u_int8_t bSynchAddress;
62 + uint8_t bDescriptorType;
63 + uint8_t bEndpointAddress;
64 + uint8_t bmAttributes;
65 + uint16_t wMaxPacketSize;
68 + uint8_t bSynchAddress;
70 unsigned char *extra; /* Extra descriptors */
72 @@ -129,15 +130,15 @@ struct usb_endpoint_descriptor {
73 /* Interface descriptor */
74 #define USB_MAXINTERFACES 32
75 struct usb_interface_descriptor {
77 - u_int8_t bDescriptorType;
78 - u_int8_t bInterfaceNumber;
79 - u_int8_t bAlternateSetting;
80 - u_int8_t bNumEndpoints;
81 - u_int8_t bInterfaceClass;
82 - u_int8_t bInterfaceSubClass;
83 - u_int8_t bInterfaceProtocol;
84 - u_int8_t iInterface;
86 + uint8_t bDescriptorType;
87 + uint8_t bInterfaceNumber;
88 + uint8_t bAlternateSetting;
89 + uint8_t bNumEndpoints;
90 + uint8_t bInterfaceClass;
91 + uint8_t bInterfaceSubClass;
92 + uint8_t bInterfaceProtocol;
95 struct usb_endpoint_descriptor *endpoint;
97 @@ -155,14 +156,14 @@ struct usb_interface {
98 /* Configuration descriptor information.. */
99 #define USB_MAXCONFIG 8
100 struct usb_config_descriptor {
102 - u_int8_t bDescriptorType;
103 - u_int16_t wTotalLength;
104 - u_int8_t bNumInterfaces;
105 - u_int8_t bConfigurationValue;
106 - u_int8_t iConfiguration;
107 - u_int8_t bmAttributes;
110 + uint8_t bDescriptorType;
111 + uint16_t wTotalLength;
112 + uint8_t bNumInterfaces;
113 + uint8_t bConfigurationValue;
114 + uint8_t iConfiguration;
115 + uint8_t bmAttributes;
118 struct usb_interface *interface;
120 @@ -172,28 +173,28 @@ struct usb_config_descriptor {
122 /* Device descriptor */
123 struct usb_device_descriptor {
125 - u_int8_t bDescriptorType;
127 - u_int8_t bDeviceClass;
128 - u_int8_t bDeviceSubClass;
129 - u_int8_t bDeviceProtocol;
130 - u_int8_t bMaxPacketSize0;
131 - u_int16_t idVendor;
132 - u_int16_t idProduct;
133 - u_int16_t bcdDevice;
134 - u_int8_t iManufacturer;
136 - u_int8_t iSerialNumber;
137 - u_int8_t bNumConfigurations;
139 + uint8_t bDescriptorType;
141 + uint8_t bDeviceClass;
142 + uint8_t bDeviceSubClass;
143 + uint8_t bDeviceProtocol;
144 + uint8_t bMaxPacketSize0;
146 + uint16_t idProduct;
147 + uint16_t bcdDevice;
148 + uint8_t iManufacturer;
150 + uint8_t iSerialNumber;
151 + uint8_t bNumConfigurations;
154 struct usb_ctrl_setup {
155 - u_int8_t bRequestType;
160 + uint8_t bRequestType;
168 @@ -254,7 +255,7 @@ struct usb_device {
170 void *dev; /* Darwin support */
175 unsigned char num_children;
176 struct usb_device **children;
177 @@ -266,7 +267,7 @@ struct usb_bus {
178 char dirname[PATH_MAX + 1];
180 struct usb_device *devices;
181 - u_int32_t location;
184 struct usb_device *root_dev;