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

📄 usb_desc.lst

📁 ST公司的upsd34XX评估板固定源程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V7.06   USB_DESC                                                              10/15/2004 20:55:30 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE USB_DESC
OBJECT MODULE PLACED IN usb_desc.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE usb_desc.c LARGE BROWSE DEBUG OBJECTEXTEND SRC(.\usb_desc.SRC)

stmt level    source

   1           /* `=========================================================================`
   2          
   3                              ***************************************
   4                            ****   *                           *   ****
   5                                          Title: USB_DESC
   6                                       File name: usb_desc.c
   7                                       Project name: USB_DESC
   8                            ***                                    ****
   9                              ****************** * ******************
  10                            ****                                   ****
  11                                        Author: Petr PFEIFER
  12                                     MPG Prague, Czech Republic
  13                            ****   *                           *   ****
  14                              ***************************************
  15          
  16                           $Version:  0.019a  Build: April 30, 2004
  17          
  18                           $Version:  0.019   Build: 2004-03-22,15:44:27
  19          
  20           
  21           
  22           
  23           
  24                                            Description:
  25                                            ============
  26                           Version 0.19 String descriptor problem fixed.
  27                            Since version 0.018 PhysicalReportDesc added
  28                        Since version 0.016, no aux. string constants needed
  29          
  30          
  31                                    based on USB demo version 7E
  32                                         Author: Jon Moore
  33                                   07/22/02 (JAM) Initial coding.
  34                              08/30/03 (JAM) Changed to ST vendor ID.
  35          
  36          
  37                                               Notes:
  38                                               ======
  39                                               -none
  40          
  41          
  42                                     ..........................
  43                                    .                          .
  44                                    .      ******************  .
  45                                    .     **PPPPPPPPPPPPPPPP   .
  46                                    .     *PPPP*******PP****   .
  47                                    .    **PPP********PP***    .
  48                                    .    ***PPP******PP****    .
  49                                    .   *****PPP****PP****     .
  50                                    .   *****PPP****PP****     .
  51                                    .  PPPPPPPP****PP****  (R) .
  52                                    .                          .
  53                                     ..........................
  54          
  55          
C51 COMPILER V7.06   USB_DESC                                                              10/15/2004 20:55:30 PAGE 2   

  56                                            =-=-=-=-=-=
  57                                     =-=-=-=-=-=-=-=-=-=-=-=-=
  58                          =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  59          
  60                                 Copyright 2004 ST Microelectronics
  61          
  62                       This code/file is provided as is and has no warranty,
  63               implied or otherwise.  You are free to use/modify any of the provided
  64              code at your own risk in your applications with the expressed limitation
  65                  of liability (see below) so long as your product using the code
  66                           contains at least one uPSD products (device).
  67          
  68                                      LIMITATION OF LIABILITY:
  69                                      ========================
  70                        NEITHER STMicroelectronics NOR ITS VENDORS OR AGENTS
  71                SHALL BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA,
  72                 INTERRUPTION OF BUSINESS, NOR FOR INDIRECT, SPECIAL, INCIDENTAL OR
  73                 CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER THIS AGREEMENT OR
  74                   OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  75          
  76                          =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  77                                     =-=-=-=-=-=-=-=-=-=-=-=-=
  78                                            =-=-=-=-=-=
  79          
  80                             For current information on uPSD products,
  81                          please consult our pages on the World Wide Web:
  82          
  83                                           www.st.com/psm
  84          
  85                                      - - - - - - - - - - - -
  86          
  87                               STMicroelectronics GROUP OF COMPANIES
  88              Australia - Brazil - China - Czech Republic - Finland - France - Germany
  89             Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco - Singapore
  90                       Spain - Sweden - Switzerland - United Kingdom - U.S.A.
  91          
  92                                         http://www.st.com
  93          
  94          
  95           `========================================================================` */
  96          
  97          
  98          #pragma NOAREGS
  99          
 100          
 101          #include "uPSD3200.h"
 102          #include "usb.h"
 103          
 104          
 105          const uchar code string1Desc[];
 106          const uchar code string2Desc[];
 107          const uchar code string3Desc[];
 108          const uchar code stringXDesc[];
 109          
 110          
 111          
 112          #define REPORT_DESC_LEN sizeof(reportDesc)
 113          
 114          const uchar code reportDesc[] =
 115           {
 116            0x06, 0xA0, 0xFF,                          // Usage page (vendor defined)
 117            0x09, 0xA5,                                // Usage (vendor defined)
C51 COMPILER V7.06   USB_DESC                                                              10/15/2004 20:55:30 PAGE 3   

 118          
 119            0xA1, 0x01,                                // Collection (application)
 120            0x09, 0xA6,                                // Usage (vendor defined)
 121          
 122                                                       // Feature report
 123          
 124            0x09, 0xA5,                                // Usage (vendor defined)
 125            0x15, 0x80,                                // Logical min (-127)
 126            0x25, 0x7F,                                // Logical max (128)
 127            0x75, 0x08,                                // Report size (8 bits)
 128            0x95, 0x40,                                // Report count (64 bytes)
 129            0xB1, 0x02,                                // Feature (data, variable, absolute)
 130          
 131                                                       // Input report
 132          
 133            0x09, 0xA7,                                // Usage (vendor defined)
 134            0x15, 0x80,                                // Logical min (-127)
 135            0x25, 0x7F,                                // Logical max (128)
 136            0x75, 0x08,                                // Report size (8 bits)
 137            0x95, 0x08,                                // Report count (8 bytes)
 138            0x81, 0x02,                                // Input (data, variable, absolute)
 139          
 140                                                       // Output report
 141          
 142            0x09, 0xA9,                                // Usage (vendor defined)
 143            0x15, 0x80,                                // Logical min (-127)
 144            0x25, 0x7F,                                // Logical max (128)
 145            0x75, 0x08,                                // Report size (8 bits)
 146            0x95, 0x40,                                // Report count (64 bytes)
 147            0x91, 0x02,                                // Output (data, variable, absolute)
 148          
 149            0xC0                                       // End Collection (Application)
 150           }
 151            ;
 152          
 153          const uchar code reportDescSize = REPORT_DESC_LEN;
 154          
 155          
 156          
 157          
 158          
 159          const uchar code PhysicalReportDesc[] =
 160           {
 161            0,0,0                                      // no physical descriptor defined now
 162           }
 163            ;
 164          
 165          const uchar code PhysicalReportDescSize = sizeof(PhysicalReportDesc);
 166          
 167          
 168          
 169          
 170          
 171          //device_descriptor                          //device_descriptor类型在usb.h中定义
 172                                                      //定义设备描述符变量
 173          const device_descriptor code deviceDesc =
 174           {
 175            sizeof(device_descriptor),                 // Size of this Descriptor in Bytes
 176            DT_DEVICE,                                 // Descriptor Type (=1)
 177             { 0x10, 0x01 },            //changed on April 30, 2004
 178                                        // USB Spec Release Number in BCD = 1.10  0x10,0x01
 179                                        //{0x01,0x00},版本号是1.0 usb
C51 COMPILER V7.06   USB_DESC                                                              10/15/2004 20:55:30 PAGE 4   

 180                                        //{0x10,0x01}是字结构的赋值
 181            0,                                         // Device Class Code (none)
 182            0,                                         // Device Subclass Code (none)
 183            0,                                         // Device Protocol Code (none)
 184            8,                                         // Maximum Packet Size for EP0
 185             { 0x83, 0x04},
 186                                                      // Vendor ID
 187             {0x00, 0x00 },
 188                                                      // Product ID
 189             {0x00, 0x01 },
 190                                                      // Device Release Number in BCD
 191                                                      
 192            1,                                      // Index of String Desc for Manufacturer
 193            2,                                      // Index of String Desc for Product
 194            3,                                      // Index of String Desc for SerNo
 195            1                                       // Number of possible Configurations
 196           }
 197            ;
 198          
 199          
 200          
 201          

⌨️ 快捷键说明

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