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

📄 dscr.lst

📁 usb1.1协议的实现
💻 LST
📖 第 1 页 / 共 2 页
字号:
A51 MACRO ASSEMBLER  DSCR                                                                 03/16/2004 14:49:38 PAGE     1


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

LOC  OBJ            LINE     SOURCE

                       1     ; dscr.a51
                       2     ; Contains the Device Descriptor, Configuration(Interface, HID and Endpoint) Descriptor,
                       3     ; and String descriptors.
                       4     ;
                       5     
                       6     
  0001                 7     DSCR_DEVICE      equ   1                        ;; Descriptor type: Device
  0002                 8     DSCR_CONFIG      equ   2                        ;; Descriptor type: Configuration
  0003                 9     DSCR_STRING      equ   3                        ;; Descriptor type: String
  0004                10     DSCR_INTRFC      equ   4                        ;; Descriptor type: Interface
  0005                11     DSCR_ENDPNT      equ   5                        ;; Descriptor type: Endpoint
  0006                12     DSCR_DEVQUAL     equ   6                        ;; Descriptor type: Device Qualifier
  0007                13     DSCR_OTHERSPEED  equ   7 
                      14     
                      15     
  0000                16     ET_CONTROL   equ   0                            ;; Endpoint type: Control
  0001                17     ET_ISO       equ   1                            ;; Endpoint type: Isochronous
  0002                18     ET_BULK      equ   2                            ;; Endpoint type: Bulk
  0003                19     ET_INT       equ   3                            ;; Endpoint type: Interrupt
                      20     
                      21     public  DeviceDscr,ConfigDscr,StringDscr,HIDDscr,ReportDscr,ReportDscrEnd,StringDscr0, Stri
                             ngDscr1, StringDscr2
                      22     public  HighSpeedConfigDscr,FullSpeedConfigDscr,DeviceQualDscr, UserDscr
                      23      
                      24     ;EZ USB FX2 control panel Vendor ID 0h, product ID 2131h
                      25     ; Lakeview Research VID is 0925h.   
  0925                26     VID     equ     0925h
  1234                27     PID     equ     1234h
  0000                28     DID     equ     0000h
                      29     
                      30     ;cseg at 0x90
                      31     DSCR   SEGMENT   CODE PAGE
                      32     
                      33     ;;-----------------------------------------------------------------------------
                      34     ;; Global Variables
                      35     ;;-----------------------------------------------------------------------------
----                  36           rseg DSCR      ;; locate the descriptor table in on-part memory.
                      37     
0000                  38     DeviceDscr:     
0000 12               39             db      DeviceDscrEnd - DeviceDscr              ; Descriptor length
0001 01               40             db      DSCR_DEVICE                     ; Descriptor type = DEVICE
0002 0002             41             db      00h,02h                         ; spec version (BCD) is 2.00               
0004 000000           42             db      0,0,0                           ; HID class is defined in the interface des
                             criptor
0007 40               43             db      64                              ; maxPacketSize
0008 2509             44             db      LOW(VID),HIGH(VID)
000A 3412             45             db      LOW(PID),HIGH(PID)
000C 0000             46             db      LOW(DID),HIGH(DID)
000E 01               47             db       1                              ; Manufacturer string index
000F 02               48             db       2                              ; Product string index
0010 00               49             db       0                              ; Serial number string index
0011 01               50             db       1                              ; Number of configurations
0012                  51     DeviceDscrEnd:
                      52     
0012                  53     DeviceQualDscr:
0012 0A               54         db  DeviceQualDscrEnd - DeviceQualDscr      ;Descriptor Length
0013 06               55         db  DSCR_DEVQUAL                            ;Descriptor Type
0014 0002             56         db  00h,02h                                 ;spec version (BCD) is 2.00
A51 MACRO ASSEMBLER  DSCR                                                                 03/16/2004 14:49:38 PAGE     2

