📄 probe_rs232.lst
字号:
\ 00000098 .... LDR.N R1,??DataTable5 ;; ProbeRS232_TxBuf
\ 0000009A 085C LDRB R0,[R1, R0]
\ 0000009C ........ _BLF ProbeRS232_Tx1,??ProbeRS232_Tx1??rT
\ 000000A0 6089 LDRH R0,[R4, #+10]
\ 000000A2 401C ADDS R0,R0,#+1
\ 000000A4 6081 STRH R0,[R4, #+10]
\ 000000A6 2189 LDRH R1,[R4, #+8]
\ 000000A8 80B2 UXTH R0,R0
\ 000000AA 8842 CMP R0,R1
\ 000000AC C8D3 BCC.N ??ProbeRS232_TxHandler_6
\ 000000AE 0920 MOVS R0,#+9
\ 000000B0 6070 STRB R0,[R4, #+1]
\ 000000B2 2581 STRH R5,[R4, #+8]
\ 000000B4 30BD POP {R4,R5,PC}
\ ??ProbeRS232_TxHandler_15:
\ 000000B6 2846 MOV R0,R5
\ 000000B8 ........ _BLF ProbeRS232_Tx1,??ProbeRS232_Tx1??rT
\ 000000BC 0A20 MOVS R0,#+10
\ 000000BE 6070 STRB R0,[R4, #+1]
\ 000000C0 30BD POP {R4,R5,PC}
\ ??ProbeRS232_TxHandler_16:
\ 000000C2 2F20 MOVS R0,#+47
\ 000000C4 ........ _BLF ProbeRS232_Tx1,??ProbeRS232_Tx1??rT
\ 000000C8 2800 MOVS R0,R5
\ 000000CA 6070 STRB R0,[R4, #+1]
\ 000000CC E570 STRB R5,[R4, #+3]
\ 000000CE 30BD POP {R4,R5,PC}
\ ??ProbeRS232_TxHandler_3:
\ 000000D0 2800 MOVS R0,R5
\ 000000D2 6070 STRB R0,[R4, #+1]
\ ??ProbeRS232_TxHandler_5:
\ 000000D4 A570 STRB R5,[R4, #+2]
\ 000000D6 ........ _BLF ProbeRS232_TxIntDis,??ProbeRS232_TxIntDis??rT
\ 000000DA 30BD POP {R4,R5,PC}
550
551
552 /*
553 *********************************************************************************************************
554 *********************************************************************************************************
555 * LOCAL FUNCTIONS
556 *********************************************************************************************************
557 *********************************************************************************************************
558 */
559
560 /*
561 *********************************************************************************************************
562 * ProbeRS232_ParseRxPkt()
563 *
564 * Description : Parse a received packet & formulate a response.
565 *
566 * Argument(s) : none.
567 *
568 * Return(s) : The number of bytes in the data segment of the packet to transmit in response.
569 *
570 * Caller(s) : ProbeRS232_Task(),
571 * ProbeRS232_RxPkt().
572 *
573 * Note(s) : none.
574 *********************************************************************************************************
575 */
576
\ In segment CODE, align 4, keep-with-next
577 static CPU_INT16U ProbeRS232_ParseRxPkt (void)
578 {
\ ProbeRS232_ParseRxPkt:
\ 00000000 00B5 PUSH {LR}
579 CPU_INT16U tx_len;
580
581
582 if (ProbeRS232_TxBufInUse == DEF_TRUE) { /* Do cmds only if Tx buffer is free. */
\ 00000002 .... LDR.N R0,??DataTable4 ;; ProbeRS232_RxState
\ 00000004 C178 LDRB R1,[R0, #+3]
\ 00000006 0129 CMP R1,#+1
\ 00000008 01D1 BNE.N ??ProbeRS232_ParseRxPkt_0
583 return (0);
\ 0000000A 0020 MOVS R0,#+0
\ 0000000C 00BD POP {PC}
584 }
585
586 ProbeRS232_TxBufInUse = DEF_TRUE;
\ ??ProbeRS232_ParseRxPkt_0:
\ 0000000E 0121 MOVS R1,#+1
\ 00000010 C170 STRB R1,[R0, #+3]
587 tx_len = ProbeCom_ParseRxPkt((void *)ProbeRS232_RxBuf,
588 (void *)ProbeRS232_TxBuf,
589 (CPU_INT16U)ProbeRS232_RxLen,
590 (CPU_INT16U)PROBE_RS232_TX_BUF_SIZE);
\ 00000012 8023 MOVS R3,#+128
\ 00000014 C288 LDRH R2,[R0, #+6]
\ 00000016 .... LDR.N R1,??DataTable5 ;; ProbeRS232_TxBuf
\ 00000018 .... LDR.N R0,??DataTable8 ;; ProbeRS232_RxBuf
\ 0000001A ........ _BLF ProbeCom_ParseRxPkt,??ProbeCom_ParseRxPkt??rT
591
592 return (tx_len);
\ 0000001E 00BD POP {PC} ;; return
593 }
594
595
596 /*
597 *********************************************************************************************************
598 * ProbeRS232_RxPkt()
599 *
600 * Description : Handle a received packet.
601 *
602 * Argument(s) : none.
603 *
604 * Return(s) : none.
605 *
606 * Caller(s) : ProbeRS232_RxHandler().
607 *
608 * Note(s) : none.
609 *********************************************************************************************************
610 */
611
\ In segment CODE, align 4, keep-with-next
612 static void ProbeRS232_RxPkt (void)
613 {
\ ProbeRS232_RxPkt:
\ 00000000 00B5 PUSH {LR}
614 #if (PROBE_RS232_PARSE_TASK == DEF_TRUE)
615 ProbeRS232_OS_Post(); /* We have a whole packet, signal task to parse it. */
\ 00000002 ........ _BLF ProbeRS232_OS_Post,??ProbeRS232_OS_Post??rT
616
617
618
619 #else
620
621
622
623 #if (CPU_CFG_CRITICAL_METHOD == CPU_CRITICAL_METHOD_STATUS_LOCAL)
624 CPU_SR cpu_sr = 0;
625 #endif
626 CPU_INT16U len;
627
628
629 len = ProbeRS232_ParseRxPkt(); /* We have a whole packet, parse it. */
630 if (len > 0) {
631 CPU_CRITICAL_ENTER();
632 ProbeRS232_TxLen = len;
633 ProbeRS232_TxStart();
634 CPU_CRITICAL_EXIT();
635 }
636 #endif
637 }
\ 00000006 00BD POP {PC} ;; return
638
639
640 /*
641 *********************************************************************************************************
642 * ProbeRS232_RxStoINT8U()
643 *
644 * Description : Store a byte in the receive buffer.
645 *
646 * Argument(s) : rx_data Byte of data to store in the buffer.
647 *
648 * Return(s) : none.
649 *
650 * Caller(s) : ProbeRS232_RxHandler().
651 *
652 * Note(s) : none.
653 *********************************************************************************************************
654 */
655
\ In segment CODE, align 4, keep-with-next
656 static void ProbeRS232_RxStoINT8U (CPU_INT08U rx_data)
657 {
658 if (ProbeRS232_RxBufWrIx < PROBE_RS232_RX_BUF_SIZE) {
\ ProbeRS232_RxStoINT8U:
\ 00000000 .... LDR.N R1,??DataTable9 ;; ProbeRS232_RxBufWrIx
\ 00000002 0A88 LDRH R2,[R1, #+0]
\ 00000004 802A CMP R2,#+128
\ 00000006 03D2 BCS.N ??ProbeRS232_RxStoINT8U_0
659 ProbeRS232_RxBuf[ProbeRS232_RxBufWrIx++] = rx_data;
\ 00000008 .... LDR.N R3,??DataTable8 ;; ProbeRS232_RxBuf
\ 0000000A 9854 STRB R0,[R3, R2]
\ 0000000C 521C ADDS R2,R2,#+1
\ 0000000E 0A80 STRH R2,[R1, #+0]
660 }
661 }
\ ??ProbeRS232_RxStoINT8U_0:
\ 00000010 7047 BX LR ;; return
662
663
664 /*
665 *********************************************************************************************************
666 * ProbeRS232_RxBufClr()
667 *
668 * Description : Clear the data segment buffer write index.
669 *
670 * Argument(s) : none.
671 *
672 * Return(s) : none.
673 *
674 * Caller(s) : ProbeRS232_RxHandler().
675 *
676 * Note(s) : none.
677 *********************************************************************************************************
678 */
679
\ In segment CODE, align 4, keep-with-next
680 static void ProbeRS232_RxBufClr (void)
681 {
682 ProbeRS232_RxBufWrIx = 0;
\ ProbeRS232_RxBufClr:
\ 00000000 .... LDR.N R0,??DataTable9 ;; ProbeRS232_RxBufWrIx
\ 00000002 0021 MOVS R1,#+0
\ 00000004 0180 STRH R1,[R0, #+0]
683 }
\ 00000006 7047 BX LR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -