Changeset 5650 in vbox
- Timestamp:
- Nov 9, 2007 2:55:51 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 25988
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/usb.h
r4071 r5650 196 196 typedef USBDEVICE *PCUSBDEVICE; 197 197 198 199 #ifdef VBOX_USB_H_INCL_DESCRIPTORS /* for the time being, since this may easily conflict with system headers */ 200 201 /** 202 * USB device descriptor. 203 */ 204 #pragma pack(1) 205 typedef struct USBDESCHDR 206 { 207 /** The descriptor length. */ 208 uint8_t bLength; 209 /** The descriptor type. */ 210 uint8_t bDescriptorType; 211 } USBDESCHDR; 212 #pragma pack() 213 /** Pointer to an USB descriptor header. */ 214 typedef USBDESCHDR *PUSBDESCHDR; 215 216 /** @name Descriptor Type values (bDescriptorType) 217 * {@ */ 218 #if !defined(USB_DT_DEVICE) && !defined(USB_DT_ENDPOINT) 219 # define USB_DT_DEVICE 0x01 220 # define USB_DT_CONFIG 0x02 221 # define USB_DT_STRING 0x03 222 # define USB_DT_INTERFACE 0x04 223 # define USB_DT_ENDPOINT 0x05 224 225 # define USB_DT_HID 0x21 226 # define USB_DT_REPORT 0x22 227 # define USB_DT_PHYSICAL 0x23 228 # define USB_DT_HUB 0x29 229 #endif 230 /** @} */ 231 232 233 /** 234 * USB device descriptor. 235 */ 236 #pragma pack(1) 237 typedef struct USBDEVICEDESC 238 { 239 /** The descriptor length. (Usually sizeof(USBDEVICEDESC).) */ 240 uint8_t bLength; 241 /** The descriptor type. (USB_DT_DEVICE) */ 242 uint8_t bDescriptorType; 243 /** USB version number. */ 244 uint16_t bcdUSB; 245 /** Device class. */ 246 uint8_t bDeviceClass; 247 /** Device subclass. */ 248 uint8_t bDeviceSubClass; 249 /** Device protocol */ 250 uint8_t bDeviceProtocol; 251 /** The max packet size of the default control pipe. */ 252 uint8_t bMaxPacketSize0; 253 /** Vendor ID. */ 254 uint16_t idVendor; 255 /** Product ID. */ 256 uint16_t idProduct; 257 /** Revision, integer part. */ 258 uint16_t bcdDevice; 259 /** Manufacturer string index. */ 260 uint8_t iManufacturer; 261 /** Product string index. */ 262 uint8_t iProduct; 263 /** Serial number string index. */ 264 uint8_t iSerialNumber; 265 /** Number of configurations. */ 266 uint8_t bNumConfigurations; 267 } USBDEVICEDESC; 268 #pragma pack() 269 /** Pointer to an USB device descriptor. */ 270 typedef USBDEVICEDESC *PUSBDEVICEDESC; 271 272 /** @name Class codes (bDeviceClass) 273 * @{ */ 274 #ifndef USB_HUB_CLASSCODE 275 # define USB_HUB_CLASSCODE 0x09 276 #endif 277 /** @} */ 278 279 /** 280 * USB configuration descriptor. 281 */ 282 #pragma pack(1) 283 typedef struct USBCONFIGDESC 284 { 285 /** The descriptor length. (Usually sizeof(USBCONFIGDESC).) */ 286 uint8_t bLength; 287 /** The descriptor type. (USB_DT_CONFIG) */ 288 uint8_t bDescriptorType; 289 /** The length of the configuration descriptor plus all associated descriptors. */ 290 uint16_t wTotalLength; 291 /** Number of interfaces. */ 292 uint8_t bNumInterfaces; 293 /** Configuration number. (For SetConfiguration().) */ 294 uint8_t bConfigurationValue; 295 /** Configuration description string. */ 296 uint8_t iConfiguration; 297 /** Configuration characteristics. */ 298 uint8_t bmAttributes; 299 /** Maximum power consumption of the USB device in this config. */ 300 uint8_t MaxPower; 301 } USBCONFIGDESC; 302 #pragma pack() 303 /** Pointer to an USB configuration descriptor. */ 304 typedef USBCONFIGDESC *PUSBCONFIGDESC; 305 306 #endif /* VBOX_USB_H_INCL_DESCRIPTORS */ 307 198 308 __END_DECLS 199 309 200 310 #endif 311
Note:
See TracChangeset
for help on using the changeset viewer.