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

📄 dscr.lst

📁 针对USB开发板的HID键盘,里面有原代码,可以用KEIL直接编译通过,另外有原理图.
💻 LST
📖 第 1 页 / 共 2 页
字号:
A51 MACRO ASSEMBLER  DSCR                                                                 09/24/2007 17:04:30 PAGE     1


MACRO ASSEMBLER A51 V7.10
OBJECT MODULE PLACED IN dscr.OBJ
ASSEMBLER INVOKED BY: d:\Keil\C51\BIN\A51.EXE dscr.a51 SET(SMALL) DEBUG EP

LOC  OBJ            LINE     SOURCE

                       1     ;;-----------------------------------------------------------------------------
                       2     ;;   File:      dscr.a51
                       3     ;;   Contents:  This file contains descriptor data tables.
                       4     ;;
                       5     ;; $Archive: /USB/Examples/FX2LP/hid_kb/dscr.a51 $
                       6     ;; $Date: 5/27/04 1:25p $
                       7     ;; $Revision: 2 $
                       8     ;;
                       9     ;;
                      10     ;;-----------------------------------------------------------------------------
                      11     ;; Copyright 2003, Cypress Semiconductor Corporation
                      12     ;;-----------------------------------------------------------------------------
                      13     ;;-----------------------------------------------------------------------------
                      14        
  0001                15     DSCR_DEVICE   equ   1   ;; Descriptor type: Device
  0002                16     DSCR_CONFIG   equ   2   ;; Descriptor type: Configuration
  0003                17     DSCR_STRING   equ   3   ;; Descriptor type: String
  0004                18     DSCR_INTRFC   equ   4   ;; Descriptor type: Interface
  0005                19     DSCR_ENDPNT   equ   5   ;; Descriptor type: Endpoint
  0006                20     DSCR_DEVQUAL  equ   6   ;; Descriptor type: Device Qualifier
                      21     
  0012                22     DSCR_DEVICE_LEN   equ   18
  0009                23     DSCR_CONFIG_LEN   equ    9
  0009                24     DSCR_INTRFC_LEN   equ    9
  0007                25     DSCR_ENDPNT_LEN   equ    7
  000A                26     DSCR_DEVQUAL_LEN  equ   10
                      27     
  0000                28     ET_CONTROL   equ   0   ;; Endpoint type: Control
  0001                29     ET_ISO       equ   1   ;; Endpoint type: Isochronous
  0002                30     ET_BULK      equ   2   ;; Endpoint type: Bulk
  0003                31     ET_INT       equ   3   ;; Endpoint type: Interrupt
                      32     
                      33     public      DeviceDscr, DeviceQualDscr, HighSpeedConfigDscr, FullSpeedConfigDscr, StringDsc
                             r, UserDscr, HIDDscr
                      34     public      HIDReportDscr, HIDReportDscrEnd
                      35     DSCR   SEGMENT   CODE PAGE
                      36     
                      37     ;;-----------------------------------------------------------------------------
                      38     ;; Global Variables
                      39     ;;-----------------------------------------------------------------------------
----                  40           rseg DSCR      ;; locate the descriptor table in on-part memory.
                      41     
0000                  42     DeviceDscr:   
0000 12               43           db   DSCR_DEVICE_LEN      ;; Descriptor length
0001 01               44           db   DSCR_DEVICE   ;; Decriptor type
0002 0002             45           dw   0002H      ;; Specification Version (BCD)
0004 00               46           db   00H        ;; Device class
0005 00               47           db   00H         ;; Device sub-class
0006 00               48           db   00H         ;; Device sub-sub-class
0007 40               49           db   64         ;; Maximum packet size
0008 B404             50           dw   0B404H      ;; Vendor ID
000A 0510             51           dw   0510H      ;; Product ID (Sample Device)
000C 0000             52           dw   0000H      ;; Product version ID
000E 01               53           db   1         ;; Manufacturer string index
000F 02               54           db   2         ;; Product string index
0010 00               55           db   0         ;; Serial number string index
0011 01               56           db   1         ;; Number of configurations
                      57     
A51 MACRO ASSEMBLER  DSCR                                                                 09/24/2007 17:04:30 PAGE     2

0012                  58     DeviceQualDscr:
0012 0A               59           db   DSCR_DEVQUAL_LEN   ;; Descriptor length
0013 06               60           db   DSCR_DEVQUAL   ;; Decriptor type
0014 0002             61           dw   0002H      ;; Specification Version (BCD)
0016 00               62           db   00H        ;; Device class
0017 00               63           db   00H         ;; Device sub-class
0018 00               64           db   00H         ;; Device sub-sub-class
0019 40               65           db   64         ;; Maximum packet size
001A 01               66           db   1         ;; Number of configurations
001B 00               67           db   0         ;; Reserved
                      68     
