📄 dscr.lst
字号:
A51 MACRO ASSEMBLER DSCR 04/03/2003 11:06:28 PAGE 1
MACRO ASSEMBLER A51 V6.14
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
2
0001 3 DSCR_DEVICE equ 1 ;; Descriptor type: Device
0002 4 DSCR_CONFIG equ 2 ;; Descriptor type: Configuration
0003 5 DSCR_STRING equ 3 ;; Descriptor type: String
0004 6 DSCR_INTRFC equ 4 ;; Descriptor type: Interface
0005 7 DSCR_ENDPNT equ 5 ;; Descriptor type: Endpoint
8
0000 9 ET_CONTROL equ 0 ;; Endpoint type: Control
0001 10 ET_ISO equ 1 ;; Endpoint type: Isochronous
0002 11 ET_BULK equ 2 ;; Endpoint type: Bulk
0003 12 ET_INT equ 3 ;; Endpoint type: Interrupt
13
14 public DeviceDscr, ConfigDscr, StringDscr, UserDscr, ReportDscr, ReportDscrEnd
15
16 DSCR SEGMENT CODE
17
18 ;;-----------------------------------------------------------------------------
19 ;; Global Variables
20 ;;-----------------------------------------------------------------------------
---- 21 rseg DSCR ;; locate the descriptor table in on-part memory.
22
0000 12 23 DeviceDscr: db deviceDscrEnd-DeviceDscr ;; Descriptor length
0001 01 24 db DSCR_DEVICE ;; Decriptor type
0002 1001 25 db 10H, 01H ;; Specification Version (BCD)
0004 00 26 db 00H ;; Device class
0005 00 27 db 00H ;; Device sub-class
0006 00 28 db 00H ;; Device sub-sub-class
0007 40 29 db 64 ;; Maximum packet size
0008 3412 30 db 34H, 12H ;; Vendor ID ;;************************
000A 7856 31 db 78H, 56H ;; Product ID ;;************************
000C 0001 32 dw 0001H ;; Product version ID
000E 01 33 db 1 ;; Manufacturer string index
000F 02 34 db 2 ;; Product string index
0010 00 35 db 0 ;; Serial number string index
0011 01 36 db 1 ;; Numder of configurations
0012 37 deviceDscrEnd:
38
0012 09 39 ConfigDscr: db ConfigDscrEnd-ConfigDscr ;; Descriptor length
0013 02 40 db DSCR_CONFIG ;; Descriptor type
0014 29 41 db EPAllDscrEnd-ConfigDscr ;; Configuration + End Points length (LSB)
0015 00 42 db 00 ;; Configuration length (MSB)
0016 01 43 db 1 ;; Number of interfaces
0017 01 44 db 1 ;; Interface number
0018 00 45 db 0 ;; Configuration string
0019 A0 46 db 10100000b ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
001A 19 47 db 25 ;; Power requirement (div 2 ma)
001B 48 ConfigDscrEnd:
49
001B 50 IntrfcDscr:
001B 09 51 db IntrfcDscrEnd-IntrfcDscr ;; Descriptor length
001C 04 52 db DSCR_INTRFC ;; Descriptor type
001D 00 53 db 0 ;; Zero-based index of this interface
001E 00 54 db 0 ;; Alternate setting
001F 02 55 db 2 ;; Number of end points
0020 03 56 db 03H ;; Interface class
0021 00 57 db 00H ;; Interface sub class
0022 00 58 db 00H ;; Interface sub sub class
A51 MACRO ASSEMBLER DSCR 04/03/2003 11:06:28 PAGE 2
0023 00 59 db 0 ;; Interface descriptor string index
0024 60 IntrfcDscrEnd:
61
0024 62 HIDDscr:
0024 09 63 db 9 ;; Length
0025 21 64 db 21H ;; Type
0026 1001 65 db 10H, 01H ;; HID class spec.# compliance (0110 = 1.1)
0028 00 66 db 0 ;; Country localization (0=none)
0029 01 67 db 1 ;; Number of descriptors to follow (excluding endpo
int)
002A 22 68 db 22H ;; Descriptor type to follow (report)
002B 3400 69 db ReportDscrEnd - ReportDscr, 0 ;; Report descriptor length
70
002D 71 HIDDscrEnd:
72
002D 73 EpO2Dscr:
002D 07 74 db EpO2DscrEnd-EpO2Dscr ;; Descriptor length
002E 05 75 db DSCR_ENDPNT ;; Descriptor type
002F 02 76 db 00000010b ;; Endpoint number, and direction
0030 03 77 db ET_INT ;; Endpoint type
0031 40 78 db 40H ;; Maximun packet size (LSB)
0032 00 79 db 00H ;; Max packect size (MSB)
0033 64 80 db 100 ;; Polling interval
0034 81 EpO2DscrEnd:
82
0034 83 EpI1Dscr:
0034 07 84 db EpI1DscrEnd-EpI1Dscr ;; Descriptor length
0035 05 85 db DSCR_ENDPNT ;; Descriptor type
0036 81 86 db 10000001b ;; Endpoint number, and direction
0037 03 87 db ET_INT ;; Endpoint type
0038 40 88 db 40H ;; Maximun packet size (LSB)
0039 00 89 db 00H ;; Max packect size (MSB)
003A 64 90 db 100 ;; Polling interval
003B 91 EpI1DscrEnd:
92
003B 93 EpAllDscrEnd:
94
003B 95 ReportDscr:
003B 06A0FF 96 db 06H, 0A0H, 0FFH ;; Usage Page (FFA0H = vendor defined)
003E 0901 97 db 09H, 01H ;; Usage (Vendor defined)
0040 A101 98 db 0A1H, 01H ;; Collection (Application)
0042 0902 99 db 09H, 02H ;; Usage (vendor defined)
0044 A100 100 db 0A1H, 00H ;; Collection (Physical)
0046 06A1FF 101 db 06H, 0A1H, 0FFH ;; Usage Page (vendor defined)
102
103 ;; The input report
0049 0903 104 db 09H, 03H ;; Usage (vendor defined)
004B 0904 105 db 09H, 04H ;; Usage (vendor defined)
004D 1580 106 db 15H, 80H ;; Logical minimum (80H = -128)
004F 257F 107 db 25H, 7FH ;; Logical maximum (7FH = 127)
0051 3500 108 db 35H, 00H ;; Physical minimum (0)
0053 45FF 109 db 45H, 0FFH ;; Physical maximum (255)
0055 7508 110 db 75H, 08H ;; Report size (8 bits)
0057 9508 111 db 95H, 08H ;; Report count (2 fields) ;;***************
*
0059 8102 112 db 81H, 02H ;; Input (Data, Variable, Absolute)
113 ;; The output report
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -