| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
#ifndef USBDKDATA_H |
| 27 |
|
| 28 |
typedef struct tag_USB_DK_DEVICE_ID |
| 29 |
{ |
| 30 |
WCHAR DeviceID[MAX_DEVICE_ID_LEN]; |
| 31 |
WCHAR InstanceID[MAX_DEVICE_ID_LEN]; |
| 32 |
} USB_DK_DEVICE_ID, *PUSB_DK_DEVICE_ID; |
| 33 |
|
| 34 |
#define UsbDkFillIDStruct(ID, DeviceID, InstanceID) \ |
| 35 |
{ \ |
| 36 |
wcsncpy(ID->DeviceID, DeviceID, MAX_DEVICE_ID_LEN); \ |
| 37 |
wcsncpy(ID->InstanceID, InstanceID, MAX_DEVICE_ID_LEN); \ |
| 38 |
} |
| 39 |
|
| 40 |
typedef struct tag_USB_DK_DEVICE_INFO |
| 41 |
{ |
| 42 |
USB_DK_DEVICE_ID ID; |
| 43 |
ULONG64 FilterID; |
| 44 |
ULONG64 Port; |
| 45 |
ULONG64 Speed; |
| 46 |
USB_DEVICE_DESCRIPTOR DeviceDescriptor; |
| 47 |
} USB_DK_DEVICE_INFO, *PUSB_DK_DEVICE_INFO; |
| 48 |
|
| 49 |
typedef struct tag_USB_DK_CONFIG_DESCRIPTOR_REQUEST |
| 50 |
{ |
| 51 |
USB_DK_DEVICE_ID ID; |
| 52 |
ULONG64 Index; |
| 53 |
} USB_DK_CONFIG_DESCRIPTOR_REQUEST, *PUSB_DK_CONFIG_DESCRIPTOR_REQUEST; |
| 54 |
|
| 55 |
typedef struct tag_USB_DK_ISO_TRANSFER_RESULT |
| 56 |
{ |
| 57 |
ULONG64 ActualLength; |
| 58 |
ULONG64 TransferResult; |
| 59 |
} USB_DK_ISO_TRANSFER_RESULT, *PUSB_DK_ISO_TRANSFER_RESULT; |
| 60 |
|
| 61 |
typedef struct tag_USB_DK_GEN_TRANSFER_RESULT |
| 62 |
{ |
| 63 |
ULONG64 BytesTransferred; |
| 64 |
ULONG64 UsbdStatus; |
| 65 |
} USB_DK_GEN_TRANSFER_RESULT, *PUSB_DK_GEN_TRANSFER_RESULT; |
| 66 |
|
| 67 |
typedef struct tag_USB_DK_TRANSFER_RESULT |
| 68 |
{ |
| 69 |
USB_DK_GEN_TRANSFER_RESULT GenResult; |
| 70 |
PVOID64 IsochronousResultsArray; |
| 71 |
} USB_DK_TRANSFER_RESULT, *PUSB_DK_TRANSFER_RESULT; |
| 72 |
|
| 73 |
typedef struct tag_USB_DK_TRANSFER_REQUEST |
| 74 |
{ |
| 75 |
ULONG64 EndpointAddress; |
| 76 |
PVOID64 Buffer; |
| 77 |
ULONG64 BufferLength; |
| 78 |
ULONG64 TransferType; |
| 79 |
ULONG64 IsochronousPacketsArraySize; |
| 80 |
PVOID64 IsochronousPacketsArray; |
| 81 |
|
| 82 |
USB_DK_TRANSFER_RESULT Result; |
| 83 |
} USB_DK_TRANSFER_REQUEST, *PUSB_DK_TRANSFER_REQUEST; |
| 84 |
|
| 85 |
typedef enum |
| 86 |
{ |
| 87 |
TransferFailure = 0, |
| 88 |
TransferSuccess, |
| 89 |
TransferSuccessAsync |
| 90 |
} TransferResult; |
| 91 |
|
| 92 |
typedef enum |
| 93 |
{ |
| 94 |
NoSpeed = 0, |
| 95 |
LowSpeed, |
| 96 |
FullSpeed, |
| 97 |
HighSpeed, |
| 98 |
SuperSpeed |
| 99 |
} USB_DK_DEVICE_SPEED; |
| 100 |
|
| 101 |
typedef enum |
| 102 |
{ |
| 103 |
ControlTransferType, |
| 104 |
BulkTransferType, |
| 105 |
InterruptTransferType, |
| 106 |
IsochronousTransferType |
| 107 |
} USB_DK_TRANSFER_TYPE; |
| 108 |
|
| 109 |
#define USBDKDATA_H |
| 110 |
#endif |