001C                  69     HighSpeedConfigDscr:   
001C 09               70           db   DSCR_CONFIG_LEN               ;; Descriptor length
001D 02               71           db   DSCR_CONFIG                  ;; Descriptor type
001E 29               72           db   (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) mod 256 ;; Total Length (LSB)
001F 00               73           db   (HighSpeedConfigDscrEnd-HighSpeedConfigDscr)  /  256 ;; Total Length (MSB)
0020 01               74           db   1      ;; Number of interfaces
0021 01               75           db   1      ;; Configuration number
0022 00               76           db   0      ;; Configuration string
0023 A0               77           db   10100000b   ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
0024 32               78           db   50      ;; Power requirement (div 2 ma)
                      79     
                      80     ;; Interface Descriptor
0025 09               81           db   DSCR_INTRFC_LEN      ;; Descriptor length
0026 04               82           db   DSCR_INTRFC         ;; Descriptor type
0027 00               83           db   0               ;; Zero-based index of this interface
0028 00               84           db   0               ;; Alternate setting
0029 02               85           db   2               ;; Number of end points 
002A 03               86           db   03H            ;; Interface class
002B 00               87           db   00H               ;; Interface sub class
002C 00               88           db   00H               ;; Interface sub sub class
002D 00               89           db   0               ;; Interface descriptor string index
                      90     
002E                  91     HIDDscr:
002E 09               92           db   09h      ; length
002F 21               93           db   21h      ; type: HID
0030 1001             94           db   010h,01h      ; release: HID class rev 1.1
0032 00               95           db   00h      ; country code (none)
0033 01               96           db   01h      ; number of HID class descriptors to follow
0034 22               97           db   22h      ; report descriptor type (HID)
0035 3F               98           db   (HIDReportDscrEnd - HIDReportDscr) ; length of HID descriptor
0036 00               99           db   00h
0037                 100     HIDDscrEnd:
                     101           
                     102     ;; Endpoint Descriptor
0037 07              103           db   DSCR_ENDPNT_LEN      ;; Descriptor length
0038 05              104           db   DSCR_ENDPNT         ;; Descriptor type
0039 81              105           db   81H               ;; Endpoint number, and direction
003A 03              106           db   ET_INT            ;; Endpoint type
003B 40              107           db   40H               ;; Maximun packet size (LSB)
003C 00              108           db   00H               ;; Max packect size (MSB)
003D 0A              109           db   0AH               ;; Polling interval
                     110     
                     111     ;; Endpoint Descriptor
003E 07              112           db   DSCR_ENDPNT_LEN      ;; Descriptor length
003F 05              113           db   DSCR_ENDPNT         ;; Descriptor type
0040 01              114           db   01H               ;; Endpoint number, and direction
0041 03              115           db   ET_INT            ;; Endpoint type
0042 40              116           db   40H               ;; Maximun packet size (LSB)
0043 00              117           db   00H               ;; Max packect size (MSB)
0044 0A              118           db   0AH               ;; Polling interval
                     119     
0045                 120     HighSpeedConfigDscrEnd:   
                     121     
0045 00              122           db    00h               ;; pad
                     123     
A51 MACRO ASSEMBLER  DSCR                                                                 09/24/2007 17:04:30 PAGE     3

0046                 124     FullSpeedConfigDscr:   
0046 09              125           db   DSCR_CONFIG_LEN               ;; Descriptor length
0047 02              126           db   DSCR_CONFIG                  ;; Descriptor type
0048 29              127           db   (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) mod 256 ;; Total Length (LSB)
0049 00              128           db   (FullSpeedConfigDscrEnd-FullSpeedConfigDscr)  /  256 ;; Total Length (MSB)
004A 01              129           db   1      ;; Number of interfaces
004B 01              130           db   1      ;; Configuration number
004C 00              131           db   0      ;; Configuration string
004D A0              132           db   10100000b   ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
004E 32              133           db   50      ;; Power requirement (div 2 ma)
                     134     
                     135     ;; Interface Descriptor
004F 09              136           db   DSCR_INTRFC_LEN      ;; Descriptor length
0050 04              137           db   DSCR_INTRFC         ;; Descriptor type
0051 00              138           db   0               ;; Zero-based index of this interface
0052 00              139           db   0               ;; Alternate setting
0053 02              140           db   2               ;; Number of end points 
0054 03              141           db   03H            ;; Interface class
0055 00              142           db   00H               ;; Interface sub class

⌨️ 快捷键说明

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