[BOOTLIB]
[reactos.git] / reactos / sdk / include / reactos / drivers / usbport / usbmport.h
index 09f3c1e..ebafef3 100644 (file)
 #define USBPORT_ENDPOINT_HALT    1
 #define USBPORT_ENDPOINT_CONTROL 4
 
+/* Interrupt Endpoint Poll Interval */
+#define ENDPOINT_INTERRUPT_1ms   1
+#define ENDPOINT_INTERRUPT_2ms   2
+#define ENDPOINT_INTERRUPT_4ms   4
+#define ENDPOINT_INTERRUPT_8ms   8
+#define ENDPOINT_INTERRUPT_16ms  16
+#define ENDPOINT_INTERRUPT_32ms  32
+
+#define INTERRUPT_ENDPOINTs (ENDPOINT_INTERRUPT_32ms + \
+                             ENDPOINT_INTERRUPT_16ms + \
+                             ENDPOINT_INTERRUPT_8ms  + \
+                             ENDPOINT_INTERRUPT_4ms  + \
+                             ENDPOINT_INTERRUPT_2ms  + \
+                             ENDPOINT_INTERRUPT_1ms)
+
 /* Types of resources. For USBPORT_RESOURCES::ResourcesTypes */
 #define USBPORT_RESOURCES_PORT      1
 #define USBPORT_RESOURCES_INTERRUPT 2
@@ -47,7 +62,7 @@ typedef struct _USBPORT_RESOURCES {
   UCHAR Reserved3;
 } USBPORT_RESOURCES, *PUSBPORT_RESOURCES;
 
-C_ASSERT(sizeof(USBPORT_RESOURCES) == 52);
+C_ASSERT(sizeof(USBPORT_RESOURCES) == 24 + 7 * sizeof(PVOID));
 
 typedef ULONG MPSTATUS; // Miniport status
 typedef ULONG RHSTATUS; // Roothub status
@@ -405,6 +420,10 @@ typedef NTSTATUS
   PVOID,
   ULONG);
 
+#define USBPORT_INVALIDATE_CONTROLLER_RESET            1
+#define USBPORT_INVALIDATE_CONTROLLER_SURPRISE_REMOVE  2
+#define USBPORT_INVALIDATE_CONTROLLER_SOFT_INTERRUPT   3
+
 typedef ULONG
 (NTAPI *PUSBPORT_INVALIDATE_CONTROLLER)(
   PVOID,
@@ -453,6 +472,9 @@ typedef VOID
 #define USB_MINIPORT_FLAGS_NO_DMA       0x0100
 #define USB_MINIPORT_FLAGS_WAKE_SUPPORT 0x0200
 
+#define TOTAL_USB11_BUS_BANDWIDTH  12000
+#define TOTAL_USB20_BUS_BANDWIDTH  400000
+
 typedef struct _USBPORT_REGISTRATION_PACKET {
   ULONG MiniPortVersion;
   ULONG MiniPortFlags;
@@ -545,6 +567,9 @@ typedef struct _USBPORT_REGISTRATION_PACKET {
   ULONG Reserved5;
 } USBPORT_REGISTRATION_PACKET, *PUSBPORT_REGISTRATION_PACKET;
 
+#define USB10_MINIPORT_INTERFACE_VERSION  100
+#define USB20_MINIPORT_INTERFACE_VERSION  200
+
 typedef struct _USBPORT_MINIPORT_INTERFACE {
   PDRIVER_OBJECT DriverObject;
   LIST_ENTRY DriverLink;
@@ -553,8 +578,9 @@ typedef struct _USBPORT_MINIPORT_INTERFACE {
   USBPORT_REGISTRATION_PACKET Packet;
 } USBPORT_MINIPORT_INTERFACE, *PUSBPORT_MINIPORT_INTERFACE;
 
-C_ASSERT(sizeof(USBPORT_MINIPORT_INTERFACE) == 336);
+C_ASSERT(sizeof(USBPORT_MINIPORT_INTERFACE) == 32 + 76 * sizeof(PVOID));
 
+#define USBPORT_TRANSFER_DIRECTION_OUT  1 // From host to device
 typedef struct _USBPORT_ENDPOINT_PROPERTIES {
   USHORT DeviceAddress;
   USHORT EndpointAddress;
@@ -581,7 +607,7 @@ typedef struct _USBPORT_ENDPOINT_PROPERTIES {
   ULONG Reserved6;
 } USBPORT_ENDPOINT_PROPERTIES, *PUSBPORT_ENDPOINT_PROPERTIES;
 
-C_ASSERT(sizeof(USBPORT_ENDPOINT_PROPERTIES) == 64);
+C_ASSERT(sizeof(USBPORT_ENDPOINT_PROPERTIES) == 48 + 4 * sizeof(PVOID));
 
 typedef struct _USBPORT_SCATTER_GATHER_ELEMENT {
   PHYSICAL_ADDRESS SgPhysicalAddress;
@@ -601,7 +627,7 @@ typedef struct _USBPORT_SCATTER_GATHER_LIST {
   USBPORT_SCATTER_GATHER_ELEMENT SgElement[1];
 } USBPORT_SCATTER_GATHER_LIST, *PUSBPORT_SCATTER_GATHER_LIST;
 
-C_ASSERT(sizeof(USBPORT_SCATTER_GATHER_LIST) == 40);
+C_ASSERT(sizeof(USBPORT_SCATTER_GATHER_LIST) == 24 + 4 * sizeof(PVOID));
 
 typedef struct _USBPORT_TRANSFER_PARAMETERS {
   ULONG TransferFlags;