Source code of Windows XP (NT5)
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.

117 lines
3.4 KiB

  1. /*++
  2. Structures defined in the Device Class Definition
  3. for Device Bay Controllers
  4. --*/
  5. #ifndef __DBC100_H__
  6. #define __DBC100_H__
  7. #include <PSHPACK1.H>
  8. /*
  9. Feature selectors
  10. */
  11. #define DEVICE_STATUS_CHANGE_ENABLE 0
  12. #define ENABLE_VID_POWER 1
  13. #define LOCK_CTL 2
  14. #define REMOVAL_EVENT_WAKE_ENABLE 3
  15. #define REMOVAL_REQUEST_ENABLE 4
  16. #define REQUEST_DEVICE_INSERTED_STATE 5
  17. #define REQUEST_DEVICE_ENABLED_STATE 6
  18. #define REQUEST_REMOVAL_REQUESTED_STATE 7
  19. #define REQUEST_REMOVAL_ALLOWED_STATE 8
  20. #define C_DEVICE_STATUS_CHANGE 9
  21. #define C_REMOVE_REQUEST 10
  22. #define ENABLE_VOP_POWER 11
  23. /*
  24. Class Descriptors
  25. */
  26. #define DBC_SUSBSYSTEM_DESCRIPTOR_TYPE 0x40
  27. #define DBC_BAY_DESCRIPTOR_TYPE 0x41
  28. /* bay states (BayStateRequested and CurrentBayState) */
  29. #define BAY_STATE_EMPTY 0x00 // 000
  30. #define BAY_STATE_DEVICE_INSERTED 0x01 // 001
  31. #define BAY_STATE_DEVICE_ENABLED 0x02 // 010
  32. #define BAY_STATE_DEVICE_REMOVAL_REQUESTED 0x03 // 011
  33. #define BAY_STATE_DEVICE_REMOVAL_ALLOWED 0x04 // 100
  34. //#define BAY_STATE_ 0x05 // 101
  35. //#define BAY_STATE_ 0x06 // 110
  36. //#define BAY_STATE_ 0x07 // 111
  37. typedef union _BAY_STATUS {
  38. USHORT us;
  39. struct {
  40. unsigned VidEnabled:1; /* 0 */
  41. unsigned RemovalWakeupEnabled:1; /* 1 */
  42. unsigned DeviceStatusChangeEnabled:1; /* 2 */
  43. unsigned RemovalRequestEnabled:1; /* 3 */
  44. unsigned LastBayStateRequested:3; /* 4..6 */
  45. unsigned InterlockEngaged:1; /* 7 */
  46. unsigned DeviceUsbIsPresent:1; /* 8 */
  47. unsigned Device1394IsPresent:1; /* 9 */
  48. unsigned DeviceStatusChange:1; /* 10 */
  49. unsigned RemovalRequestChange:1; /* 11 */
  50. unsigned CurrentBayState:3; /* 12..14 */
  51. unsigned SecurityLockEngaged:1; /* 15 */
  52. unsigned Reserved:8; /* 16..23 */
  53. };
  54. } BAY_STATUS, *PBAY_STATUS;
  55. typedef union _SUBSYTEM_ATTRIBUTES {
  56. ULONG ul;
  57. struct {
  58. unsigned BayCount:4; /* 0 ..3 */
  59. unsigned HasSecurityLock:1; /* 4 */
  60. unsigned Reserved:27; /* 5..31 */
  61. };
  62. } SUBSYTEM_ATTRIBUTES, *PSUBSYTEM_ATTRIBUTES;
  63. typedef struct _DBC_BAY_DESCRIPTOR {
  64. UCHAR bLength;
  65. UCHAR bDescriptorType;
  66. UCHAR bBayNumber;
  67. UCHAR bHubPortNumber;
  68. UCHAR bPHYPortNumber;
  69. UCHAR bFormFactor;
  70. } DBC_BAY_DESCRIPTOR, *PDBC_BAY_DESCRIPTOR;
  71. typedef struct _DBC_SUBSYSTEM_DESCRIPTOR {
  72. UCHAR bLength;
  73. UCHAR bDescriptorType;
  74. SUBSYTEM_ATTRIBUTES bmAttributes;
  75. UCHAR guid1394Link[8];
  76. ULONG v3_3ContinuousPower;
  77. ULONG v3_3PeakPower;
  78. ULONG v5_0ContinuousPower;
  79. ULONG v5_0PeakPower;
  80. ULONG v12_0ContinuousPower;
  81. ULONG v12_0PeakPower;
  82. ULONG AggregatePower;
  83. ULONG ThermalDissapation;
  84. USHORT bcdSpecificationRelease;
  85. } DBC_SUBSYSTEM_DESCRIPTOR, *PDBC_SUBSYSTEM_DESCRIPTOR;
  86. #include <POPPACK.H>
  87. #endif /* __DBC100_H__ */