📄 3100_2interface.lst
字号:
0001
0002
0003
00004 ;==================================================================================================
00005 ;
00006 ; Include Definitions
00007 ;
00008 ;==================================================================================================
0009
0010
0011
00012 ;==================================================================================================
00013 ;
00014 ; Register Definitions
00015 ;
00016 ;==================================================================================================
0017
00018 ;--------F-Plane Register Files---------------------------------------
0019
20 0000 Indf equ 00h
21 0001 Timer0 equ 01h
22 0002 Pc equ 02h
23 0003 Psw equ 03h
24 0003 Status equ 03h
25 0004 Fsr equ 04h ;file select register bit6 ~ bit0
26 0005 Pae equ 05h ;port a output enable bit7 ~ bit4 1:out 0:in
27 0005 Pad equ 05h ;port a output data bit3 ~ bit0
28 0006 Pbd equ 06h ;port b output data bit3 ~ bit0
29 0007 Led equ 07h ;led output
30 0008 Ksol equ 08h ;key scan output[07 ~ 00]
31 0009 Ksoh equ 09h ;key scan output[15 ~ 08]
32 000A Ksi equ 0ah ;key scan input[07 ~ 00] //R
33 000D Pdd equ 0dh
34 000E Gpr0 equ 0eh ;general purpose register0
35 000F Gpr1 equ 0fh ;general purpose register1
36 0010 UsbFun equ 10h ;USB function address bit6 ~ bit0 bit7 is USB function enable
37 0011 Int0 equ 11h
38 0012 Int1 equ 12h
39 0013 Int2 equ 13h
40 0013 UsbCtr equ 13h
41 0014 Rc0Cnt equ 14h ;received data byte count bit3 ~ bit0
42 0015 Tx0Reg equ 15h
43 0015 Tx0Cnt equ 15h ;endpoint 0 transmit byte count bit3 ~ bit0
44 0016 Tx1Reg equ 16h
45 0016 Tx1Cnt equ 16h ;endpoint 1 transmit byte count bit3 ~ bit0
46 0017 Tx2Reg equ 17h
47 0017 Tx2Cnt equ 17h ;endpoint 2 transmit byte count bit3 ~ bit0
48 0018 Rc0Fifo equ 18h ;18h ~ 1fh endpoint 0 receive buffer(8 bytes)
00049 ;definitions for SETUP packets
50 0018 Rc0Fifo0 equ 18h
51 0019 Rc0Fifo1 equ 19h
52 001A Rc0Fifo2 equ 1ah
53 001B Rc0Fifo3 equ 1bh
54 001C Rc0Fifo4 equ 1ch
55 001D Rc0Fifo5 equ 1dh
56 001E Rc0Fifo6 equ 1eh
57 001F Rc0Fifo7 equ 1fh
0058
0059
00060 ;--------R-Plane Register Files---------------------------------------
0061
62 0001 Tm0Reload equ 01h ;Timer0 overflow reload value
63 0002 Tm0Pscl equ 02h ;Timer0 Pre-Scale, 0:div2,7:div256,8:div1
64 0003 PwrDown equ 03h ;write this register to enter Power-Down Mode
65 0004 WdtEn equ 04h ;write this register to clear WDT and enable WDT
66 0005 KbdMask equ 05h ;mask KSI[7:0] interrupt function while the corresponding bit is "1"
67 000F TestReg equ 0fh ;Test Mode option
68 0011 IntEn0 equ 11h
69 0012 IntEn1 equ 12h
70 0018 Tx0Fifo equ 18h ;18h ~ 1fh endpoint 0 transmit buffer(8 bytes)
71 0018 Tx0Fifo0 equ 18h
72 0019 Tx0Fifo1 equ 19h
73 001A Tx0Fifo2 equ 1ah
74 001B Tx0Fifo3 equ 1bh
75 001C Tx0Fifo4 equ 1ch
76 001D Tx0Fifo5 equ 1dh
77 001E Tx0Fifo6 equ 1eh
78 001F Tx0Fifo7 equ 1fh
79 0020 Tx1Fifo equ 20h ;20h ~ 27h endpoint 1 transmit buffer(8 bytes)
80 0020 Tx1Fifo0 equ 20h
81 0021 Tx1Fifo1 equ 21h
82 0022 Tx1Fifo2 equ 22h
83 0023 Tx1Fifo3 equ 23h
84 0024 Tx1Fifo4 equ 24h
85 0025 Tx1Fifo5 equ 25h
86 0026 Tx1Fifo6 equ 26h
87 0027 Tx1Fifo7 equ 27h
88 0028 Tx2Fifo equ 28h ;28h ~ 2fh endpoint 2 transmit buffer(8 bytes)
89 0028 Tx2Fifo0 equ 28h
90 0029 Tx2Fifo1 equ 29h
91 002A Tx2Fifo2 equ 2ah
92 002B Tx2Fifo3 equ 2bh
93 002C Tx2Fifo4 equ 2ch
94 002D Tx2Fifo5 equ 2dh
95 002E Tx2Fifo6 equ 2eh
96 002F Tx2Fifo7 equ 2fh
0097
00098 ;==================================================================================================
00099 ;
00100 ; Define Bit Definitions
00101 ;
00102 ;==================================================================================================
0103
00104 ;--------F-Plane Register Files---------------------------------------
0105
106 002F RomPage defstring 03h,6
107 002F RamBank defstring 03h,4
108 002F Zero defstring 03h,2
109 002F DCarry defstring 03h,1
110 002F Carry defstring 03h,0
0111
112 002F Data defstring 06h,0
113 002F Clock defstring 06h,1
0114
115 002F UsbEn defstring 10h,7
0116
117 002F Rc0i defstring 11h,7 ;endpoint 0 receive interrupt flag,write 0 to clear flag
118 002F Tx0i defstring 11h,6 ;endpoint 0 transmit interrupt flag,write 0 to clear flag
119 002F Tx1i defstring 11h,5 ;endpoint 1 transmit interrupt flag,write 0 to clear flag
120 002F Tx2i defstring 11h,4 ;endpoint 2 transmit interrupt flag,write 0 to clear flag
121 002F Rsti defstring 11h,3 ;usb bus reset interrupt flag,write 0 to clear flag
122 002F Suspi defstring 11h,2 ;usb suspend interrupt flag,write 0 to clear flag
0123
124 002F Rsmi defstring 12h,3 ;usb resume interrupt flag,write 0 to clear flag
125 002F Kbdi defstring 12h,2 ;keyboard interrupt flag,write 0 to clear flag
126 002F Pb0i defstring 12h,1 ;mouse interrupt flag,write 0 to clear flag
127 002F Tm0i defstring 12h,0 ;timer0 interrupt flag,write 0 to clear flag
0128
129 002F Suspend defstring 13h,7 ;s/w force usb interface into suspend mode
130 002F Resume defstring 13h,6 ;s/w force usb interface send RESUME signal in suspend mode
131 002F Ep1Cfg defstring 13h,5 ;set endpoint 1 configed
132 002F Ep2Cfg defstring 13h,4 ;set endpoint 2 configed
133 002F CtrRdy defstring 13h,3 ;H/W will stall an invalid out token during control read transfer
134 002F Rc0Rdy defstring 13h,0 ;endpoint 0 ready for receive,clear by H/W while RC0I occurs
0135
136 002F Rc0Tgl defstring 14h,7 ;1:received DATA1 packet; 0:received DATA0 packet //R
137 002F Rc0Err defstring 14h,6 ;endpoint 0 received data error //R
138 002F Ep0Dir defstring 14h,5 ;1:in transfer; 0:out/setup transfer //R
139 002F Ep0Set defstring 14h,4 ;SETUP Token indicator //R
0140
141 002F Tx0Rdy defstring 15h,7 ;endpoint 0 ready for transmit,clear by H/W while TX0I occurs
142 002F Tx0Tgl defstring 15h,6 ;endpoint 0 transmit DATA1/DATA0 packet
143 002F Ep0Stall defstring 15h,5 ;endpoint 0 will stall OUT/IN packet
0144
145 002F Tx1Rdy defstring 16h,7 ;endpoint 1 ready for transmit,clear by H/W while TX1I occurs
146 002F Tx1Tgl defstring 16h,6 ;endpoint 1 transmit DATA1/DATA0 packet
147 002F Ep1Stall defstring 16h,5 ;endpoint 1 will stall IN packet
0148
149 002F Tx2Rdy defstring 17h,7 ;endpoint 2 ready for transmit,clear by H/W while TX2I occurs
150 002F Tx2Tgl defstring 17h,6 ;endpoint 2 transmit DATA1/DATA0 packet
151 002F Ep2Stall defstring 17h,5 ;endpoint 2 will stall IN packet
0152
00153 ;--------R-Plane Register Files---------------------------------------
0154
155 002F Rc0ie defstring 11h,7 ;RC0I interrupt enable
156 002F Tx0ie defstring 11h,6 ;TX0I interrupt enable
157 002F Tx1ie defstring 11h,5 ;TX1I interrupt enable
158 002F Tx2ie defstring 11h,4 ;TX2I interrupt enable
159 002F Rstie defstring 11h,3 ;RSTI interrupt enable
160 002F Suspie defstring 11h,2 ;SUSPI interrupt enable
0161
162 002F Ps2Sel defstring 12h,4
163 002F Rsmie defstring 12h,3 ;RSMI interrupt enable
164 002F Kbdie defstring 12h,2 ;KeyBoard interrupt enable
165 002F Pb0ie defstring 12h,1 ;Mouse interrupt enable
166 002F Tm0ie defstring 12h,0 ;Timer0 interrupt enable
0167
00168 ;--------Gpr0 Bit Definitions------------------------------
0169
170 002F NewAdrFlag defstring 0eh,7 ;
171 002F TableSelBit defstring 0eh,6 ;
172 002F SystemKeyFlag defstring 0eh,5 ;
173 002F SuspendFlag defstring 0eh,4 ;
174 002F Rc0Flag defstring 0eh,3 ;
175 002F Tx0Flag defstring 0eh,2 ;
00176 ; defstring 0eh,1 ;
177 002F StartScanFlag defstring 0eh,0 ;
0178
0179
00180 ;--------Gpr1 Bit Definitions------------------------------
0181
182 002F DataInFlag defstring 0fh,7 ;
183 002F CommandOutFlag defstring 0fh,6 ;
184 002F DataOutFlag defstring 0fh,5 ;
00185 ; defstring 0fh,4 ;
00186 ; defstring 0fh,3 ;
00187 ; defstring 0fh,2 ;
00188 ; defstring 0fh,1 ;
00189 ; defstring 0fh,0
0190
0191
00192 ;==================================================================================================
00193 ;
00194 ; Constant Definition
00195 ;
00196 ;==================================================================================================
0197
00198 ;------------------------------------------------------------------------
00199 ; Normal Constant Definition
00200 ;------------------------------------------------------------------------
0201
202 0000 W equ 00h
203 0001 F equ 01h
0204
205 003C ScanInterval equ 3ch
0206
00207 ;------------------------------------------------------------------------
00208 ; For USB Constant Definition
00209 ;------------------------------------------------------------------------
0210
00211 ;--------Rc0Fifo Types Files-----------------------------------------
0212
213 0018 BmRequestType equ 18h
214 0019 BRequest equ 19h
215 001A WValue equ 1ah ;default wValue (8-bits)
216 001B WValueHi equ 1bh
217 001C WIndex equ 1ch ;default wIndex (8-bits)
218 001D WIndexHi equ 1dh
219 001E WLength equ 1eh ;default wLength (8-bits)
220 001F WLengthHi equ 1fh
0221
00222 ;--------Define BmRequestType Types Files----------------------------
0223
224 0000 HostToDevice equ 00h
225 0001 HostToInterface equ 01h
226 0002 HostToEndpoint equ 02h
227 0080 DeviceToHost equ 80h
228 0081 InterfaceToHost equ 81h
229 0082 EndpointToHost equ 82h
0230
00231 ;--------Define BRequest Types Files---------------------------------
0232
233 0000 GetStatus equ 00h
234 0001 ClearFeature equ 01h
00235 ;GetIdle equ 02h
236 0003 SetFeature equ 03h
237 0005 SetAddress equ 05h
238 0006 GetDescriptor equ 06h
239 0008 GetConfiguration equ 08h
240 0009 SetConfiguration equ 09h
241 000A GetInterface equ 0ah
242 000B SetInterface equ 0bh
0243
00244 ;--------Standard Descriptor Types-----------------------------------
0245
246 0001 Device equ 01h
247 0002 Configuration equ 02h
248 0003 String equ 03h
249 0004 Interface equ 04h
250 0005 Endpoint equ 05h
251 0021 HidClass equ 21h
252 0022 HidReport equ 22h
0253
254 0000 String0 equ 00h
255 0001 String1 equ 01h
256 0002 String2 equ 02h
257 0003 String3 equ 03h
0258
259 0000 Report1 equ 00h
260 0001 Report2 equ 01h
0261
00262 ;------------------------------------------------------------------------
00263 ; For HID Constant Definition
00264 ;------------------------------------------------------------------------
0265
00266 ;-class specific descriptor types from section 7.1 Standard Requests-
0267
268 00A1 HidGetRequest equ a1h
269 0021 HidSetRequest equ 21h
0270
00271 ;-class specific request codes from section 7.2 Class Specific Requests
0272
273 0001 GetReport equ 01h
274 0002 GetIdle equ 02h
275 0003 GetProtocol equ 03h
276 0009 SetReport equ 09h
277 000A SetIdle equ 0ah
278 000B SetProtocol equ 0bh
0279
00280 ;--------------------------------------
0281
282 0000 UnConfig equ 00h
283 0001 Config equ 01h
0284
00285 ;ReportType
286 0001 InputValue equ 01h
287 0002 OutputValue equ 02h
288 0003 FeatureValue equ 03h
0289
290 0001 StallValue equ 01h
0291
292 0000 DisableRemoteWakeup equ 00h
293 0002 EnableRemoteWakeup equ 02h
0294
295 0080 Endpoint0 equ 80h
296 0081 Endpoint1 equ 81h
297 0082 Endpoint2 equ 82h
0298
299 0000 Interface1 equ 00h
300 0001 Interface2 equ 01h
0301
302 0000 BootProtocol equ 00h
303 0001 ReportProtocol equ 01h
0304
305 0002 SystemKeyID equ 02h
0306
307 007D DefaultIdlePeriod equ 7dh
0308
309 0012 DeviceLen equ 12h
310 0004 String0Len equ 04h
311 0009 HidClass1Len equ 09h
0312
313 0009 ConfigLen defstring (String0Table-ConfigDescTable)
314 0009 String2Len defstring (EndDeviceInfoTable-String2Table)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -