📄 probe_rs232.txt
字号:
;;;321 break;
;;;322
;;;323 case PROBE_RS232_RX_STATE_SD3: /* Receive the start fourth start delimiter (SD3) */
;;;324 if (rx_data == PROBE_RS232_PROTOCOL_RX_SD3) {
;;;325 ProbeRS232_RxState = PROBE_RS232_RX_STATE_LEN1;
;;;326 } else {
;;;327 ProbeRS232_RxState = PROBE_RS232_RX_STATE_SD0;
;;;328 }
;;;329 break;
;;;330
;;;331
;;;332 case PROBE_RS232_RX_STATE_LEN1: /* Receive the first length byte */
;;;333 ProbeRS232_RxChkSum = rx_data;
;;;334 ProbeRS232_RxRemainLen = rx_data;
;;;335 ProbeRS232_RxState = PROBE_RS232_RX_STATE_LEN2;
;;;336 break;
;;;337
;;;338 case PROBE_RS232_RX_STATE_LEN2: /* Receive the second length byte */
;;;339 ProbeRS232_RxChkSum += rx_data;
;;;340 ProbeRS232_RxRemainLen |= rx_data << 8;
;;;341
;;;342 if ((ProbeRS232_RxRemainLen == 0) || (ProbeRS232_RxRemainLen > PROBE_RS232_RX_BUF_SIZE)) {
;;;343
;;;344 ProbeRS232_RxState = PROBE_RS232_RX_STATE_SD0; /* ... Cannot handle a packet of this size */
;;;345 } else {
;;;346
;;;347 ProbeRS232_RxLen = ProbeRS232_RxRemainLen;
;;;348 ProbeRS232_RxState = PROBE_RS232_RX_STATE_PAD1;
;;;349 }
;;;350 break;
;;;351
;;;352
;;;353 case PROBE_RS232_RX_STATE_PAD1: /* Receive the first padding byte */
;;;354 ProbeRS232_RxState = PROBE_RS232_RX_STATE_PAD2;
;;;355 break;
;;;356
;;;357 case PROBE_RS232_RX_STATE_PAD2: /* Receive the second padding byte */
;;;358 ProbeRS232_RxState = PROBE_RS232_RX_STATE_DATA;
;;;359 break;
;;;360
;;;361
;;;362
;;;363 case PROBE_RS232_RX_STATE_DATA: /* Receive the data */
;;;364 ProbeRS232_RxStoINT8U(rx_data);
;;;365 ProbeRS232_RxChkSum += rx_data;
;;;366 if (--ProbeRS232_RxRemainLen == 0) {
;;;367 ProbeRS232_RxState = PROBE_RS232_RX_STATE_CHKSUM;
;;;368 }
;;;369 break;
;;;370
;;;371
;;;372
;;;373
;;;374 case PROBE_RS232_RX_STATE_CHKSUM: /* Receive the checksum */
;;;375 ProbeRS232_RxChkSum += rx_data;
;;;376 ProbeRS232_RxState = PROBE_RS232_RX_STATE_ED;
;;;377 break;
;;;378
;;;379
;;;380
;;;381
;;;382 case PROBE_RS232_RX_STATE_ED: /* Receive the end delimiter */
;;;383 if (rx_data == PROBE_RS232_PROTOCOL_RX_ED) {
;;;384 ProbeRS232_RxPktCtr++; /* ... Increment Rx packet counter */
;;;385 ProbeRS232_RxPkt(); /* ... Parse received packet */
;;;386 }
;;;387 ProbeRS232_RxState = PROBE_RS232_RX_STATE_SD0;
;;;388 break;
;;;389
;;;390
;;;391
;;;392
;;;393 default:
;;;394 ProbeRS232_RxState = PROBE_RS232_RX_STATE_SD0;
;;;395 break;
;;;396 }
;;;397 }
000258 bd10 POP {r4,pc}
|L1.602|
00025a 4935 LDR r1,|L1.816|
00025c 2000 MOVS r0,#0
00025e 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
000260 bd10 POP {r4,pc}
000262 2c50 CMP r4,#0x50
000264 d103 BNE |L1.622|
000266 4932 LDR r1,|L1.816|
000268 2003 MOVS r0,#3
00026a 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
00026c bd10 POP {r4,pc}
|L1.622|
00026e 4930 LDR r1,|L1.816|
000270 2000 MOVS r0,#0
000272 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
000274 bd10 POP {r4,pc}
000276 2c72 CMP r4,#0x72
000278 d103 BNE |L1.642|
00027a 492d LDR r1,|L1.816|
00027c 2004 MOVS r0,#4
00027e 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
000280 bd10 POP {r4,pc}
|L1.642|
000282 492b LDR r1,|L1.816|
000284 2000 MOVS r0,#0
000286 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
000288 bd10 POP {r4,pc}
00028a 4835 LDR r0,|L1.864|
00028c 7004 STRB r4,[r0,#0] ; ProbeRS232_RxChkSum
00028e 4835 LDR r0,|L1.868|
000290 8004 STRH r4,[r0,#0] ; ProbeRS232_RxRemainLen
000292 4927 LDR r1,|L1.816|
000294 2005 MOVS r0,#5
000296 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
000298 bd10 POP {r4,pc}
00029a 4831 LDR r0,|L1.864|
00029c 7801 LDRB r1,[r0,#0] ; ProbeRS232_RxChkSum
00029e 4421 ADD r1,r1,r4
0002a0 7001 STRB r1,[r0,#0] ; ProbeRS232_RxChkSum
0002a2 4830 LDR r0,|L1.868|
0002a4 8801 LDRH r1,[r0,#0] ; ProbeRS232_RxRemainLen
0002a6 ea41ea41 ORR r1,r1,r4,LSL #8
0002aa 8001 STRH r1,[r0,#0] ; ProbeRS232_RxRemainLen
0002ac 8800 LDRH r0,[r0,#0] ; ProbeRS232_RxRemainLen
0002ae b108 CBZ r0,|L1.692|
0002b0 2840 CMP r0,#0x40
0002b2 d903 BLS |L1.700|
|L1.692|
0002b4 481e LDR r0,|L1.816|
0002b6 2100 MOVS r1,#0
0002b8 7001 STRB r1,[r0,#0] ; ProbeRS232_RxState
0002ba bd10 POP {r4,pc}
|L1.700|
0002bc 4925 LDR r1,|L1.852|
0002be 8008 STRH r0,[r1,#0] ; ProbeRS232_RxLen
0002c0 491b LDR r1,|L1.816|
0002c2 2006 MOVS r0,#6
0002c4 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
0002c6 bd10 POP {r4,pc}
0002c8 4919 LDR r1,|L1.816|
0002ca 2007 MOVS r0,#7
0002cc 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
0002ce bd10 POP {r4,pc}
0002d0 4917 LDR r1,|L1.816|
0002d2 2008 MOVS r0,#8
0002d4 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
|L1.726|
0002d6 bd10 POP {r4,pc}
0002d8 4620 MOV r0,r4
0002da f7fff7ff BL ProbeRS232_RxStoINT8U
0002de 4820 LDR r0,|L1.864|
0002e0 7801 LDRB r1,[r0,#0] ; ProbeRS232_RxChkSum
0002e2 4421 ADD r1,r1,r4
0002e4 7001 STRB r1,[r0,#0] ; ProbeRS232_RxChkSum
0002e6 491f LDR r1,|L1.868|
0002e8 8808 LDRH r0,[r1,#0] ; ProbeRS232_RxRemainLen
0002ea 1e40 SUBS r0,r0,#1
0002ec 0400 LSLS r0,r0,#16
0002ee 0c00 LSRS r0,r0,#16
0002f0 8008 STRH r0,[r1,#0] ; ProbeRS232_RxRemainLen
0002f2 d1f0 BNE |L1.726|
0002f4 490e LDR r1,|L1.816|
0002f6 2009 MOVS r0,#9
0002f8 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
0002fa bd10 POP {r4,pc}
0002fc 4818 LDR r0,|L1.864|
0002fe 7801 LDRB r1,[r0,#0] ; ProbeRS232_RxChkSum
000300 4421 ADD r1,r1,r4
000302 7001 STRB r1,[r0,#0] ; ProbeRS232_RxChkSum
000304 490a LDR r1,|L1.816|
000306 200a MOVS r0,#0xa
000308 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
00030a bd10 POP {r4,pc}
00030c 2c2f CMP r4,#0x2f
00030e d105 BNE |L1.796|
000310 480c LDR r0,|L1.836|
000312 6841 LDR r1,[r0,#4] ; ProbeRS232_RxPktCtr
000314 1c49 ADDS r1,r1,#1
000316 6041 STR r1,[r0,#4] ; ProbeRS232_RxPktCtr
000318 f7fff7ff BL ProbeRS232_RxPkt
|L1.796|
00031c 4904 LDR r1,|L1.816|
00031e 2000 MOVS r0,#0
000320 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
000322 bd10 POP {r4,pc}
000324 e7ff B |L1.806|
|L1.806|
000326 4902 LDR r1,|L1.816|
000328 2000 MOVS r0,#0
00032a 7008 STRB r0,[r1,#0] ; ProbeRS232_RxState
00032c bd10 POP {r4,pc}
;;;398
ENDP
00032e 0000 DCW 0x0000
|L1.816|
000330 00000000 DCD ProbeRS232_RxState
|L1.820|
000334 00000000 DCD ProbeRS232_TxState
|L1.824|
000338 00000000 DCD ProbeRS232_TxLen
|L1.828|
00033c 00000000 DCD ProbeRS232_TxActiveFlag
|L1.832|
000340 00000000 DCD ProbeRS232_TxBufInUse
|L1.836|
000344 00000000 DCD ||.data||
|L1.840|
000348 00000000 DCD ProbeRS232_TxBufRdIx
|L1.844|
00034c 00000000 DCD ProbeRS232_TxChkSum
|L1.848|
000350 00000000 DCD ProbeRS232_TxBuf
|L1.852|
000354 00000000 DCD ProbeRS232_RxLen
|L1.856|
000358 00000000 DCD ProbeRS232_RxBuf
|L1.860|
00035c 00000000 DCD ProbeRS232_RxBufWrIx
|L1.864|
000360 00000000 DCD ProbeRS232_RxChkSum
|L1.868|
000364 00000000 DCD ProbeRS232_RxRemainLen
AREA ||.data||, DATA, ALIGN=2
ProbeRS232_RxCtr
000000 00000000 DCD 0x00000000
ProbeRS232_RxPktCtr
000004 00000000 DCD 0x00000000
ProbeRS232_TxCtr
000008 00000000 DCD 0x00000000
ProbeRS232_TxPktCtr
00000c 00000000 DCD 0x00000000
ProbeRS232_RxState
000010 00 DCB 0x00
ProbeRS232_RxChkSum
000011 00 DCB 0x00
ProbeRS232_TxState
000012 00 DCB 0x00
ProbeRS232_TxActiveFlag
000013 00 DCB 0x00
ProbeRS232_TxChkSum
000014 00 DCB 0x00
ProbeRS232_TxBufInUse
000015 00 DCB 0x00
ProbeRS232_RxRemainLen
000016 0000 DCB 0x00,0x00
ProbeRS232_RxLen
000018 0000 DCB 0x00,0x00
ProbeRS232_RxBufWrIx
00001a 0000 DCB 0x00,0x00
ProbeRS232_TxLen
00001c 0000 DCB 0x00,0x00
ProbeRS232_TxBufRdIx
00001e 0000 DCB 0x00,0x00
AREA ||.bss||, DATA, NOINIT, ALIGN=0
ProbeRS232_RxBuf
% 64
ProbeRS232_TxBuf
% 64
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -