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

📄 usbdesc.lst

📁 USB存储器
💻 LST
📖 第 1 页 / 共 2 页
字号:
ARM COMPILER V2.42b,  usbdesc                                                              02/01/06  23:45:16  PAGE 1   


ARM COMPILER V2.42b, COMPILATION OF MODULE usbdesc
OBJECT MODULE PLACED IN .\Obj\usbdesc.obj
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe usbdesc.c THUMB 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
    6           *      Version: V1.03
    7           *----------------------------------------------------------------------------
    8           *      This file is part of the uVision/ARM development tools.
    9           *      Copyright (c) 2005 Keil Software. All rights reserved.
   10           *---------------------------------------------------------------------------*/
   11          
   12          #include "type.h"
   13          
   14          #include "usb.h"
   15          #include "msc.h"
   16          #include "usbcfg.h"
   17          #include "usbdesc.h"
   18          
   19          
   20          /* USB Standard Device Descriptor */
   21          const BYTE USB_DeviceDescriptor[] = {
   22            USB_DEVICE_DESC_SIZE,              /* bLength */
   23            USB_DEVICE_DESCRIPTOR_TYPE,        /* bDescriptorType */
   24            WBVAL(0x0110), /* 1.10 */          /* bcdUSB */
   25            0x00,                              /* bDeviceClass */
   26            0x00,                              /* bDeviceSubClass */
   27            0x00,                              /* bDeviceProtocol */
   28            USB_MAX_PACKET0,                   /* bMaxPacketSize0 */
   29            WBVAL(0xC251),                     /* idVendor */
   30            WBVAL(0x1303),                     /* idProduct */
   31            WBVAL(0x0100), /* 1.00 */          /* bcdDevice */
   32            0x04,                              /* iManufacturer */
   33            0x20,                              /* iProduct */
   34            0x48,                              /* iSerialNumber */
   35            0x01                               /* bNumConfigurations */
   36          };
   37          
   38          /* USB Configuration Descriptor */
   39          /*   All Descriptors (Configuration, Interface, Endpoint, Class, Vendor */
   40          const BYTE USB_ConfigDescriptor[] = {
   41          /* Configuration 1 */
   42            USB_CONFIGUARTION_DESC_SIZE,       /* bLength */
   43            USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
   44            WBVAL(                             /* wTotalLength */
   48              1*USB_CONFIGUARTION_DESC_SIZE +
   48              1*USB_INTERFACE_DESC_SIZE     +
   48              2*USB_ENDPOINT_DESC_SIZE
   48            ),
   49            0x01,                              /* bNumInterfaces */
   50            0x01,                              /* bConfigurationValue */
   51            0x00,                              /* iConfiguration */
   52            USB_CONFIG_BUS_POWERED |           /* bmAttributes */
   53            USB_CONFIG_REMOTE_WAKEUP,
   54            USB_CONFIG_POWER_MA(100),          /* bMaxPower */
   55          /* Interface 0, Alternate Setting 0, MSC Class */
   56            USB_INTERFACE_DESC_SIZE,           /* bLength */
   57            USB_INTERFACE_DESCRIPTOR_TYPE,     /* bDescriptorType */
   58            0x00,                              /* bInterfaceNumber */
ARM COMPILER V2.42b,  usbdesc                                                              02/01/06  23:45:16  PAGE 2   

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

  125            'r',0,
  126            'y',0,
  127          /* Index 0x48: Serial Number */
  128            0x1A,                              /* bLength */
  129            USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
  130            'D',0,
  131            'E',0,
  132            'M',0,
  133            'O',0,
  134            '0',0,
  135            '0',0,
  136            '0',0,
  137            '0',0,
  138            '0',0,
  139            '0',0,
  140            '0',0,
  141            '0',0,
  142          /* Index 0x62: Interface 0, Alternate Setting 0 */
  143            0x0E,                              /* bLength */
  144            USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
  145            'M',0,
  146            'e',0,
  147            'm',0,
  148            'o',0,
  149            'r',0,
  150            'y',0,
  151          };
ARM COMPILER V2.42b,  usbdesc                                                              02/01/06  23:45:16  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
 00000003  01        DB          0x1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -