@@ -64,6 +64,70 @@ typedef struct _USBPORT_RESOURCES {
64
64
65
65
C_ASSERT (sizeof (USBPORT_RESOURCES ) == 24 + 7 * sizeof (PVOID ));
66
66
67
+ typedef struct _USBPORT_ENDPOINT_PROPERTIES {
68
+ USHORT DeviceAddress ;
69
+ USHORT EndpointAddress ;
70
+ USHORT TotalMaxPacketSize ; // TransactionPerMicroframe * MaxPacketSize
71
+ UCHAR Period ;
72
+ UCHAR Reserved1 ;
73
+ USB_DEVICE_SPEED DeviceSpeed ;
74
+ ULONG UsbBandwidth ;
75
+ ULONG ScheduleOffset ;
76
+ ULONG TransferType ;
77
+ ULONG Direction ;
78
+ ULONG_PTR BufferVA ;
79
+ ULONG_PTR BufferPA ;
80
+ ULONG BufferLength ;
81
+ ULONG Reserved3 ;
82
+ ULONG MaxTransferSize ;
83
+ USHORT HubAddr ;
84
+ USHORT PortNumber ;
85
+ UCHAR InterruptScheduleMask ;
86
+ UCHAR SplitCompletionMask ;
87
+ UCHAR TransactionPerMicroframe ; // 1 + additional transactions. Total: from 1 to 3)
88
+ UCHAR Reserved4 ;
89
+ ULONG MaxPacketSize ;
90
+ ULONG Reserved6 ;
91
+ } USBPORT_ENDPOINT_PROPERTIES , * PUSBPORT_ENDPOINT_PROPERTIES ;
92
+
93
+ C_ASSERT (sizeof (USBPORT_ENDPOINT_PROPERTIES ) == 48 + 4 * sizeof (PVOID ));
94
+
95
+ typedef struct _USBPORT_TRANSFER_PARAMETERS {
96
+ ULONG TransferFlags ;
97
+ ULONG TransferBufferLength ;
98
+ ULONG TransferCounter ;
99
+ BOOL IsTransferSplited ;
100
+ ULONG Reserved2 ;
101
+ USB_DEFAULT_PIPE_SETUP_PACKET SetupPacket ;
102
+ } USBPORT_TRANSFER_PARAMETERS , * PUSBPORT_TRANSFER_PARAMETERS ;
103
+
104
+ C_ASSERT (sizeof (USBPORT_TRANSFER_PARAMETERS ) == 28 );
105
+
106
+ typedef struct _USBPORT_SCATTER_GATHER_ELEMENT {
107
+ PHYSICAL_ADDRESS SgPhysicalAddress ;
108
+ ULONG Reserved1 ;
109
+ ULONG SgTransferLength ;
110
+ ULONG SgOffset ;
111
+ ULONG Reserved2 ;
112
+ } USBPORT_SCATTER_GATHER_ELEMENT , * PUSBPORT_SCATTER_GATHER_ELEMENT ;
113
+
114
+ C_ASSERT (sizeof (USBPORT_SCATTER_GATHER_ELEMENT ) == 24 );
115
+
116
+ typedef struct _USBPORT_SCATTER_GATHER_LIST {
117
+ ULONG Flags ;
118
+ ULONG_PTR CurrentVa ;
119
+ PVOID MappedSystemVa ;
120
+ ULONG SgElementCount ;
121
+ USBPORT_SCATTER_GATHER_ELEMENT SgElement [2 ];
122
+ } USBPORT_SCATTER_GATHER_LIST , * PUSBPORT_SCATTER_GATHER_LIST ;
123
+
124
+ C_ASSERT (sizeof (USBPORT_SCATTER_GATHER_LIST ) == 48 + 4 * sizeof (PVOID ));
125
+
126
+ typedef struct _USBPORT_ENDPOINT_REQUIREMENTS {
127
+ ULONG HeaderBufferSize ;
128
+ ULONG MaxTransferSize ;
129
+ } USBPORT_ENDPOINT_REQUIREMENTS , * PUSBPORT_ENDPOINT_REQUIREMENTS ;
130
+
67
131
typedef ULONG MPSTATUS ; // Miniport status
68
132
typedef ULONG RHSTATUS ; // Roothub status
69
133
@@ -88,20 +152,20 @@ typedef ULONG RHSTATUS; // Roothub status
88
152
typedef MPSTATUS
89
153
(NTAPI * PHCI_OPEN_ENDPOINT )(
90
154
PVOID ,
91
- PVOID ,
155
+ PUSBPORT_ENDPOINT_PROPERTIES ,
92
156
PVOID );
93
157
94
158
typedef MPSTATUS
95
159
(NTAPI * PHCI_REOPEN_ENDPOINT )(
96
160
PVOID ,
97
- PVOID ,
161
+ PUSBPORT_ENDPOINT_PROPERTIES ,
98
162
PVOID );
99
163
100
164
typedef VOID
101
165
(NTAPI * PHCI_QUERY_ENDPOINT_REQUIREMENTS )(
102
166
PVOID ,
103
- PVOID ,
104
- PULONG );
167
+ PUSBPORT_ENDPOINT_PROPERTIES ,
168
+ PUSBPORT_ENDPOINT_REQUIREMENTS );
105
169
106
170
typedef VOID
107
171
(NTAPI * PHCI_CLOSE_ENDPOINT )(
@@ -137,15 +201,15 @@ typedef MPSTATUS
137
201
(NTAPI * PHCI_SUBMIT_TRANSFER )(
138
202
PVOID ,
139
203
PVOID ,
204
+ PUSBPORT_TRANSFER_PARAMETERS ,
140
205
PVOID ,
141
- PVOID ,
142
- PVOID );
206
+ PUSBPORT_SCATTER_GATHER_LIST );
143
207
144
208
typedef MPSTATUS
145
209
(NTAPI * PHCI_SUBMIT_ISO_TRANSFER )(
146
210
PVOID ,
147
211
PVOID ,
148
- PVOID ,
212
+ PUSBPORT_TRANSFER_PARAMETERS ,
149
213
PVOID ,
150
214
PVOID );
151
215
@@ -443,7 +507,7 @@ typedef ULONG
443
507
typedef VOID
444
508
(NTAPI * PHCI_REBALANCE_ENDPOINT )(
445
509
PVOID ,
446
- PVOID ,
510
+ PUSBPORT_ENDPOINT_PROPERTIES ,
447
511
PVOID );
448
512
449
513
typedef VOID
@@ -583,65 +647,6 @@ C_ASSERT(sizeof(USBPORT_MINIPORT_INTERFACE) == 32 + 76 * sizeof(PVOID));
583
647
#define USBPORT_TRANSFER_DIRECTION_OUT 1 // From host to device
584
648
#define USBPORT_MAX_DEVICE_ADDRESS 127
585
649
586
- typedef struct _USBPORT_ENDPOINT_PROPERTIES {
587
- USHORT DeviceAddress ;
588
- USHORT EndpointAddress ;
589
- USHORT TotalMaxPacketSize ; // TransactionPerMicroframe * MaxPacketSize
590
- UCHAR Period ;
591
- UCHAR Reserved1 ;
592
- USB_DEVICE_SPEED DeviceSpeed ;
593
- ULONG UsbBandwidth ;
594
- ULONG ScheduleOffset ;
595
- ULONG TransferType ;
596
- ULONG Direction ;
597
- ULONG_PTR BufferVA ;
598
- ULONG_PTR BufferPA ;
599
- ULONG BufferLength ;
600
- ULONG Reserved3 ;
601
- ULONG MaxTransferSize ;
602
- USHORT HubAddr ;
603
- USHORT PortNumber ;
604
- UCHAR InterruptScheduleMask ;
605
- UCHAR SplitCompletionMask ;
606
- UCHAR TransactionPerMicroframe ; // 1 + additional transactions. Total: from 1 to 3)
607
- UCHAR Reserved4 ;
608
- ULONG MaxPacketSize ;
609
- ULONG Reserved6 ;
610
- } USBPORT_ENDPOINT_PROPERTIES , * PUSBPORT_ENDPOINT_PROPERTIES ;
611
-
612
- C_ASSERT (sizeof (USBPORT_ENDPOINT_PROPERTIES ) == 48 + 4 * sizeof (PVOID ));
613
-
614
- typedef struct _USBPORT_SCATTER_GATHER_ELEMENT {
615
- PHYSICAL_ADDRESS SgPhysicalAddress ;
616
- ULONG Reserved1 ;
617
- ULONG SgTransferLength ;
618
- ULONG SgOffset ;
619
- ULONG Reserved2 ;
620
- } USBPORT_SCATTER_GATHER_ELEMENT , * PUSBPORT_SCATTER_GATHER_ELEMENT ;
621
-
622
- C_ASSERT (sizeof (USBPORT_SCATTER_GATHER_ELEMENT ) == 24 );
623
-
624
- typedef struct _USBPORT_SCATTER_GATHER_LIST {
625
- ULONG Flags ;
626
- ULONG_PTR CurrentVa ;
627
- PVOID MappedSystemVa ;
628
- ULONG SgElementCount ;
629
- USBPORT_SCATTER_GATHER_ELEMENT SgElement [2 ];
630
- } USBPORT_SCATTER_GATHER_LIST , * PUSBPORT_SCATTER_GATHER_LIST ;
631
-
632
- C_ASSERT (sizeof (USBPORT_SCATTER_GATHER_LIST ) == 48 + 4 * sizeof (PVOID ));
633
-
634
- typedef struct _USBPORT_TRANSFER_PARAMETERS {
635
- ULONG TransferFlags ;
636
- ULONG TransferBufferLength ;
637
- ULONG TransferCounter ;
638
- BOOL IsTransferSplited ;
639
- ULONG Reserved2 ;
640
- USB_DEFAULT_PIPE_SETUP_PACKET SetupPacket ;
641
- } USBPORT_TRANSFER_PARAMETERS , * PUSBPORT_TRANSFER_PARAMETERS ;
642
-
643
- C_ASSERT (sizeof (USBPORT_TRANSFER_PARAMETERS ) == 28 );
644
-
645
650
/* For USB1.1 or USB3 Hub Descriptors */
646
651
typedef union _USBPORT_HUB_11_CHARACTERISTICS {
647
652
struct {
0 commit comments