📄 probe_rs232.lst
字号:
\ 000000A8 6570 STRB R5,[R4, #+1]
376 ProbeRS232_RxState = PROBE_RS232_RX_STATE_ED;
\ 000000AA 0A20 MOVS R0,#+10
\ 000000AC 2070 STRB R0,[R4, #+0]
\ 000000AE F0BD POP {R4-R7,PC}
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) {
\ ??ProbeRS232_RxHandler_18:
\ 000000B0 2F28 CMP R0,#+47
\ 000000B2 04D1 BNE.N ??ProbeRS232_RxHandler_19
384 ProbeRS232_RxPktCtr++; /* ... Increment Rx packet counter */
\ 000000B4 6069 LDR R0,[R4, #+20]
\ 000000B6 401C ADDS R0,R0,#+1
\ 000000B8 6061 STR R0,[R4, #+20]
385 ProbeRS232_RxPkt(); /* ... Parse received packet */
\ 000000BA ........ BL ProbeRS232_RxPkt
386 }
387 ProbeRS232_RxState = PROBE_RS232_RX_STATE_SD0;
\ ??ProbeRS232_RxHandler_19:
\ 000000BE 2770 STRB R7,[R4, #+0]
\ 000000C0 F0BD POP {R4-R7,PC}
388 break;
389
390
391
392
393 default:
394 ProbeRS232_RxState = PROBE_RS232_RX_STATE_SD0;
\ ??ProbeRS232_RxHandler_1:
\ 000000C2 2770 STRB R7,[R4, #+0]
395 break;
396 }
397 }
\ ??ProbeRS232_RxHandler_3:
\ 000000C4 F0BD POP {R4-R7,PC} ;; return
398
399
400 /*
401 *********************************************************************************************************
402 * Tx Handler
403 *
404 * Description: This routine is called from the transmitter buffer empty interrupt service handler.
405 * It will send out the next byte in the buffer.
406 *
407 * Argument(s): None.
408 *
409 * Returns : None
410 *********************************************************************************************************
411 */
412
\ In segment CODE, align 4, keep-with-next
413 void ProbeRS232_TxHandler (void)
414 {
\ ProbeRS232_TxHandler:
\ 00000000 70B5 PUSH {R4-R6,LR}
415 CPU_INT08U tx_data;
416
417
418 switch (ProbeRS232_TxState) {
\ 00000002 .... LDR.N R4,??DataTable4 ;; ProbeRS232_RxState
\ 00000004 6689 LDRH R6,[R4, #+10]
\ 00000006 0025 MOVS R5,#+0
\ 00000008 A078 LDRB R0,[R4, #+2]
\ 0000000A 0A28 CMP R0,#+10
\ 0000000C 00F28980 BHI.W ??ProbeRS232_TxHandler_1
\ 00000010 DFE800F0 TBB [PC, R0]
\ ??ProbeRS232_TxHandler_0:
\ 00000014 06151E27 DC8 +6,+21,+30,+39
\ 00000018 303B4851 DC8 +48,+59,+72,+81
\ 0000001C 5A717A00 DC8 +90,+113,+122,+0
419 case PROBE_RS232_TX_STATE_SD0:
420 if (ProbeRS232_TxLen > 0) { /* If packet is waiting to be sent */
\ ??ProbeRS232_TxHandler_2:
\ 00000020 002E CMP R6,#+0
\ 00000022 00F08080 BEQ.W ??ProbeRS232_TxHandler_3
421 ProbeRS232_Tx1(PROBE_RS232_PROTOCOL_TX_SD0); /* ... Transmit start first start delimiter (SD0) */
\ 00000026 7520 MOVS R0,#+117
\ 00000028 ........ _BLF ProbeRS232_Tx1,??ProbeRS232_Tx1??rT
422 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
\ 0000002C A069 LDR R0,[R4, #+24]
\ 0000002E 401C ADDS R0,R0,#+1
\ 00000030 A061 STR R0,[R4, #+24]
423 ProbeRS232_TxActiveFlag = DEF_TRUE; /* ... Transmit in process */
\ 00000032 0120 MOVS R0,#+1
\ 00000034 0100 MOVS R1,R0
\ 00000036 E170 STRB R1,[R4, #+3]
424 ProbeRS232_TxState = PROBE_RS232_TX_STATE_SD1;
\ 00000038 A070 STRB R0,[R4, #+2]
425 ProbeRS232_TxBufRdIx = 0;
\ 0000003A A581 STRH R5,[R4, #+12]
426
427 } else { /* If no packet is waiting to be sent */
428 ProbeRS232_TxActiveFlag = DEF_FALSE; /* ... Transmission not active */
429 ProbeRS232_TxIntDis(); /* ... Disable transmit interrupts */
430 }
431 break;
432
433
434 case PROBE_RS232_TX_STATE_SD1: /* Transmit start second start delimiter (SD1) */
435 ProbeRS232_Tx1(PROBE_RS232_PROTOCOL_TX_SD1);
436 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
437 ProbeRS232_TxState = PROBE_RS232_TX_STATE_SD2;
438 break;
439
440 case PROBE_RS232_TX_STATE_SD2: /* Transmit start third start delimiter (SD2) */
441 ProbeRS232_Tx1(PROBE_RS232_PROTOCOL_TX_SD2);
442 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
443 ProbeRS232_TxState = PROBE_RS232_TX_STATE_SD3;
444 break;
445
446 case PROBE_RS232_TX_STATE_SD3: /* Transmit start fourth start delimiter (SD3) */
447 ProbeRS232_Tx1(PROBE_RS232_PROTOCOL_TX_SD3);
448 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
449 ProbeRS232_TxState = PROBE_RS232_TX_STATE_LEN1;
450 break;
451
452
453 case PROBE_RS232_TX_STATE_LEN1: /* Transmit first length byte */
454 tx_data = ProbeRS232_TxLen & 0xFF;
455 ProbeRS232_Tx1(tx_data);
456 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
457 ProbeRS232_TxState = PROBE_RS232_TX_STATE_LEN2;
458 ProbeRS232_TxChkSum = tx_data;
459 break;
460
461 case PROBE_RS232_TX_STATE_LEN2: /* Transmit second length byte */
462 tx_data = ProbeRS232_TxLen >> 8;
463 ProbeRS232_Tx1(tx_data);
464 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
465 ProbeRS232_TxState = PROBE_RS232_TX_STATE_PAD1;
466 ProbeRS232_TxChkSum += tx_data;
467 break;
468
469
470 case PROBE_RS232_TX_STATE_PAD1: /* Transmit first padding byte */
471 ProbeRS232_Tx1(0);
472 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
473 ProbeRS232_TxState = PROBE_RS232_TX_STATE_PAD2;
474 break;
475
476 case PROBE_RS232_TX_STATE_PAD2: /* Transmit second padding byte */
477 ProbeRS232_Tx1(0);
478 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
479 ProbeRS232_TxState = PROBE_RS232_TX_STATE_DATA;
480 break;
481
482
483 case PROBE_RS232_TX_STATE_DATA: /* Transmit data */
484 tx_data = ProbeRS232_TxBuf[ProbeRS232_TxBufRdIx];
485 ProbeRS232_Tx1(tx_data);
486 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
487 ProbeRS232_TxChkSum += tx_data;
488 ProbeRS232_TxBufRdIx++;
489 if (ProbeRS232_TxBufRdIx >= ProbeRS232_TxLen) { /* ... If all data has been sent */
490 ProbeRS232_TxState = PROBE_RS232_TX_STATE_CHKSUM;
491 ProbeRS232_TxLen = 0;
492 }
493 break;
494
495
496 case PROBE_RS232_TX_STATE_CHKSUM: /* Transmit checksum */
497 ProbeRS232_Tx1(ProbeRS232_TxChkSum);
498 ProbeRS232_TxCtr++; /* ... Increment Tx counter */
499 ProbeRS232_TxState = PROBE_RS232_TX_STATE_ED;
500 break;
501
502
503 case PROBE_RS232_TX_STATE_ED: /* Transmit end delimiter */
504 ProbeRS232_Tx1(PROBE_RS232_PROTOCOL_TX_ED);
505 ProbeRS232_TxCtr++;
506 ProbeRS232_TxState = PROBE_RS232_TX_STATE_SD0;
507 ProbeRS232_TxBufInUse = DEF_FALSE;
508 ProbeRS232_TxPktCtr++;
509 break;
510
511
512 default:
513 ProbeRS232_TxState = PROBE_RS232_TX_STATE_SD0;
514 ProbeRS232_TxActiveFlag = DEF_FALSE;
515 ProbeRS232_TxIntDis(); /* No more data to send, disable Tx interrupts */
516 break;
517 }
518 }
\ ??ProbeRS232_TxHandler_4:
\ 0000003C 70BD POP {R4-R6,PC} ;; return
\ ??ProbeRS232_TxHandler_5:
\ 0000003E 4320 MOVS R0,#+67
\ 00000040 ........ _BLF ProbeRS232_Tx1,??ProbeRS232_Tx1??rT
\ 00000044 A069 LDR R0,[R4, #+24]
\ 00000046 401C ADDS R0,R0,#+1
\ 00000048 A061 STR R0,[R4, #+24]
\ 0000004A 0220 MOVS R0,#+2
\ 0000004C A070 STRB R0,[R4, #+2]
\ 0000004E 70BD POP {R4-R6,PC}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -