📄 usb_desc.s79
字号:
//////////////////////////////////////////////////////////////////////////////
// /
// IAR ARM ANSI C/C++ Compiler V4.42A/W32 EVALUATION 10/Nov/2008 11:44:06 /
// Copyright 1999-2005 IAR Systems. All rights reserved. /
// /
// Cpu mode = thumb /
// Endian = little /
// Stack alignment = 4 /
// Source file = D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_Port\sou /
// rce\usb_desc.c /
// Command line = D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_Port\sou /
// rce\usb_desc.c -D VECT_TAB_FLASH -D /
// USE_STM3210E_EVAL -lA D:\资料\ST\ST\usb\USBLib\demo /
// s\Virtual_COM_Port\project\EWARMv4\STM3210E-EVAL\Li /
// st\ -o D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_P /
// ort\project\EWARMv4\STM3210E-EVAL\Obj\ -z9 --debug /
// --cpu_mode thumb --endian little --cpu cortex-M3 /
// --stack_align 4 --require_prototypes --fpu None /
// --dlib_config "C:\Program Files\IAR /
// Systems\Embedded Workbench 4.0 /
// Evaluation\arm\LIB\dl7mptnnl8f.h" -I /
// D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_Port\pro /
// ject\EWARMv4\..\..\include\ -I /
// D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_Port\pro /
// ject\EWARMv4\..\..\..\..\library\inc\ -I /
// D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_Port\pro /
// ject\EWARMv4\..\..\..\..\..\FWLib\library\inc\ -I /
// "C:\Program Files\IAR Systems\Embedded Workbench /
// 4.0 Evaluation\arm\INC\" --inline_threshold=2 /
// List file = D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_Port\pro /
// ject\EWARMv4\STM3210E-EVAL\List\usb_desc.s79 /
// /
// /
//////////////////////////////////////////////////////////////////////////////
NAME usb_desc
RTMODEL "StackAlign4", "USED"
RTMODEL "__cpu_mode", "__pcs__thumb"
RTMODEL "__data_model", "absolute"
RTMODEL "__endian", "little"
RTMODEL "__rt_version", "6"
RSEG CSTACK:DATA:NOROOT(2)
PUBWEAK `?*?DATA_ID`
PUBWEAK ?init?tab?DATA_I
PUBLIC Virtual_Com_Port_ConfigDescriptor
PUBLIC Virtual_Com_Port_DeviceDescriptor
PUBLIC Virtual_Com_Port_StringLangID
PUBLIC Virtual_Com_Port_StringProduct
PUBLIC Virtual_Com_Port_StringSerial
PUBLIC Virtual_Com_Port_StringVendor
// D:\资料\ST\ST\usb\USBLib\demos\Virtual_COM_Port\source\usb_desc.c
// 1 /******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
// 2 * File Name : usb_desc.c
// 3 * Author : MCD Application Team
// 4 * Version : V2.2.0
// 5 * Date : 06/13/2008
// 6 * Description : Descriptors for Virtual Com Port Demo
// 7 ********************************************************************************
// 8 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
// 9 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
// 10 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
// 11 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
// 12 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
// 13 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
// 14 *******************************************************************************/
// 15
// 16 /* Includes ------------------------------------------------------------------*/
// 17 #include "usb_lib.h"
// 18 #include "usb_desc.h"
// 19 /* USB Standard Device Descriptor */
RSEG DATA_C:CONST:SORT:NOROOT(2)
// 20 const u8 Virtual_Com_Port_DeviceDescriptor[] =
Virtual_Com_Port_DeviceDescriptor:
DATA
DC8 18, 1, 0, 2, 2, 0, 0, 64, 131, 4, 64, 87, 0, 2, 1, 2, 3, 1, 0, 0
// 21 {
// 22 0x12, /* bLength */
// 23 USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */
// 24 0x00,
// 25 0x02, /* bcdUSB = 2.00 */
// 26 0x02, /* bDeviceClass: CDC */
// 27 0x00, /* bDeviceSubClass */
// 28 0x00, /* bDeviceProtocol */
// 29 0x40, /* bMaxPacketSize0 */
// 30 0x83,
// 31 0x04, /* idVendor = 0x0483 */
// 32 0x40,
// 33 0x57, /* idProduct = 0x7540 */
// 34 0x00,
// 35 0x02, /* bcdDevice = 2.00 */
// 36 1, /* Index of string descriptor describing manufacturer */
// 37 2, /* Index of string descriptor describing product */
// 38 3, /* Index of string descriptor describing the device's serial number */
// 39 0x01 /* bNumConfigurations */
// 40 };
// 41
RSEG DATA_C:CONST:SORT:NOROOT(2)
// 42 const u8 Virtual_Com_Port_ConfigDescriptor[] =
Virtual_Com_Port_ConfigDescriptor:
DATA
DC8 9, 2, 67, 0, 2, 1, 0, 192, 50, 9, 4, 0, 0, 1, 2, 2, 1, 0, 5, 36, 0
DC8 16, 1, 5, 36, 1, 0, 1, 4, 36, 2, 2, 5, 36, 6, 0, 1, 7, 5, 130, 3, 8
DC8 0, 255, 9, 4, 1, 0, 2, 10, 0, 0, 0, 7, 5, 3, 2, 255, 0, 0, 7, 5
DC8 129, 2, 255, 0, 0, 0
// 43 {
// 44 /*Configuation Descriptor*/
// 45 0x09, /* bLength: Configuation Descriptor size */
// 46 USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType: Configuration */
// 47 VIRTUAL_COM_PORT_SIZ_CONFIG_DESC, /* wTotalLength:no of returned bytes */
// 48 0x00,
// 49 0x02, /* bNumInterfaces: 2 interface */
// 50 0x01, /* bConfigurationValue: Configuration value */
// 51 0x00, /* iConfiguration: Index of string descriptor describing the configuration */
// 52 0xC0, /* bmAttributes: self powered */
// 53 0x32, /* MaxPower 0 mA */
// 54 /*Interface Descriptor*/
// 55 0x09, /* bLength: Interface Descriptor size */
// 56 USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType: Interface */
// 57 /* Interface descriptor type */
// 58 0x00, /* bInterfaceNumber: Number of Interface */
// 59 0x00, /* bAlternateSetting: Alternate setting */
// 60 0x01, /* bNumEndpoints: One endpoints used */
// 61 0x02, /* bInterfaceClass: Communication Interface Class */
// 62 0x02, /* bInterfaceSubClass: Abstract Control Model */
// 63 0x01, /* bInterfaceProtocol: Common AT commands */
// 64 0x00, /* iInterface: */
// 65 /*Header Functional Descriptor*/
// 66 0x05, /* bLength: Endpoint Descriptor size */
// 67 0x24, /* bDescriptorType: CS_INTERFACE */
// 68 0x00, /* bDescriptorSubtype: Header Func Desc */
// 69 0x10, /* bcdCDC: spec release number */
// 70 0x01,
// 71 /*Call Managment Functional Descriptor*/
// 72 0x05, /* bFunctionLength */
// 73 0x24, /* bDescriptorType: CS_INTERFACE */
// 74 0x01, /* bDescriptorSubtype: Call Management Func Desc */
// 75 0x00, /* bmCapabilities: D0+D1 */
// 76 0x01, /* bDataInterface: 1 */
// 77 /*ACM Functional Descriptor*/
// 78 0x04, /* bFunctionLength */
// 79 0x24, /* bDescriptorType: CS_INTERFACE */
// 80 0x02, /* bDescriptorSubtype: Abstract Control Management desc */
// 81 0x02, /* bmCapabilities */
// 82 /*Union Functional Descriptor*/
// 83 0x05, /* bFunctionLength */
// 84 0x24, /* bDescriptorType: CS_INTERFACE */
// 85 0x06, /* bDescriptorSubtype: Union func desc */
// 86 0x00, /* bMasterInterface: Communication class interface */
// 87 0x01, /* bSlaveInterface0: Data Class Interface */
// 88 /*Endpoint 2 Descriptor*/
// 89 0x07, /* bLength: Endpoint Descriptor size */
// 90 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType: Endpoint */
// 91 0x82, /* bEndpointAddress: (IN2) */
// 92 0x03, /* bmAttributes: Interrupt */
// 93 VIRTUAL_COM_PORT_INT_SIZE, /* wMaxPacketSize: */
// 94 0x00,
// 95 0xFF, /* bInterval: */
// 96 /*Data class interface descriptor*/
// 97 0x09, /* bLength: Endpoint Descriptor size */
// 98 USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType: */
// 99 0x01, /* bInterfaceNumber: Number of Interface */
// 100 0x00, /* bAlternateSetting: Alternate setting */
// 101 0x02, /* bNumEndpoints: Two endpoints used */
// 102 0x0A, /* bInterfaceClass: CDC */
// 103 0x00, /* bInterfaceSubClass: */
// 104 0x00, /* bInterfaceProtocol: */
// 105 0x00, /* iInterface: */
// 106 /*Endpoint 3 Descriptor*/
// 107 0x07, /* bLength: Endpoint Descriptor size */
// 108 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType: Endpoint */
// 109 0x03, /* bEndpointAddress: (OUT3) */
// 110 0x02, /* bmAttributes: Bulk */
// 111 VIRTUAL_COM_PORT_DATA_SIZE, /* wMaxPacketSize: */
// 112 0x00,
// 113 0x00, /* bInterval: ignore for Bulk transfer */
// 114 /*Endpoint 1 Descriptor*/
// 115 0x07, /* bLength: Endpoint Descriptor size */
// 116 USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType: Endpoint */
// 117 0x81, /* bEndpointAddress: (IN1) */
// 118 0x02, /* bmAttributes: Bulk */
// 119 VIRTUAL_COM_PORT_DATA_SIZE, /* wMaxPacketSize: */
// 120 0x00,
// 121 0x00 /* bInterval */
// 122 };
// 123
// 124 /* USB String Descriptors */
RSEG DATA_C:CONST:SORT:NOROOT(2)
// 125 const u8 Virtual_Com_Port_StringLangID[VIRTUAL_COM_PORT_SIZ_STRING_LANGID] =
Virtual_Com_Port_StringLangID:
DATA
DC8 4, 3, 9, 4
// 126 {
// 127 VIRTUAL_COM_PORT_SIZ_STRING_LANGID,
// 128 USB_STRING_DESCRIPTOR_TYPE,
// 129 0x09,
// 130 0x04 /* LangID = 0x0409: U.S. English */
// 131 };
// 132
RSEG DATA_C:CONST:SORT:NOROOT(2)
// 133 const u8 Virtual_Com_Port_StringVendor[VIRTUAL_COM_PORT_SIZ_STRING_VENDOR] =
Virtual_Com_Port_StringVendor:
DATA
DC8 38, 3, 83, 0, 84, 0, 77, 0, 105, 0, 99, 0, 114, 0, 111, 0, 101, 0
DC8 108, 0, 101, 0, 99, 0, 116, 0, 114, 0, 111, 0, 110, 0, 105, 0, 99
DC8 0, 115, 0, 0, 0
// 134 {
// 135 VIRTUAL_COM_PORT_SIZ_STRING_VENDOR, /* Size of Vendor string */
// 136 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType*/
// 137 /* Manufacturer: "STMicroelectronics" */
// 138 'S', 0, 'T', 0, 'M', 0, 'i', 0, 'c', 0, 'r', 0, 'o', 0, 'e', 0,
// 139 'l', 0, 'e', 0, 'c', 0, 't', 0, 'r', 0, 'o', 0, 'n', 0, 'i', 0,
// 140 'c', 0, 's', 0
// 141 };
// 142
RSEG DATA_C:CONST:SORT:NOROOT(2)
// 143 const u8 Virtual_Com_Port_StringProduct[VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT] =
Virtual_Com_Port_StringProduct:
DATA
DC8 50, 3, 83, 0, 84, 0, 77, 0, 51, 0, 50, 0, 32, 0, 86, 0, 105, 0, 114
DC8 0, 116, 0, 117, 0, 97, 0, 108, 0, 32, 0, 67, 0, 79, 0, 77, 0, 32, 0
DC8 80, 0, 111, 0, 114, 0, 116, 0, 32, 0, 32, 0, 0, 0
// 144 {
// 145 VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT, /* bLength */
// 146 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
// 147 /* Product name: "STM32 Virtual COM Port" */
// 148 'S', 0, 'T', 0, 'M', 0, '3', 0, '2', 0, ' ', 0, 'V', 0, 'i', 0,
// 149 'r', 0, 't', 0, 'u', 0, 'a', 0, 'l', 0, ' ', 0, 'C', 0, 'O', 0,
// 150 'M', 0, ' ', 0, 'P', 0, 'o', 0, 'r', 0, 't', 0, ' ', 0, ' ', 0
// 151 };
// 152
RSEG DATA_I:DATA:SORT:NOROOT(2)
// 153 u8 Virtual_Com_Port_StringSerial[VIRTUAL_COM_PORT_SIZ_STRING_SERIAL] =
Virtual_Com_Port_StringSerial:
DS8 28
REQUIRE `?<Initializer for Virtual_Com_Port_StringSeria`
RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for Virtual_Com_Port_StringSeria`:
DATA
DC8 26, 3, 83, 0, 84, 0, 77, 0, 51, 0, 50, 0, 49, 0, 48, 0
DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?*?DATA_ID`:
RSEG INITTAB:CODE:ROOT(2)
DATA
?init?tab?DATA_I:
DCD sfe(DATA_I) - sfb(DATA_I), sfb(DATA_I), sfb(DATA_ID)
END
// 154 {
// 155 VIRTUAL_COM_PORT_SIZ_STRING_SERIAL, /* bLength */
// 156 USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
// 157 'S', 0, 'T', 0, 'M', 0, '3', 0, '2', 0, '1', 0, '0', 0
// 158 }
// 159 ;/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
//
// 184 bytes in segment DATA_C
// 28 bytes in segment DATA_I
// 28 bytes in segment DATA_ID
// 12 bytes in segment INITTAB
//
// 0 bytes of CODE memory (+ 12 bytes shared)
// 212 bytes of CONST memory
// 28 bytes of DATA memory
//
//Errors: none
//Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -