📄 usbdesc.lst
字号:
ARM COMPILER V2.53, usbdesc 31/10/07 09:22:44 PAGE 1
ARM COMPILER V2.53, COMPILATION OF MODULE usbdesc
OBJECT MODULE PLACED IN usbdesc.OBJ
COMPILER INVOKED BY: D:\学习\ARM\BIN\CA.exe usbdesc.c THUMB DEBUG PRINT(.\LST\USBDESC.LST) TABS(4)
stmt level source
1 /*----------------------------------------------------------------------------
2 * U S B - K e r n e l
3 *----------------------------------------------------------------------------
4 * Name: USBDESC.C
5 * Purpose: USB Descriptors
6 * Version: V1.10
7 *----------------------------------------------------------------------------
8 * This file is part of the uVision/ARM development tools.
9 * Copyright (c) 2005-2006 Keil Software. All rights reserved.
10 * This software may only be used under the terms of a valid, current,
11 * end user licence from KEIL for a compatible version of KEIL software
12 * development tools. Nothing else gives you the right to use it.
13 *---------------------------------------------------------------------------*/
14
15 #include "type.h"
16
17 #include "usb.h"
18 #include "usbcfg.h"
19 #include "usbdesc.h"
20
21
22 /* 设备描述符USB Standard Device Descriptor */
23 const BYTE USB_DeviceDescriptor[] = {
24 USB_DEVICE_DESC_SIZE, /* bLength */
25 USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */
26 WBVAL(0x0110), /* 1.10 */ /* bcdUSB */
27 0x00, /* bDeviceClass */
28 0x00, /* bDeviceSubClass */
29 0x00, /* bDeviceProtocol */
30 USB_MAX_PACKET0, /* bMaxPacketSize0 */
31 WBVAL(0xC251), /* idVendor */
32 WBVAL(0x1203), /* idProduct */
33 WBVAL(0x0100), /* 1.00 */ /* bcdDevice */
34 0x04, /* iManufacturer */
35 0x20, /* iProduct */
36 0x48, /* iSerialNumber */
37 0x01 /* bNumConfigurations */
38 };
39
40 /* USB 配置描述符Configuration Descriptor */
41 /* All Descriptors (Configuration, Interface, Endpoint, Class, Vendor */
42 const BYTE USB_ConfigDescriptor[] = {
43 /* Configuration 1 */
44 USB_CONFIGUARTION_DESC_SIZE, /* bLength */
45 USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
46 WBVAL( /* wTotalLength */
50 1*USB_CONFIGUARTION_DESC_SIZE +
50 1*USB_INTERFACE_DESC_SIZE +
50 2*USB_ENDPOINT_DESC_SIZE
50 ),
51 0x01, /* bNumInterfaces */
52 0x01, /* bConfigurationValue */
53 0x00, /* iConfiguration */
54 USB_CONFIG_SELF_POWERED /*|*/ /* bmAttributes */
55 /*USB_CONFIG_REMOTE_WAKEUP*/,
56 USB_CONFIG_POWER_MA(100), /* bMaxPower */
57 /* 接口描述符Interface 0, Alternate Setting 0, MSC Class */
58 USB_INTERFACE_DESC_SIZE, /* bLength */
59 USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
ARM COMPILER V2.53, usbdesc 31/10/07 09:22:44 PAGE 2
60 0x00, /* bInterfaceNumber */
61 0x00, /* bAlternateSetting */
62 0x02, /* bNumEndpoints */
63 USB_DEVICE_CLASS_RESERVED, /* bInterfaceClass */
64 0, /* bInterfaceSubClass */
65 0, /* bInterfaceProtocol */
66 0x62, /* iInterface */
67 /* Bulk In Endpoint */
68 USB_ENDPOINT_DESC_SIZE, /* bLength */
69 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
70 USB_ENDPOINT_IN(1), /* bEndpointAddress */
71 USB_ENDPOINT_TYPE_BULK, /* bmAttributes */
72 WBVAL(0x0040), /* wMaxPacketSize */
73 0, /* bInterval */
74 /* Bulk Out Endpoint */
75 USB_ENDPOINT_DESC_SIZE, /* bLength */
76 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
77 USB_ENDPOINT_OUT(2), /* bEndpointAddress */
78 USB_ENDPOINT_TYPE_BULK, /* bmAttributes */
79 WBVAL(0x0040), /* wMaxPacketSize */
80 0, /* bInterval */
81 /* Terminator */
82 0 /* bLength */
83 };
84
85 /* USB String Descriptor (optional) */
86 const BYTE USB_StringDescriptor[] = {
87 /* Index 0x00: LANGID Codes */
88 0x04, /* bLength */
89 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
90 WBVAL(0x0409), /* US English */ /* wLANGID */
91 /* Index 0x04: Manufacturer */
92 0x1C, /* bLength */
93 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
94 'y',0,
95 'o',0,
96 'n',0,
97 'g',0,
98 ' ',0,
99 'S',0,
100 'o',0,
101 'f',0,
102 't',0,
103 'w',0,
104 'a',0,
105 'r',0,
106 'e',0,
107 /* Index 0x20: Product */
108 0x28, /* bLength */
109 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
110 'w',0,
111 'e',0,
112 'r',0,
113 't',0,
114 'y',0,
115 'u',0,
116 'i',0,
117 'f',0,
118 'S',0,
119 '-',0,
120 'E',0,
121 'K',0,
122 ' ',0,
123 's',0,
124 'f',0,
125 'm',0,
ARM COMPILER V2.53, usbdesc 31/10/07 09:22:44 PAGE 3
126 'f',0,
127 'r',0,
128 'f',0,
129 /* Index 0x48: Serial Number */
130 0x1A, /* bLength */
131 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
132 'D',0,
133 'E',0,
134 'M',0,
135 'O',0,
136 '0',0,
137 '0',0,
138 '0',0,
139 '0',0,
140 '0',0,
141 '0',0,
142 '0',0,
143 '0',0,
144 /* Index 0x62: Interface 0, Alternate Setting 0 */
145 0x0E, /* bLength */
146 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
147 'y',0,
148 'o',0,
149 'n',0,
150 '9',0,
151 'r',0,
152 'y',0,
153 };
ARM COMPILER V2.53, usbdesc 31/10/07 09:22:44 PAGE 4
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** PUBLICS:
PUBLIC USB_DeviceDescriptor
PUBLIC USB_ConfigDescriptor
PUBLIC USB_StringDescriptor
*** DATA SEGMENT '?CON?usbdesc':
00000000 USB_DeviceDescriptor:
00000000 BEGIN_INIT
00000000 12 DB 0x12
00000001 01 DB 0x1
00000002 10 DB 0x10
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -