📄 d12struct.lst
字号:
C51 COMPILER V6.12 D12STRUCT 07/10/2003 20:51:33 PAGE 1
C51 COMPILER V6.12, COMPILATION OF MODULE D12STRUCT
OBJECT MODULE PLACED IN .\d12struct.OBJ
COMPILER INVOKED BY: f:\Keil\C51\BIN\C51.EXE .\d12struct.h LARGE DEBUG OBJECTEXTEND
stmt level source
1 //////////d12struct.h
2 ////////descriptor
3 #include "common.h"
4 typedef struct _USB_DEVICE_DESCRIPTOR {
5 UCHAR bLength;
6 UCHAR bDescriptorType;
7 USHORT bcdUSB;
8 UCHAR bDeviceClass;
9 UCHAR bDeviceSubClass;
10 UCHAR bDeviceProtocol;
11 UCHAR bMaxPacketSize0;
12 USHORT idVendor;
13 USHORT idProduct;
14 USHORT bcdDevice;
15 UCHAR iManufacturer;
16 UCHAR iProduct;
17 UCHAR iSerialNumber;
18 UCHAR bNumConfigurations;
19 } USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
20
21 typedef struct _USB_CONFIGURATION_DESCRIPTOR {
22 UCHAR bLength;
23 UCHAR bDescriptorType;
24 USHORT wTotalLength;
25 UCHAR bNumInterfaces;
26 UCHAR bConfigurationValue;
27 UCHAR iConfiguration;
28 UCHAR bmAttributes;
29 UCHAR MaxPower;
30 } USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
31
32 typedef struct _USB_INTERFACE_DESCRIPTOR {
33 UCHAR bLength;
34 UCHAR bDescriptorType;
35 UCHAR bInterfaceNumber;
36 UCHAR bAlternateSetting;
37 UCHAR bNumEndpoints;
38 UCHAR bInterfaceClass;
39 UCHAR bInterfaceSubClass;
40 UCHAR bInterfaceProtocol;
41 UCHAR iInterface;
42 } USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR;
43
44 typedef struct _USB_ENDPOINT_DESCRIPTOR {
45 UCHAR bLength;
46 UCHAR bDescriptorType;
47 UCHAR bEndpointAddress;
48 UCHAR bmAttributes;
49 USHORT wMaxPacketSize;
50 UCHAR bInterval;
51 } USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
52
53 typedef struct _USB_STRING_DESCRIPTOR {
54 UCHAR bLength;
55 UCHAR bDescriptorType;
C51 COMPILER V6.12 D12STRUCT 07/10/2003 20:51:33 PAGE 2
56 UCHAR bString[1];
57 } USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR;
58
59 typedef struct _USB_POWER_DESCRIPTOR {
60 UCHAR bLength;
61 UCHAR bDescriptorType;
62 UCHAR bCapabilitiesFlags;
63 USHORT EventNotification;
64 USHORT D1LatencyTime;
65 USHORT D2LatencyTime;
66 USHORT D3LatencyTime;
67 UCHAR PowerUnit;
68 USHORT D0PowerConsumption;
69 USHORT D1PowerConsumption;
70 USHORT D2PowerConsumption;
71 } USB_POWER_DESCRIPTOR, *PUSB_POWER_DESCRIPTOR;
72
73
74 typedef struct _USB_COMMON_DESCRIPTOR {
75 UCHAR bLength;
76 UCHAR bDescriptorType;
77 } USB_COMMON_DESCRIPTOR, *PUSB_COMMON_DESCRIPTOR;
78
79 typedef struct _USB_HUB_DESCRIPTOR {
80 UCHAR bDescriptorLength; // Length of this descriptor
81 UCHAR bDescriptorType; // Hub configuration type
82 UCHAR bNumberOfPorts; // number of ports on this hub
83 USHORT wHubCharacteristics; // Hub Charateristics
84 UCHAR bPowerOnToPowerGood; // port power on till power good in 2ms
85 UCHAR bHubControlCurrent; // max current in mA
86 //
87 // room for 255 ports power control and removable bitmask
88 UCHAR bRemoveAndPowerMask[64];
89 } USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
90
91
92 //////////////////////////////////////////////////////////////////////////////////
93 typedef union _epp_flags
94 {
95 struct _flags
96 {
97 unsigned char timer : 1;
98 unsigned char bus_reset : 1;
99 unsigned char suspend : 1;
100 unsigned char setup_packet : 1;
101 unsigned char remote_wakeup : 1;
102 unsigned char in_isr : 1;
103 unsigned char control_state : 2;
104 #ifdef _DMA_
unsigned char configuration : 1;
unsigned char verbose : 1;
unsigned char ep1_rxdone : 1;
unsigned char setup_dma : 2; // V2.3
unsigned char dma_state : 2;
unsigned char power_down : 1; // Smart Board
#else
112 uchar configuration :1;
113 uchar command :1;
114 uchar ep1_rxdone :1;
115 uchar ep2_rxdone :1;
116 uchar ep1buf_full :1;
117 uchar ep2buf_full :1;
C51 COMPILER V6.12 D12STRUCT 07/10/2003 20:51:33 PAGE 3
118 #endif
119 } bits;
120 unsigned short value;
121 } EPPFLAGS;
122
123 typedef struct _device_request
124 {
125 unsigned char bmRequestType;
126 unsigned char bRequest;
127 unsigned short wValue;
128 unsigned short wIndex;
129 unsigned short wLength;
130 } DEVICE_REQUEST;
131
132 #define MAX_CONTROLDATA_SIZE 8
133 typedef struct _control_xfer
134 {
135 DEVICE_REQUEST DeviceRequest;
136 unsigned short wLength;
137 unsigned short wCount;
138 unsigned char * pData;
139 unsigned char dataBuffer[MAX_CONTROLDATA_SIZE];
140 } CONTROL_XFER;
141
142 typedef struct _IO_REQUEST {
143 unsigned short uAddressL;
144 unsigned char bAddressH;
145 unsigned short uSize;
146 unsigned char bCommand;
147 } IO_REQUEST, *PIO_REQUEST;
148
149 typedef struct _TWAIN_FILEINFO {
150 unsigned char bPage; // bPage bit 7 - 5 map to uSize bit 18 - 16
151 unsigned char uSizeH; // uSize bit 15 - 8
152 unsigned char uSizeL; // uSize bit 7 - 0
153 } TWAIN_FILEINFO, *PTWAIN_FILEINFO;
154
155
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -