Debian Codegraph @

spectro/UsbDkData.h

raw symbols SCIP
1 /**********************************************************************
2 * Copyright (c) 2013-2014 Red Hat, Inc.
3 *
4 * Developed by Daynix Computing LTD.
5 *
6 * Authors:
7 * Dmitry Fleytman <[email protected]>
8 * Pavel Gurvich <[email protected]>
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 *
22 * Modified by GWG for compatibility with older compilers.
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; // USBD_STATUS code
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; // array of USB_DK_ISO_TRANSFER_RESULT
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 /* USBDKDATA_H */