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

📄 usb_desc.ls1

📁 DK3200 USB DEMO for KEIL C
💻 LS1
📖 第 1 页 / 共 5 页
字号:
                             30, 2004
                     658     ;   ,                            // USB Spec Release Number in BCD = 1.10  0x10,0x01
                     659     ;   0,                                         // Device Class Code (none)
                     660     ;   0,                                         // Device Subclass Code (none)
                     661     ;   0,                                         // Device Protocol Code (none)
                     662     ;   8,                                         // Maximum Packet Size for EP0
                     663     ;    {
                     664     ;     0x83, 0x04   }
                     665     ;   ,                                          // Vendor ID
                     666     ;    {
                     667     ;     0x00, 0x00   }
                     668     ;   ,                                          // Product ID
                     669     ;    {
                     670     ;     0x00, 0x01   }
                     671     ;   ,                                          // Device Release Number in BCD
                     672     ;   1,                                      // Index of String Desc for Manufacturer
                     673     ;   2,                                         // Index of String Desc for Product
                     674     ;   3,                                         // Index of String Desc for SerNo
                     675     ;   1                                          // Number of possible Configurations
                     676     ;  }
                     677     ;   ;
                     678     ; 
                     679     ; 
                     680     ; 
                     681     ; 
                     682     ; // Copy of HID class descriptor embedded in configDesc below
                     683     ; 
                     684     ; const uchar code hidClassDesc[] =
                     685     ;  {
                     686     ;   9,                                         // Descriptor length
                     687     ;   0x21,                                      // Descriptor type (HID)
                     688     ;   0x10,0x01,                  //changed on April 30, 2004          // HID release (1.10)
                     689     ;   0,                                         // Country code (none)
                     690     ;   1,                                  // Number of HID class descriptors to follow
                     691     ;   0x22,                                      // Report descriptor type (HID)
                     692     ;   REPORT_DESC_LEN, 0                         // Byte length of report descriptor
                     693     ;  }
                     694     ;   ;
                     695     ; 
                     696     ; const uchar code hidClassDescSize = sizeof(hidClassDesc);
                     697     ; 
                     698     ; 
                     699     ; 
                     700     ; 
                     701     ; 
                     702     ; const uchar code configDesc[] =
                     703     ;  {
                     704     ;   9,                                         // Configuration descriptor length
                     705     ;   2,                                         // Descriptor type (configuration)
                     706     ;   34, 0,                                     // Total length of this descriptor
                     707     ;   1,                                         // Number of interfaces
                     708     ;   1,                                         // Configuration value
                     709     ;   0,                                         // Index of string descriptor (none)
                     710     ;   0xC0,                                      // Self powered, no remote wakeup
                     711     ;   25,                                   // <100 mA max power consumption, 2mA steps
                     712     ; 
                     713     ; 
                     714     ; 
                     715     ;                            /*===== Interface =====*/
                     716     ; 
A51 MACRO ASSEMBLER  USB_DESC                                                             04/30/2004 12:57:59 PAGE    12

                     717     ;   9,                                         // Descriptor length
                     718     ;   4,                                         // Descriptor type (interface)
                     719     ;   0,                                         // Number of interface
                     720     ;   0,                                         // Alternate setting
                     721     ;   1,                                         // Number of endpoints (except EP0)
                     722     ; 
                     723     ; // if you would like to disable EP1, easily write 0 (and 1 back for EP1/display copy refr
                             esh enable)
                     724     ;   3,                                         // Class code (HID)
                     725     ;   0,                                         // Subclass (none)
                     726     ;   0,                                         // Protocol (none)
                     727     ;   0,                                         // Index of string descriptor (none)
                     728     ; 
                     729     ; 
                     730     ; 
                     731     ; 
                     732     ;           /*===== HID class descriptor (copy of hidClassDesc) =====*/
                     733     ; 
                     734     ;   9,                                         // Descriptor length
                     735     ;   0x21,                                      // Descriptor type (HID)
                     736     ;   0x10,0x01,                //changed on April 30, 2004        // HID release (1.10)
                     737     ;   0,                                         // Country code (none)
                     738     ;   1,                                  // Number of HID class descriptors to follow
                     739     ;   0x22,                                      // Report descriptor type (HID)
                     740     ;   REPORT_DESC_LEN, 0,                        // Byte length of report descriptor
                     741     ; 
                     742     ; 
                     743     ; 
                     744     ; 
                     745     ;                       /*===== Endpoint descriptor =====*/
                     746     ; 
                     747     ;   7,                                         // Descriptor length (7 bytes)
                     748     ;   5,                                         // Descriptor type (endpoint)
                     749     ;   0x81,                                      // Address (IN1)
                     750     ;   3,                                         // Attributes (interrupt)
                     751     ;   8, 0,                                      // Maximum packet size (8 bytes)
                     752     ;   100                                        // Polling interval (in msec)
                     753     ;  }
                     754     ;   ;
                     755     ; 
                     756     ; 
                     757     ; 
                     758     ; 
                     759     ; 
                     760     ; 
                     761     ; 
                     762     ; 
                     763     ; 
                     764     ; // Language IDs
                     765     ; #define SD0LEN 4
                     766     ; const uchar code string0Desc[] =
                     767     ;  {
                     768     ;   SD0LEN, DT_STRING ,                        // Size, Type
                     769     ;   0x09, 0x04                                 // LangID Codes
                     770     ;  }
                     771     ;   ;
                     772     ; 
                     773     ; 
                     774     ; 
                     775     ; 
                     776     ; 
                     777     ; // Manufacturer String
                     778     ; #define SD1LEN sizeof("ST Microelectronics")*2
                     779     ; const uchar code string1Desc[] =
                     780     ;  {
                     781     ;   SD1LEN, DT_STRING,                         // Size, Type
A51 MACRO ASSEMBLER  USB_DESC                                                             04/30/2004 12:57:59 PAGE    13

                     782     ;   'S', 0,                                    // Unicode String
                     783     ;   'T', 0,
                     784     ;   ' ', 0,
                     785     ;   'M', 0,
                     786     ;   'i', 0,
                     787     ;   'c', 0,
                     788     ;   'r', 0,
                     789     ;   'o', 0,
                     790     ;   'e', 0,
                     791     ;   'l', 0,
                     792     ;   'e', 0,
                     793     ;   'c', 0,
                     794     ;   't', 0,
                     795     ;   'r', 0,
                     796     ;   'o', 0,
                     797     ;   'n', 0,
                     798     ;   'i', 0,
                     799     ;   'c', 0,
                     800     ;   's', 0
                     801     ;  }
                     802     ;   ;
                     803     ; 
                     804     ; // Product String
                     805     ; #define SD2LEN sizeof("DK3200 Evaluation Board")*2
                     806     ; const uchar code string2Desc[] =
                     807     ;  {
                     808     ;   SD2LEN, DT_STRING,                         // Size, Type
                     809     ;   'D', 0,                                    // Unicode String
                     810     ;   'K', 0,
                     811     ;   '3', 0,
                     812     ;   '2', 0,
                     813     ;   '0', 0,
                     814     ;   '0', 0,
                     815     ;   ' ', 0,
                     816     ;   'E', 0,
                     817     ;   'v', 0,
                     818     ;   'a', 0,
                     819     ;   'l', 0,
                     820     ;   'u', 0,
                     821     ;   'a', 0,
                     822     ;   't', 0,
                     823     ;   'i', 0,
                     824     ;   'o', 0,
                     825     ;   'n', 0,
                     826     ;   ' ', 0,
                     827     ;   'B', 0,
                     828     ;   'o', 0,
                     829     ;   'a', 0,
                     830     ;   'r', 0,
                     831     ;   'd', 0
                     832     ;  }
                     833     ;   ;
                     834     ; 
                     835     ; // Serial Number String
                     836     ; #define SD3LEN sizeof("S/N:001/2004")*2
                     837     ; const uchar code string3Desc[] =
                     838     ;  {
                     839     ;   SD3LEN, DT_STRING,                         // Size, Type
                     840     ;   'S', 0,                                    // Unicode String
                     841     ;   '/', 0,
                     842     ;   'N', 0,
                     843     ;   ':', 0,
                     844     ;   '0', 0,
                     845     ;   '0', 0,
                     846     ;   '1', 0,
                     847     ;   '/', 0,
A51 MACRO ASSEMBLER  USB_DESC                                                             04/30/2004 12:57:59 PAGE    14

                     848     ;   '2', 0,
                     849     ;   '0', 0,
                     850     ;   '0', 0,
                     851     ;   '4', 0,
                     852     ;  }
                     853     ;   ;
                     854     ; 
                     855     ; 
                     856     ; const uchar code stringXDesc[2] =
                     857     ;  {
                     858     ;   2, 0,                                      // Size, Type
                     859     ;  }
                     860     ;   ;
                     861     ; 
                     862     ; 
                     863     ; // Table of String Descriptors
                     864     ; const uchar * const code stringDescTable[] =
                     865     ;  {
                     866     ;   string0Desc,
                     867     ;   string1Desc,
                     868     ;   string2Desc,
                     869     ;   string3Desc,
                     870     ;   stringXDesc                                //no string
                     871     ;  }
                     872     ;   ;
                     873     ; 
                     874     ; 
                     875     ; 
                     876     ; /* *************************************************************************
                     877     ;   ***                                                                      ***
                     878     ;   **                         *** End of File ***                            **

⌨️ 快捷键说明

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