Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.4 KiB

  1. #ifndef __USB200_H__
  2. #define __USB200_H__
  3. #include "usb100.h"
  4. #include <PSHPACK1.H>
  5. typedef enum _USB_DEVICE_SPEED {
  6. UsbLowSpeed = 0,
  7. UsbFullSpeed,
  8. UsbHighSpeed
  9. } USB_DEVICE_SPEED;
  10. typedef enum _USB_DEVICE_TYPE {
  11. Usb11Device = 0,
  12. Usb20Device
  13. } USB_DEVICE_TYPE;
  14. // standard definiions for the port status
  15. // word of the HUB port register
  16. #define USB_PORT_STATUS_CONNECT 0x0001
  17. #define USB_PORT_STATUS_ENABLE 0x0002
  18. #define USB_PORT_STATUS_SUSPEND 0x0004
  19. #define USB_PORT_STATUS_OVER_CURRENT 0x0008
  20. #define USB_PORT_STATUS_RESET 0x0010
  21. #define USB_PORT_STATUS_POWER 0x0100
  22. #define USB_PORT_STATUS_LOW_SPEED 0x0200
  23. #define USB_PORT_STATUS_HIGH_SPEED 0x0400
  24. typedef union _BM_REQUEST_TYPE {
  25. struct _BM {
  26. UCHAR Recipient:2;
  27. UCHAR Reserved:3;
  28. UCHAR Type:2;
  29. UCHAR Dir:1;
  30. };
  31. UCHAR B;
  32. } BM_REQUEST_TYPE, *PBM_REQUEST_TYPE;
  33. typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET {
  34. BM_REQUEST_TYPE bmRequestType;
  35. UCHAR bRequest;
  36. union _wValue {
  37. struct {
  38. UCHAR LowByte;
  39. UCHAR HiByte;
  40. };
  41. USHORT W;
  42. } wValue;
  43. union _wIndex {
  44. struct {
  45. UCHAR LowByte;
  46. UCHAR HiByte;
  47. };
  48. USHORT W;
  49. } wIndex;
  50. USHORT wLength;
  51. } USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET;
  52. // setup packet is eight bytes -- defined by spec
  53. C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8);
  54. #define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
  55. #define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07
  56. typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR {
  57. UCHAR bLength;
  58. UCHAR bDescriptorType;
  59. USHORT bcdUSB;
  60. UCHAR bDeviceClass;
  61. UCHAR bDeviceSubClass;
  62. UCHAR bDeviceProtocol;
  63. UCHAR bMaxPacketSize0;
  64. UCHAR bNumConfigurations;
  65. UCHAR bReserved;
  66. } USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR;
  67. typedef union _USB_HIGH_SPEED_MAXPACKET {
  68. struct _MP {
  69. USHORT MaxPacket:11; /* 0..10 */
  70. USHORT HSmux:2; /* 11..12 */
  71. USHORT Reserved:3; /* 13..15 */
  72. };
  73. USHORT us;
  74. } USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET;
  75. #include <POPPACK.H>
  76. #endif __USB200_H__