⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usbdesc.lst

📁 USB高性能读卡器源码。可灵活增删功能。
💻 LST
📖 第 1 页 / 共 2 页
字号:
ARM COMPILER V2.51a,  usbdesc                                                              16/08/06  09:38:30  PAGE 1   


ARM COMPILER V2.51a, COMPILATION OF MODULE usbdesc
OBJECT MODULE PLACED IN usbdesc.OBJ
COMPILER INVOKED BY: D:\Program Files\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 "msc.h"
   19          #include "usbcfg.h"
   20          #include "usbdesc.h"
   21          
   22          
   23          /* 设备描述符USB Standard Device Descriptor */
   24          const BYTE USB_DeviceDescriptor[] = {
   25            USB_DEVICE_DESC_SIZE,              /* bLength */
   26            USB_DEVICE_DESCRIPTOR_TYPE,        /* bDescriptorType */
   27            WBVAL(0x0110), /* 1.10 */          /* bcdUSB */
   28            0x00,                              /* bDeviceClass */
   29            0x00,                              /* bDeviceSubClass */
   30            0x00,                              /* bDeviceProtocol */
   31            USB_MAX_PACKET0,                   /* bMaxPacketSize0 */
   32            WBVAL(0xC251),                     /* idVendor */
   33            WBVAL(0x1203),                     /* idProduct */
   34            WBVAL(0x0100), /* 1.00 */          /* bcdDevice */
   35            0x04,                              /* iManufacturer */
   36            0x20,                              /* iProduct */
   37            0x48,                              /* iSerialNumber */
   38            0x01                               /* bNumConfigurations */
   39          };
   40          
   41          /* USB 配置描述符Configuration Descriptor */
   42          /*   All Descriptors (Configuration, Interface, Endpoint, Class, Vendor */
   43          const BYTE USB_ConfigDescriptor[] = {
   44          /* Configuration 1 */
   45            USB_CONFIGUARTION_DESC_SIZE,       /* bLength */
   46            USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
   47            WBVAL(                             /* wTotalLength */
   51              1*USB_CONFIGUARTION_DESC_SIZE +
   51              1*USB_INTERFACE_DESC_SIZE     +
   51              2*USB_ENDPOINT_DESC_SIZE
   51            ),
   52            0x01,                              /* bNumInterfaces */
   53            0x01,                              /* bConfigurationValue */
   54            0x00,                              /* iConfiguration */
   55            USB_CONFIG_BUS_POWERED /*|*/       /* bmAttributes */
   56          /*USB_CONFIG_REMOTE_WAKEUP*/,
   57            USB_CONFIG_POWER_MA(100),          /* bMaxPower */
   58          /* 接口描述符Interface 0, Alternate Setting 0, MSC Class */
   59            USB_INTERFACE_DESC_SIZE,           /* bLength */
ARM COMPILER V2.51a,  usbdesc                                                              16/08/06  09:38:30  PAGE 2   

   60            USB_INTERFACE_DESCRIPTOR_TYPE,     /* bDescriptorType */
   61            0x00,                              /* bInterfaceNumber */
   62            0x00,                              /* bAlternateSetting */
   63            0x02,                              /* bNumEndpoints */
   64            USB_DEVICE_CLASS_STORAGE,          /* bInterfaceClass */
   65            MSC_SUBCLASS_SCSI,                 /* bInterfaceSubClass */
   66            MSC_PROTOCOL_BULK_ONLY,            /* bInterfaceProtocol */
   67            0x62,                              /* iInterface */
   68          /* Bulk In Endpoint */
   69            USB_ENDPOINT_DESC_SIZE,            /* bLength */
   70            USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType */
   71            USB_ENDPOINT_IN(1),                /* bEndpointAddress */
   72            USB_ENDPOINT_TYPE_BULK,            /* bmAttributes */
   73            WBVAL(0x0040),                     /* wMaxPacketSize */
   74            0,                                 /* bInterval */
   75          /* Bulk Out Endpoint */
   76            USB_ENDPOINT_DESC_SIZE,            /* bLength */
   77            USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType */
   78            USB_ENDPOINT_OUT(2),               /* bEndpointAddress */
   79            USB_ENDPOINT_TYPE_BULK,            /* bmAttributes */
   80            WBVAL(0x0040),                     /* wMaxPacketSize */
   81            0,                                 /* bInterval */
   82          /* Terminator */
   83            0                                  /* bLength */
   84          };
   85          
   86          /* USB String Descriptor (optional) */
   87          const BYTE USB_StringDescriptor[] = {
   88          /* Index 0x00: LANGID Codes */
   89            0x04,                              /* bLength */
   90            USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
   91            WBVAL(0x0409), /* US English */    /* wLANGID */
   92          /* Index 0x04: Manufacturer */
   93            0x1C,                              /* bLength */
   94            USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
   95            'y',0,
   96            'o',0,
   97            'n',0,
   98            'g',0,
   99            ' ',0,
  100            'S',0,
  101            'o',0,
  102            'f',0,
  103            't',0,
  104            'w',0,
  105            'a',0,
  106            'r',0,
  107            'e',0,
  108          /* Index 0x20: Product */
  109            0x28,                              /* bLength */
  110            USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
  111            'w',0,
  112            'e',0,
  113            'r',0,
  114            't',0,
  115            'y',0,
  116            'u',0,
  117            'i',0,
  118            'f',0,
  119            'S',0,
  120            '-',0,
  121            'E',0,
  122            'K',0,
  123            ' ',0,
  124            's',0,
  125            'f',0,
ARM COMPILER V2.51a,  usbdesc                                                              16/08/06  09:38:30  PAGE 3   

  126            'm',0,
  127            'f',0,
  128            'r',0,
  129            'f',0,
  130          /* Index 0x48: Serial Number */
  131            0x1A,                              /* bLength */
  132            USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
  133            'D',0,
  134            'E',0,
  135            'M',0,
  136            'O',0,
  137            '0',0,
  138            '0',0,
  139            '0',0,
  140            '0',0,
  141            '0',0,
  142            '0',0,
  143            '0',0,
  144            '0',0,
  145          /* Index 0x62: Interface 0, Alternate Setting 0 */
  146            0x0E,                              /* bLength */
  147            USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
  148            'y',0,
  149            'o',0,
  150            'n',0,
  151            '9',0,
  152            'r',0,
  153            'y',0,
  154          };
ARM COMPILER V2.51a,  usbdesc                                                              16/08/06  09:38:30  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 + -