📄 usbdesc.lst
字号:
ARM COMPILER V2.53, usbdesc 09/06/07 15:42:26 PAGE 1
ARM COMPILER V2.53, COMPILATION OF MODULE usbdesc
OBJECT MODULE PLACED IN .\Obj\usbdesc.obj
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe usbdesc.c THUMB BROWSE DEFINE(MCB2140) DEBUG PRINT(.\LST\USBDESC.LST) TABS(4
-) OBJECT(.\Obj\usbdesc.obj)
stmt level source
1 /*----------------------------------------------------------------------------
2 * U S B - K e r n e l
3 *----------------------------------------------------------------------------
4 * Name: usbdesc.c
5 * Purpose: USB Descriptors file for Philips LPC214x Family
6 * Microprocessors
7 * Version: V1.04
8 *----------------------------------------------------------------------------
9 * This software is supplied "AS IS" without any warranties, express,
10 * implied or statutory, including but not limited to the implied
11 * warranties of fitness for purpose, satisfactory quality and
12 * noninfringement. Keil extends you a royalty-free right to reproduce and
13 * distribute executable files created using this software for use on
14 * Philips LPC2xxx microcontroller devices only. Nothing else gives you the
15 * right to use this software.
16 *
17 * Copyright (c) 2005 Keil Software.
18 * Modified by Philips Semiconductor
19 *---------------------------------------------------------------------------*/
20 #include "type.h"
21 #include "usb.h"
22 #include "usbcfg.h"
23 #include "usbdesc.h"
24
25 /* Two interface descriptor for 2 Virtual COM port,, each VCOM uses 3 endpoints */
26 /* The total number of endpoints are 6, 2 interrupt IN for modem status reading,
27 2 BULK OUT for COM TX, and 2 BULK IN for COM RX */
28
29 #define NUM_ENDPOINTS 3
30
31 /* USB Standard Device Descriptor */
32 const BYTE USB_DeviceDescriptor[] = {
33 USB_DEVICE_DESC_SIZE, /* bLength */
34 USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */
35 WBVAL(0x0100), /* 1.00 */ /* bcdUSB */
36 0x00, /* bDeviceClass */
37 0x00, /* bDeviceSubClass */
38 0x00, /* bDeviceProtocol */
39 USB_MAX_PACKET0, /* bMaxPacketSize0 */
40 WBVAL(0xC251), /* idVendor */
41 WBVAL(0x1305), /* idProduct */
42 WBVAL(0x0110), /* 1.10 */ /* bcdDevice */
43 0x04, /* iManufacturer */
44 0x20, /* iProduct */
45 0x4A, /* iSerialNumber */
46 0x01 /* bNumConfigurations */
47 };
48
49 /* USB Configuration Descriptor */
50 /* All Descriptors (Configuration, Interface, Endpoint, Class, Vendor */
51 const BYTE USB_ConfigDescriptor[] = {
52 /* Configuration 1 */
53 USB_CONFIGUARTION_DESC_SIZE, /* bLength */
54 USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
55 WBVAL( /* wTotalLength */
61 USB_CONFIGUARTION_DESC_SIZE +
61 USB_INTERFACE_DESC_SIZE +
61 NUM_ENDPOINTS * USB_ENDPOINT_DESC_SIZE +
ARM COMPILER V2.53, usbdesc 09/06/07 15:42:26 PAGE 2
61 USB_INTERFACE_DESC_SIZE +
61 NUM_ENDPOINTS * USB_ENDPOINT_DESC_SIZE
61 ),
62 0x02, /* bNumInterfaces */
63 0x01, /* bConfigurationValue */
64 0x00, /* iConfiguration */
65 USB_CONFIG_BUS_POWERED | /* bmAttributes */
66 USB_CONFIG_REMOTE_WAKEUP,
67 USB_CONFIG_POWER_MA(100), /* bMaxPower */
68 /* Interface 0, Alternate Setting 0, Class Code Unknown */
69 USB_INTERFACE_DESC_SIZE, /* bLength */
70 USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
71 0x00, /* bInterfaceNumber */
72 0x00, /* bAlternateSetting */
73 NUM_ENDPOINTS, /* bNumEndpoints */
74 USB_DEVICE_CLASS_VENDOR_SPECIFIC, /* bInterfaceClass, USB_CLASS_VENDOR_SPECIFIC */
75 0xFF, /* bInterfaceSubClass, USB_SUBCLASS_CODE_UNKNOWN */
76 0xFF, /* bInterfaceProtocol, USB_PROTOCOL_CODE_UNKNOWN */
77 0x00, /* iInterface, STR_INDEX_INTERFACE = no_string */
78 /* Endpoint, EP1 Interrupt In */
79 USB_ENDPOINT_DESC_SIZE, /* bLength */
80 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
81 USB_ENDPOINT_IN(1), /* bEndpointAddress */
82 USB_ENDPOINT_TYPE_INTERRUPT, /* bmAttributes */
83 WBVAL(0x0004), /* wMaxPacketSize */
84 0x20, /* 32ms */ /* bInterval */
85 /* Endpoint, EP2 Bulk Out */
86 USB_ENDPOINT_DESC_SIZE, /* bLength */
87 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
88 USB_ENDPOINT_OUT(2), /* bEndpointAddress */
89 USB_ENDPOINT_TYPE_BULK, /* bmAttributes */
90 WBVAL(0x0040), /* wMaxPacketSize */
91 0x20, /* 32ms */
92 /* Endpoint, EP2 Bulk In */
93 USB_ENDPOINT_DESC_SIZE, /* bLength */
94 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
95 USB_ENDPOINT_IN(2), /* bEndpointAddress */
96 USB_ENDPOINT_TYPE_BULK, /* bmAttributes */
97 WBVAL(0x0040), /* wMaxPacketSize */
98 0x20, /* 32ms */
99 /* Interface 1, Alternate Setting 0, Class Code Unknown */
100 USB_INTERFACE_DESC_SIZE, /* bLength */
101 USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
102 0x01, /* bInterfaceNumber */
103 0x00, /* bAlternateSetting */
104 NUM_ENDPOINTS, /* bNumEndpoints */
105 USB_DEVICE_CLASS_VENDOR_SPECIFIC, /* bInterfaceClass, USB_CLASS_CODE_UNKNOWN */
106 0xFF, /* bInterfaceSubClass, USB_SUBCLASS_CODE_UNKNOWN */
107 0xFF, /* bInterfaceProtocol, USB_PROTOCOL_CODE_UNKNOWN */
108 0x00, /* iInterface, STR_INDEX_INTERFACE = no_string */
109 /* Endpoint, EP4 Interrupt In */
110 USB_ENDPOINT_DESC_SIZE, /* bLength */
111 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
112 USB_ENDPOINT_IN(4), /* bEndpointAddress */
113 USB_ENDPOINT_TYPE_INTERRUPT, /* bmAttributes */
114 WBVAL(0x0004), /* wMaxPacketSize */
115 0x20, /* 32ms */ /* bInterval */
116 /* Endpoint, EP5 Bulk Out */
117 USB_ENDPOINT_DESC_SIZE, /* bLength */
118 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
119 USB_ENDPOINT_OUT(5), /* bEndpointAddress */
120 USB_ENDPOINT_TYPE_BULK, /* bmAttributes */
121 WBVAL(0x0040), /* wMaxPacketSize */
122 0x20, /* 32ms */
123 /* Endpoint, EP5 Bulk In */
124 USB_ENDPOINT_DESC_SIZE, /* bLength */
ARM COMPILER V2.53, usbdesc 09/06/07 15:42:26 PAGE 3
125 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
126 USB_ENDPOINT_IN(5), /* bEndpointAddress */
127 USB_ENDPOINT_TYPE_BULK, /* bmAttributes */
128 WBVAL(0x0040), /* wMaxPacketSize */
129 0x20, /* 32ms */
130 /* Terminator */
131 0 /* bLength */
132 };
133
134 /* USB String Descriptor (optional) */
135 const BYTE USB_StringDescriptor[] = {
136 /* Index 0x00: LANGID Codes */
137 0x04, /* bLength */
138 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
139 WBVAL(0x0409), /* US English */ /* wLANGID */
140 /* Index 0x04: Manufacturer */
141 0x1C, /* bLength */
142 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
143 'K',0,
144 'e',0,
145 'i',0,
146 'l',0,
147 ' ',0,
148 'S',0,
149 'o',0,
150 'f',0,
151 't',0,
152 'w',0,
153 'a',0,
154 'r',0,
155 'e',0,
156 /* Index 0x20: Product */
157 0x2A, /* bLength */
158 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
159 'P',0,
160 'h',0,
161 'i',0,
162 'l',0,
163 'i',0,
164 'p',0,
165 's',0,
166 ' ',0,
167 'L',0,
168 'P',0,
169 'C',0,
170 '2',0,
171 '1',0,
172 '4',0,
173 '8',0,
174 ' ',0,
175 'V',0,
176 'C',0,
177 'O',0,
178 'M',0,
179 /* Index 0x4A: Serial Number */
180 0x1C, /* bLength */
181 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
182 '0',0,
183 '0',0,
184 '0',0,
185 '0',0,
186 '0',0,
187 '0',0,
188 '0',0,
189 '0',0,
190 '-',0,
ARM COMPILER V2.53, usbdesc 09/06/07 15:42:26 PAGE 4
191 'D',0,
192 'E',0,
193 'M',0,
194 'O',0,
195 /* Index 0x66: Interface 0, Alternate Setting 0 */
196 0x0A, /* bLength */
197 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
198 'V',0,
199 'C',0,
200 'O',0,
201 'M',0,
202 };
ARM COMPILER V2.53, usbdesc 09/06/07 15:42:26 PAGE 5
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** PUBLICS:
PUBLIC USB_DeviceDescriptor
PUBLIC USB_ConfigDescriptor
PUBLIC USB_StringDescriptor
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -