📄 3100_2interface.dat
字号:
18 08 |022D movfw Rc0Fifo0
B8 00 |022E movwf InOutBuffer0
19 08 |022F movfw Rc0Fifo1
B9 00 |0230 movwf InOutBuffer1
1A 08 |0231 movfw Rc0Fifo2
BA 00 |0232 movwf InOutBuffer2
1B 08 |0233 movfw Rc0Fifo3
BB 00 |0234 movwf InOutBuffer3
1C 08 |0235 movfw Rc0Fifo4
BC 00 |0236 movwf InOutBuffer4
1D 08 |0237 movfw Rc0Fifo5
BD 00 |0238 movwf InOutBuffer5
1E 08 |0239 movfw Rc0Fifo6
BE 00 |023A movwf InOutBuffer6
1F 08 |023B movfw Rc0Fifo7
BF 00 |023C movwf InOutBuffer7
D1 21 |023D call NoDataControl
66 22 |023E call DataOutTask
45 22 |023F call CommandTask
40 00 |0240 ret
D1 21 |0241 call NoDataControl
40 00 |0242 ret
55 13 |0243 bsf 15h,5
40 00 |0244 ret
8F 17 |0245 btfss 0fh,6
40 00 |0246 ret
8F 11 |0247 bcf 0fh,6
55 19 |0248 movlw 55h
38 02 |0249 subwf InOutBuffer0,W
83 16 |024A btfss 03h,2
40 00 |024B ret
53 19 |024C movlw 53h
39 02 |024D subwf InOutBuffer1,W
83 16 |024E btfss 03h,2
40 00 |024F ret
42 19 |0250 movlw 42h
3A 02 |0251 subwf InOutBuffer2,W
83 16 |0252 btfss 03h,2
40 00 |0253 ret
43 19 |0254 movlw 43h
3B 02 |0255 subwf InOutBuffer3,W
83 16 |0256 btfss 03h,2
40 00 |0257 ret
3D 08 |0258 movfw InOutBuffer5
B6 00 |0259 movwf ReportDataLength
01 19 |025A movlw InputValue
3E 02 |025B subwf InOutBuffer6,W
83 16 |025C btfss 03h,2
60 32 |025D goto OutputValueTest
CF 13 |025E bsf 0fh,7
40 00 |025F ret
02 19 |0260 movlw OutputValue
3E 02 |0261 subwf InOutBuffer6,W
83 16 |0262 btfss 03h,2
40 00 |0263 ret
4F 13 |0264 bsf 0fh,5
40 00 |0265 ret
4F 17 |0266 btfss 0fh,5
40 00 |0267 ret
00 19 |0268 movlw 00h
B3 00 |0269 movwf AnyCountTemp
B6 08 |026A testz ReportDataLength
83 16 |026B btfss 03h,2
6F 32 |026C goto SaveOutData
4F 11 |026D bcf 0fh,5
40 00 |026E ret
38 19 |026F movlw InOutBuffer
84 00 |0270 movwf Fsr
33 08 |0271 movfw AnyCountTemp
84 07 |0272 addwf Fsr,F
00 08 |0273 movfw Indf
AF 00 |0274 movwf UsbDataTemp
40 19 |0275 movlw DataBuffer
84 00 |0276 movwf Fsr
36 03 |0277 decf ReportDataLength,W
B6 00 |0278 movwf ReportDataLength
84 07 |0279 addwf Fsr,F
2F 08 |027A movfw UsbDataTemp
80 00 |027B movwf Indf
B3 0A |027C incf AnyCountTemp,F
08 19 |027D movlw 08h
33 02 |027E subwf AnyCountTemp,W
83 16 |027F btfss 03h,2
6F 32 |0280 goto SaveOutData
40 00 |0281 ret
09 19 |0282 movlw SetReport
19 02 |0283 subwf BRequest,W
83 14 |0284 btfsc 03h,2
95 32 |0285 goto HidSetReport
0A 19 |0286 movlw SetIdle
19 02 |0287 subwf BRequest,W
83 14 |0288 btfsc 03h,2
91 32 |0289 goto HidSetIdle
0B 19 |028A movlw SetProtocol
19 02 |028B subwf BRequest,W
83 16 |028C btfss 03h,2
A5 32 |028D goto HidSetRequestTaskError
1A 08 |028E movfw WValue
AB 00 |028F movwf HidProtocolStatus
A3 32 |0290 goto HidSetRequestTaskSend
1B 08 |0291 movfw WValueHi
AC 00 |0292 movwf IdlePeriodStatus
B0 00 |0293 movwf IdlePeriodTemp
A3 32 |0294 goto HidSetRequestTaskSend
A8 08 |0295 testz ConfigurationStatus ;ConfigurationStatus = UnConfig ?
83 14 |0296 btfsc 03h,2
A5 32 |0297 goto HidSetRequestTaskError
01 19 |0298 movlw Interface2
1C 02 |0299 subwf WIndex,W
83 16 |029A btfss 03h,2
9E 32 |029B goto CheckInterface1
8F 13 |029C bsf 0fh,6
A3 32 |029D goto HidSetRequestTaskSend
00 19 |029E movlw Interface1
1C 02 |029F subwf WIndex,W
83 16 |02A0 btfss 03h,2
A5 32 |02A1 goto HidSetRequestTaskError
4F 13 |02A2 bsf 0fh,5
D1 21 |02A3 call NoDataControl
40 00 |02A4 ret
55 13 |02A5 bsf 15h,5
40 00 |02A6 ret
CE 13 |02A7 bsf 0eh,7
D1 21 |02A8 call NoDataControl
40 00 |02A9 ret
98 08 |02AA testz BmRequestType ;BmRequestType = HostToDevice ?
83 16 |02AB btfss 03h,2
C4 32 |02AC goto SetConfigurationTaskError
9A 08 |02AD testz WValue ;WValue = Config ?
83 16 |02AE btfss 03h,2
B8 32 |02AF goto ConfigType
1A 08 |02B0 movfw WValue
A8 00 |02B1 movwf ConfigurationStatus
CC 19 |02B2 movlw cch
11 00 |02B3 movwr IntEn0
53 11 |02B4 bcf 13h,5
13 11 |02B5 bcf 13h,4
D1 21 |02B6 call NoDataControl
40 00 |02B7 ret
1A 08 |02B8 movfw WValue
A8 00 |02B9 movwf ConfigurationStatus
7D 19 |02BA movlw DefaultIdlePeriod
AC 00 |02BB movwf IdlePeriodStatus
B0 00 |02BC movwf IdlePeriodTemp
EC 19 |02BD movlw ech ;Only enable EP1
11 00 |02BE movwr IntEn0
53 13 |02BF bsf 13h,5
96 13 |02C0 bsf 16h,6
0E 12 |02C1 bsf 0eh,0
D1 21 |02C2 call NoDataControl
40 00 |02C3 ret
55 13 |02C4 bsf 15h,5
40 00 |02C5 ret
80 19 |02C6 movlw DeviceToHost
18 02 |02C7 subwf BmRequestType,W
83 14 |02C8 btfsc 03h,2
D2 32 |02C9 goto GetDescriptorType
81 19 |02CA movlw InterfaceToHost
18 02 |02CB subwf BmRequestType,W
83 14 |02CC btfsc 03h,2
D2 32 |02CD goto GetDescriptorType
82 19 |02CE movlw EndpointToHost
18 02 |02CF subwf BmRequestType,W
83 16 |02D0 btfss 03h,2
1E 33 |02D1 goto GetDescriptorTaskError
01 19 |02D2 movlw Device
1B 02 |02D3 subwf WValueHi,W
83 14 |02D4 btfsc 03h,2
E7 32 |02D5 goto DeviceType
02 19 |02D6 movlw Configuration
1B 02 |02D7 subwf WValueHi,W
83 14 |02D8 btfsc 03h,2
EB 32 |02D9 goto ConfigurationType
03 19 |02DA movlw String
1B 02 |02DB subwf WValueHi,W
83 14 |02DC btfsc 03h,2
F0 32 |02DD goto StringType
21 19 |02DE movlw HidClass
1B 02 |02DF subwf WValueHi,W
83 14 |02E0 btfsc 03h,2
03 33 |02E1 goto HidClassType
22 19 |02E2 movlw HidReport
1B 02 |02E3 subwf WValueHi,W
83 14 |02E4 btfsc 03h,2
08 33 |02E5 goto HidReportType
1E 33 |02E6 goto GetDescriptorTaskError
A5 01 |02E7 clrf TableCnt
12 19 |02E8 movlw DeviceLen
A6 00 |02E9 movwf DataLength
1B 33 |02EA goto GetDescriptorTaskSend
12 19 |02EB movlw (ConfigDescTable-DeviceDescTable)
A5 00 |02EC movwf TableCnt
3B 19 |02ED movlw (String0Table-ConfigDescTable)
A6 00 |02EE movwf DataLength
1B 33 |02EF goto GetDescriptorTaskSend
00 19 |02F0 movlw String0
1A 02 |02F1 subwf WValue,W
83 14 |02F2 btfsc 03h,2
F9 32 |02F3 goto SendString0
02 19 |02F4 movlw String2
1A 02 |02F5 subwf WValue,W
83 14 |02F6 btfsc 03h,2
FE 32 |02F7 goto SendString2
1E 33 |02F8 goto GetDescriptorTaskError
4D 19 |02F9 movlw (String0Table-DeviceDescTable)
A5 00 |02FA movwf TableCnt
04 19 |02FB movlw String0Len
A6 00 |02FC movwf DataLength
1B 33 |02FD goto GetDescriptorTaskSend
51 19 |02FE movlw (String2Table-DeviceDescTable)
A5 00 |02FF movwf TableCnt
30 19 |0300 movlw (EndDeviceInfoTable-String2Table)
A6 00 |0301 movwf DataLength
1B 33 |0302 goto GetDescriptorTaskSend
24 19 |0303 movlw (Class1DescTable-DeviceDescTable)
A5 00 |0304 movwf TableCnt
09 19 |0305 movlw HidClass1Len
A6 00 |0306 movwf DataLength
1B 33 |0307 goto GetDescriptorTaskSend
00 19 |0308 movlw Report1
1C 02 |0309 subwf WIndex,W
83 14 |030A btfsc 03h,2
11 33 |030B goto SendReport1
01 19 |030C movlw Report2
1C 02 |030D subwf WIndex,W
83 14 |030E btfsc 03h,2
16 33 |030F goto SendReport2
1E 33 |0310 goto GetDescriptorTaskError
A5 01 |0311 clrf TableCnt
29 19 |0312 movlw (Report2DescTable-Report1DescTable)
A6 00 |0313 movwf DataLength
8E 13 |0314 bsf 0eh,6
1B 33 |0315 goto GetDescriptorTaskSend
29 19 |0316 movlw (Report2DescTable-Report1DescTable)
A5 00 |0317 movwf TableCnt
17 19 |0318 movlw (EndDeviceReportTable-Report2DescTable)
A6 00 |0319 movwf DataLength
8E 13 |031A bsf 0eh,6
52 21 |031B call CheckLength
5F 21 |031C call Tx0Transfer
40 00 |031D ret
55 13 |031E bsf 15h,5
40 00 |031F ret
80 19 |0320 movlw DeviceToHost
18 02 |0321 subwf BmRequestType,W
83 16 |0322 btfss 03h,2
2A 33 |0323 goto GetConfigurationTaskError
28 08 |0324 movfw ConfigurationStatus
18 00 |0325 movwr Tx0Fifo0
C1 19 |0326 movlw c1h
95 00 |0327 movwf Tx0Reg
13 12 |0328 bsf 13h,0
40 00 |0329 ret
55 13 |032A bsf 15h,5
40 00 |032B ret
00 19 |032C movlw HostToDevice
18 02 |032D subwf BmRequestType,W
83 14 |032E btfsc 03h,2
45 33 |032F goto ClearRemoteWakeup
02 19 |0330 movlw HostToEndpoint
18 02 |0331 subwf BmRequestType,W
83 16 |0332 btfss 03h,2
4D 33 |0333 goto ClearFeatureTaskError
A8 08 |0334 testz ConfigurationStatus ;ConfigurationStatus = Config ?
83 14 |0335 btfsc 03h,2
4D 33 |0336 goto ClearFeatureTaskError
81 19 |0337 movlw Endpoint1
1C 02 |0338 subwf WIndex,W
83 14 |0339 btfsc 03h,2
42 33 |033A goto ClrEp1Stall
82 19 |033B movlw Endpoint2
1C 02 |033C subwf WIndex,W
83 16 |033D btfss 03h,2
4D 33 |033E goto ClearFeatureTaskError
AA 01 |033F clrf Endpoint2Status
57 11 |0340 bcf 17h,5
4B 33 |0341 goto ClearFeatureTaskSend
A9 01 |0342 clrf Endpoint1Status
56 11 |0343 bcf 16h,5
4B 33 |0344 goto ClearFeatureTaskSend
01 19 |0345 movlw Device
1A 02 |0346 subwf WValue,W ;This byte must be 01h
83 16 |0347 btfss 03h,2
4D 33 |0348 goto ClearFeatureTaskError
00 19 |0349 movlw DisableRemoteWakeup
A7 00 |034A movwf RemoteWakeupStatus
D1 21 |034B call NoDataControl
40 00 |034C ret
55 13 |034D bsf 15h,5
40 00 |034E ret
00 19 |034F movlw HostToDevice
18 02 |0350 subwf BmRequestType,W
83 14 |0351 btfsc 03h,2
6A 33 |0352 goto SetRemoteWakeup
02 19 |0353 movlw HostToEndpoint
18 02 |0354 subwf BmRequestType,W
83 16 |0355 btfss 03h,2
72 33 |0356 goto SetFeatureTaskError
A8 08 |0357 testz ConfigurationStatus ;ConfigurationStatus = Config ?
83 14 |0358 btfsc 03h,2
72 33 |0359 goto SetFeatureTaskError
81 19 |035A movlw Endpoint1
1C 02 |035B subwf WIndex,W
83 14 |035C btfsc 03h,2
66 33 |035D goto SetEp1Stall
82 19 |035E movlw Endpoint2
1C 02 |035F subwf WIndex,W
83 16 |0360 btfss 03h,2
72 33 |0361 goto SetFeatureTaskError
01 19 |0362 movlw StallValue
AA 00 |0363 movwf Endpoint2Status
57 13 |0364 bsf 17h,5
70 33 |0365 goto SetFeatureTaskSend
01 19 |0366 movlw StallValue
A9 00 |0367 movwf Endpoint1Status
56 13 |0368 bsf 16h,5
70 33 |0369 goto SetFeatureTaskSend
01 19 |036A movlw Device
1A 02 |036B subwf WValue,W ;This byte must be 01h
83 16 |036C btfss 03h,2
4D 33 |036D goto ClearFeatureTaskError
02 19 |036E movlw EnableRemoteWakeup
A7 00 |036F movwf RemoteWakeupStatus
D1 21 |0370 call NoDataControl
40 00 |0371 ret
55 13 |0372 bsf 15h,5
40 00 |0373 ret
80 19 |0374 movlw DeviceToHost
18 02 |0375 subwf BmRequestType,W
83 14 |0376 btfsc 03h,2
9D 33 |0377 goto GetDeviceStatus
81 19 |0378 movlw InterfaceToHost
18 02 |0379 subwf BmRequestType,W
83 14 |037A btfsc 03h,2
A2 33 |037B goto GetInterfaceStatus
82 19 |037C movlw EndpointToHost
18 02 |037D subwf BmRequestType,W
83 16 |037E btfss 03h,2
A9 33 |037F goto GetStatusTaskError
80 19 |0380 movlw Endpoint0
1C 02 |0381 subwf WIndex,W
83 14 |0382 btfsc 03h,2
99 33 |0383 goto GetEp0Status
A8 08 |0384 testz ConfigurationStatus ;ConfigurationStatus = Config ?
83 14 |0385 btfsc 03h,2
A9 33 |0386 goto GetStatusTaskError
81 19 |0387 movlw Endpoint1
1C 02 |0388 subwf WIndex,W
83 14 |0389 btfsc 03h,2
94 33 |038A goto GetEp1Status
82 19 |038B movlw Endpoint2
1C 02 |038C subwf WIndex,W
83 16 |038D btfss 03h,2
A9 33 |038E goto GetStatusTaskError
2A 08 |038F movfw Endpoint2Status
18 00 |0390 movwr Tx0Fifo0
00 19 |0391 movlw 00h
19 00 |0392 movwr Tx0Fifo1
A5 33 |0393 goto GetStatusTaskSend
29 08 |0394 movfw Endpoint1Status
18 00 |0395 movwr Tx0Fifo0
00 19 |0396 movlw 00h
19 00 |0397 movwr Tx0Fifo1
A5 33 |0398 goto GetStatusTaskSend
00 19 |0399 movlw 00h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -