📄 dscr.lst
字号:
A51 MACRO ASSEMBLER DSCR 05/27/2006 13:40:47 PAGE 1
MACRO ASSEMBLER A51 V7.10
OBJECT MODULE PLACED IN dscr.OBJ
ASSEMBLER INVOKED BY: C:\Keil\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 UserDscr
23
24 ;EZ USB FX2 control panel Vendor ID 0h, product ID 2131h
25 ; Lakeview Research VID is 0925h. //这个是供货商ID
0925 26 VID equ 0925h
7689 27 PID equ 7689h
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 0001 41 db 00h,01h ; 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 8976 45 db LOW(PID),HIGH(PID)
000C 0000 46 db LOW(DID),HIGH(DID)
000E 00 47 db 0 ; Manufacturer string index
000F 00 48 db 0 ; Product string index
0010 00 49 db 0 ; Serial number string index
0011 01 50 db 1 ; Number of configurations
0012 51 DeviceDscrEnd:
52
53
54
0012 55 ConfigDscr:
0012 09 56 db ConfigDscrEnd - ConfigDscr ; Descriptor length
A51 MACRO ASSEMBLER DSCR 05/27/2006 13:40:47 PAGE 2
0013 02 57 db DSCR_CONFIG ; Descriptor type = OTHER SPEED CONFIG
0014 22 58 db LOW(word_allignment-ConfigDscr) ; Total length (conf+interface+HID+EP's)
0015 00 59 db HIGH(word_allignment-ConfigDscr)
0016 01 60 db 01h ; Number of interfaces
0017 01 61 db 01h ; Value to select this interface
0018 03 62 db 03h ; String index to describe this config
0019 A0 63 db 10100000b ; b7=1; b6=self-powered; b5=Remote WU
001A 00 64 db 0d ; bus power = 80 ma
001B 65 ConfigDscrEnd:
66
001B 67 HIDIntrfcDscr: ; Interface Descriptor
001B 09 68 db HIDIntrfcDscrEnd -HIDIntrfcDscr ; Descriptor length
001C 04 69 db DSCR_INTRFC ; Descriptor type: INTERFACE
001D 0000 70 db 0,0 ; Interface 0, Alternate setting 0
001F 01 71 db 01h ; Number of endpoints
0020 030000 72 db 03h,0,0 ; Class(03)HID, no subclass or protocol
0023 00 73 db 0h ; string index for this interface
0024 74 HIDIntrfcDscrEnd:
75
76
0024 77 HIDDscr:
0024 09 78 db HIDDscrEnd -HIDDscr ; Descriptor length
0025 21 79 db 21h ; Descriptor type - HID
0026 1001 80 db 10h,01h ; HID Spec version 1.10
0028 00 81 db 0 ; country code(none)
0029 01 82 db 01h ; number of HID class descriptors
002A 22 83 db 22h ; class descriptor type: REPORT
002B 3F 84 db LOW(ReportDscrEnd - ReportDscr)
002C 00 85 db HIGH(ReportDscrEnd - ReportDscr)
002D 86 HIDDscrEnd:
87
002D 88 HIDEpInDscr:
002D 07 89 db HIDEpInDscrEnd -HIDEpInDscr ; Descriptor length
002E 05 90 db DSCR_ENDPNT ; Descriptor type : ENDPOINT
002F 81 91 db 81h ; IN-1
0030 03 92 db ET_INT ; Type: INTERRUPT
0031 4000 93 db 40h,0 ; maxPacketSize = 64
0033 10 94 db 10h ; polling interval is 50 msec
0034 95 HIDEpInDscrEnd:
96
97
0034 98 word_allignment:
99
0034 00 100 db 00h ;Word alignment
101
102 ;; usbhidio code start
0035 103 ReportDscr:
0035 0501 104 db 05h, 01h ; Usage Page (Generic Desktop)
0037 0906 105 db 09h, 06h ; Usage (Keyboard)
0039 A101 106 db 0A1h, 01h ; Collection (Application)
003B 0507 107 db 05h, 07h ; Usage Page (Key codes)
003D 19E0 108 db 19h, 0E0h ; Usage minimum (234)
003F 29E7 109 db 29h, 0E7h ; Usage maximum (231)
0041 1500 110 db 15h, 00h ; Logical minimum (0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -