📄 usb_descriptor.lst
字号:
C51 COMPILER V7.06 USB_DESCRIPTOR 08/29/2007 09:51:41 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE USB_DESCRIPTOR
OBJECT MODULE PLACED IN USB_DESCRIPTOR.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE USB_DESCRIPTOR.c ROM(COMPACT) BROWSE DEBUG OBJECTEXTEND
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 V7.06 USB_DESCRIPTOR 08/29/2007 09:51:41 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("SILICON LABORATORIES INC.")*2
94
95 code const BYTE String1Desc[STR1LEN] =
96 {
97 STR1LEN, 0x03,
98 'S', 0,
99 'I', 0,
100 'L', 0,
101 'I', 0,
102 'C', 0,
103 'O', 0,
104 'N', 0,
105 ' ', 0,
106 'L', 0,
107 'A', 0,
108 'B', 0,
109 'O', 0,
110 'R', 0,
111 'A', 0,
112 'T', 0,
113 'O', 0,
114 'R', 0,
115 'I', 0,
116 'E', 0,
117 'S', 0,
C51 COMPILER V7.06 USB_DESCRIPTOR 08/29/2007 09:51:41 PAGE 3
118 ' ', 0,
119 'I', 0,
120 'N', 0,
121 'C', 0,
122 '.', 0
123 }; //end of String1Desc
124
125 #define STR2LEN sizeof("C8051F320 Development Board")*2
126
127 code const BYTE String2Desc[STR2LEN] =
128 {
129 STR2LEN, 0x03,
130 'C', 0,
131 '8', 0,
132 '0', 0,
133 '5', 0,
134 '1', 0,
135 'F', 0,
136 '3', 0,
137 '2', 0,
138 '0', 0,
139 ' ', 0,
140 'D', 0,
141 'e', 0,
142 'v', 0,
143 'e', 0,
144 'l', 0,
145 'o', 0,
146 'p', 0,
147 'm', 0,
148 'e', 0,
149 'n', 0,
150 't', 0,
151 ' ', 0,
152 'B', 0,
153 'o', 0,
154 'a', 0,
155 'r', 0,
156 'd', 0
157 }; //end of String2Desc
158
159 BYTE* const StringDescTable[] =
160 {
161 String0Desc,
162 String1Desc,
163 String2Desc
164 };
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
CONSTANT SIZE = 162 ----
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 + -