0016 000000           57         db  0,0,0                                   ;Device class, sub-class, and sub-sub-class
0019 04               58         db  04h                                     ;Max Packet Size
001A 01               59         db  1                                       ;Number of configurations
001B 00               60         db  0                                       ;Reserved
001C                  61     DeviceQualDscrEnd:
                      62     
001C                  63     HighSpeedConfigDscr:
001C                  64     ConfigDscr:
001C 09               65             db      ConfigDscrEnd - ConfigDscr      ; Descriptor length
001D 02               66             db      DSCR_CONFIG                     ; Descriptor type = CONFIG
001E 29               67             db      LOW(HS_End-ConfigDscr)          ; total length (conf+interface+HID+EP's)
001F 00               68             db      HIGH(HS_End-ConfigDscr)
0020 01               69             db      01h                             ; number of interfaces
0021 01               70             db      01h                             ; value to select this interface
0022 03               71             db      03h                             ; string index to describe this config
0023 80               72             db      10000000b                       ; b7=1; b6=self-powered; b5=Remote WU
0024 28               73             db      40d                             ; bus power = 80 ma
0025                  74     ConfigDscrEnd:
                      75     
0025                  76     IntrfcDscr:             ; Interface Descriptor
0025 09               77             db      IntrfcDscrEnd -  IntrfcDscr     ; Descriptor length
0026 04               78             db      DSCR_INTRFC                     ; Descriptor type = INTERFACE
0027 0000             79             db      0,0                             ; Interface 0, Alternate setting 0
0029 02               80             db      02h                             ; number of endpoints
002A 030000           81             db      03h,0,0                         ; class(03)HID, no subclass or protocol
002D 00               82             db      0h                              ; string index for this interface
002E                  83     IntrfcDscrEnd:
                      84     
002E                  85     HIDDscr:
002E 09               86             db      HIDDscrEnd - HIDDscr            ; Descriptor length
002F 21               87             db      21h                             ; Descriptor type - HID
0030 1001             88             db      10h,01h                         ; HID Spec version 1.10
0032 00               89             db      0                               ; country code(none)
0033 01               90             db      01h                             ; number of HID class descriptors
0034 22               91             db      22h                             ; class descriptor type: REPORT
0035 34               92             db      LOW(ReportDscrEnd - ReportDscr)
0036 00               93             db      HIGH(ReportDscrEnd - ReportDscr)
0037                  94     HIDDscrEnd:
                      95     
0037                  96     EpInDscr:       ; I-0, AS-0 first endpoint descriptor (EP1IN)
0037 07               97             db      EpInDscrEnd - EpInDscr          ; Descriptor length
0038 05               98             db      DSCR_ENDPNT                     ; Descriptor type = ENDPOINT
0039 81               99             db      81h                             ; IN-1
003A 03              100             db      03h                             ; Type: INTERRUPT
003B 4000            101             db      64d,0                           ; MaxPacketSize = 64
003D 05              102             db      05h                             ; polling interval is 2^(5-1) = 16 mSec
003E                 103     EpInDscrEnd:
                     104     
003E                 105     EpOutDscr:
003E 07              106             db      EpOutDscrEnd - EpOutDscr        ; Descriptor length
003F 05              107             db      DSCR_ENDPNT                     ; Descriptor type = ENDPOINT
0040 01              108             db      01h                             ; OUT-1
0041 03              109             db      03h                             ; Type ; INTERRUPT
0042 4000            110             db      64d,0                           ; MaxPacketSize = 64
0044 05              111             db      05h                             ; polling interval is 2^(5-1) = 16 mSec
0045                 112     EpOutDscrEnd:   
0045                 113     HS_End:
                     114     
0045 00              115         db  00h         ; Word alignment
                     116     
0046                 117     FullSpeedConfigDscr:
0046 09              118             db      FullSpeedConfigDscrEnd - FullSpeedConfigDscr            ; Descriptor length
0047 07              119             db      DSCR_OTHERSPEED                 ; Descriptor type = OTHER SPEED CONFIG
0048 29              120             db      LOW(FS_End-FullSpeedConfigDscr) ; Total length (conf+interface+HID+EP's)
0049 00              121             db      HIGH(FS_End-FullSpeedConfigDscr)
004A 01              122             db      01h                             ; Number of interfaces
A51 MACRO ASSEMBLER  DSCR                                                                 03/16/2004 14:49:38 PAGE     3

004B 01              123             db      01h                             ; Value to select this interface
004C 03              124             db      03h                             ; String index to describe this config
004D A0              125             db      10100000b                       ; b7=1; b6=self-powered; b5=Remote WU
004E 00              126             db      0d                              ; bus power = 80 ma
004F                 127     FullSpeedConfigDscrEnd:
                     128      
004F                 129     FullSpeedIntrfcDscr:                            ; Interface Descriptor
004F 09              130             db      FullSpeedIntrfcDscrEnd -  FullSpeedIntrfcDscr   ; Descriptor length
0050 04              131             db      DSCR_INTRFC                     ; Descriptor type: INTERFACE
0051 0000            132             db      0,0                             ; Interface 0, Alternate setting 0
0053 02              133             db      02h                             ; Number of endpoints
0054 030000          134             db      03h,0,0                         ; Class(03)HID, no subclass or protocol
0057 00              135             db      0h                              ; string index for this interface
0058                 136     FullSpeedIntrfcDscrEnd:
                     137     
                     138     
0058                 139     FullSpeedHIDDscr:
0058 09              140             db      FullSpeedHIDDscrEnd -FullSpeedHIDDscr   ; Descriptor length
0059 21              141             db      21h                             ; Descriptor type - HID
005A 1001            142             db      10h,01h                         ; HID Spec version 1.10
005C 00              143             db      0                               ; country code(none)
005D 01              144             db      01h                             ; number of HID class descriptors
005E 22              145             db      22h                             ; class descriptor type: REPORT
005F 34              146             db      LOW(ReportDscrEnd - ReportDscr)
0060 00              147             db      HIGH(ReportDscrEnd - ReportDscr)
0061                 148     FullSpeedHIDDscrEnd:
                     149     
0061                 150     FSEpInDscr:     
0061 07              151             db      FSEpInDscrEnd - FSEpInDscr      ; Descriptor length
0062 05              152             db      DSCR_ENDPNT                     ; Descriptor type : ENDPOINT
0063 81              153             db      81h                             ; IN-1
0064 03              154             db      ET_INT                          ; Type: INTERRUPT
0065 4000            155             db      40h,0                           ; maxPacketSize = 64
0067 01              156             db      01h                             ; polling interval is 50 msec
0068                 157     FSEpInDscrEnd:
                     158     
0068                 159     FSEpOutDscr:    
0068 07              160             db      FSEpOutDscrEnd - FSEpOutDscr    ; Descriptor length
0069 05              161             db      DSCR_ENDPNT                     ; Descriptor type = ENDPOINT
006A 01              162             db      01h                             ; OUT-1
006B 03              163             db      ET_INT                          ; type - INTERRUPT
006C 4000            164             db      40h,0                           ; maxPacketSize = 12
006E 01              165             db      01h                             ; polling interval is 50 msec
006F                 166     FSEpOutDscrEnd:
006F                 167     FS_End:
                     168     
006F 00              169             db  00h         ;Word alignment
                     170     
                     171     ;; usbhidio code start
0070                 172     ReportDscr:
                     173     
0070 06A0FF          174             db 06h, 0A0h, 0FFh ;    Usage Page (FFA0h, vendor defined)
0073 0901            175             db 09h, 01h     ;       Usage (vendor defined)
0075 A101            176             db 0A1h, 01h    ;       Collection (Application)
0077 0902            177             db 09h, 02h     ;       Usage (vendor defined)
0079 A100            178             db 0A1h, 00h    ;       Collection (Physical)
007B 06A1FF          179             db 06h, 0A1h, 0FFh ;    Usage Page (vendor defined)
                     180     
                     181     ;; The Input report
007E 0903            182             db 09h, 03h     ;       Usage (vendor defined)

⌨️ 快捷键说明

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