📄 usb_descriptor.lst
字号:
C51 COMPILER V6.12 USB_DESCRIPTOR 06/09/2004 15:44:26 PAGE 1
C51 COMPILER V6.12, COMPILATION OF MODULE USB_DESCRIPTOR
OBJECT MODULE PLACED IN USB_DESCRIPTOR.OBJ
COMPILER INVOKED BY: c:\Keil\C51\BIN\C51.EXE USB_DESCRIPTOR.c DB OE
stmt level source
1 /*
2
3 File: USB_DESCRIPTOR.c
4 Author: DM
5 Created: 11/22/02
6
7 Target Device: C8051F320
8
9 Source file for USB firmware. Includes descriptor data.
10
11 Functions:
12 None
13
14 */
15
16 #include "USB_REGISTER.h"
17 #include "USB_MAIN.h"
18 #include "USB_DESCRIPTOR.h"
19
20 //---------------------------
21 // Descriptor Declarations
22 //---------------------------
23 const device_descriptor DeviceDesc =
24 {
25 18, // bLength
26 0x01, // bDescriptorType
27 0x1001, // bcdUSB
28 0x00, // bDeviceClass
29 0x00, // bDeviceSubClass
30 0x00, // bDeviceProtocol
31 EP0_PACKET_SIZE, // bMaxPacketSize0
32 0xC410, // idVendor
33 0x0000, // idProduct
34 0x0000, // bcdDevice
35 0x01, // iManufacturer
36 0x02, // iProduct
37 0x00, // iSerialNumber
38 0x01 // bNumConfigurations
39 }; //end of DeviceDesc
40
41 const configuration_descriptor ConfigDesc =
42 {
43 0x09, // Length
44 0x02, // Type
45 0x2000, // Totallength
46 0x01, // NumInterfaces
47 0x01, // bConfigurationValue
48 0x00, // iConfiguration
49 0x80, // bmAttributes
50 0x0F // MaxPower
51 }; //end of ConfigDesc
52
53 const interface_descriptor InterfaceDesc =
54 {
55 0x09, // bLength
C51 COMPILER V6.12 USB_DESCRIPTOR 06/09/2004 15:44:26 PAGE 2
56 0x04, // bDescriptorType
57 0x00, // bInterfaceNumber
58 0x00, // bAlternateSetting
59 0x02, // bNumEndpoints
60 0x00, // bInterfaceClass
61 0x00, // bInterfaceSubClass
62 0x00, // bInterfaceProcotol
63 0x00 // iInterface
64 }; //end of InterfaceDesc
65
66 const endpoint_descriptor Endpoint1Desc =
67 {
68 0x07, // bLength
69 0x05, // bDescriptorType
70 0x81, // bEndpointAddress
71 0x03, // bmAttributes
72 EP1_PACKET_SIZE_LE, // MaxPacketSize (LITTLE ENDIAN)
73 10 // bInterval
74 }; //end of Endpoint1Desc
75
76 const endpoint_descriptor Endpoint2Desc =
77 {
78 0x07, // bLength
79 0x05, // bDescriptorType
80 0x02, // bEndpointAddress
81 0x03, // bmAttributes
82 EP2_PACKET_SIZE_LE, // MaxPacketSize (LITTLE ENDIAN)
83 10 // bInterval
84 }; //end of Endpoint2Desc
85
86 #define STR0LEN 4
87
88 code const BYTE String0Desc[STR0LEN] =
89 {
90 STR0LEN, 0x03, 0x09, 0x04
91 }; //end of String0Desc
92
93 #define STR1LEN sizeof("CYGNAL INTEGRATED PRODUCTS")*2
94
95 code const BYTE String1Desc[STR1LEN] =
96 {
97 STR1LEN, 0x03,
98 'C', 0,
99 'Y', 0,
100 'G', 0,
101 'N', 0,
102 'A', 0,
103 'L', 0,
104 ' ', 0,
105 'I', 0,
106 'N', 0,
107 'T', 0,
108 'E', 0,
109 'G', 0,
110 'R', 0,
111 'A', 0,
112 'T', 0,
113 'E', 0,
114 'D', 0,
115 ' ', 0,
116 'P', 0,
117 'R', 0,
C51 COMPILER V6.12 USB_DESCRIPTOR 06/09/2004 15:44:26 PAGE 3
118 'O', 0,
119 'D', 0,
120 'U', 0,
121 'C', 0,
122 'T', 0,
123 'S', 0
124 }; //end of String1Desc
125
126 #define STR2LEN sizeof("C8051F320 Development Board")*2
127
128 code const BYTE String2Desc[STR2LEN] =
129 {
130 STR2LEN, 0x03,
131 'C', 0,
132 '8', 0,
133 '0', 0,
134 '5', 0,
135 '1', 0,
136 'F', 0,
137 '3', 0,
138 '2', 0,
139 '0', 0,
140 ' ', 0,
141 'D', 0,
142 'e', 0,
143 'v', 0,
144 'e', 0,
145 'l', 0,
146 'o', 0,
147 'p', 0,
148 'm', 0,
149 'e', 0,
150 'n', 0,
151 't', 0,
152 ' ', 0,
153 'B', 0,
154 'o', 0,
155 'a', 0,
156 'r', 0,
157 'd', 0
158 }; //end of String2Desc
159
160 BYTE* const StringDescTable[] =
161 {
162 String0Desc,
163 String1Desc,
164 String2Desc
165 };
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
CONSTANT SIZE = 164 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 9 ----
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 + -