⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mtel.lst

📁 cc2430讀取短地址程式
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   000047   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
   \   00004A   7402         MOV     A,#0x2
   \   00004C   12....       LCALL   ?DEALLOC_XSTACK8
    337              HalUARTWrite ( SPI_MGR_DEFAULT_PORT, msg_ptr, msgLen );
   \   00004F                ; Setup parameters for call to function HalUARTWrite
   \   00004F   AC..         MOV     R4,?V0 + 2
   \   000051   7D00         MOV     R5,#0x0
   \   000053   EE           MOV     A,R6
   \   000054   FA           MOV     R2,A
   \   000055   EF           MOV     A,R7
   \   000056   FB           MOV     R3,A
   \   000057   7900         MOV     R1,#0x0
   \   000059   90....       MOV     DPTR,#(HalUARTWrite & 0xffff)
   \   00005C   74..         MOV     A,#((HalUARTWrite >> 16) & 0xff)
   \   00005E   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
    338          #endif
    339              osal_mem_free( msg_ptr );
   \   000061                ; Setup parameters for call to function osal_mem_free
   \   000061   EE           MOV     A,R6
   \   000062   FA           MOV     R2,A
   \   000063   EF           MOV     A,R7
   \   000064   FB           MOV     R3,A
   \   000065   90....       MOV     DPTR,#(osal_mem_free & 0xffff)
   \   000068   74..         MOV     A,#((osal_mem_free >> 16) & 0xff)
   \   00006A   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
    340            }
    341          }
   \                     ??MT_BuildAndSendZToolResponse_1:
   \   00006D   80..         SJMP    ??Subroutine18_0

   \                                 In segment BANKED_CODE, align 1, keep-with-next
   \                     ?Subroutine18:
   \   000000   12....       LCALL   ?DEALLOC_XSTACK8
   \                     ??Subroutine18_0:
   \   000003   7F08         MOV     R7,#0x8
   \   000005   02....       LJMP    ?BANKED_LEAVE_XDATA
    342          #endif
    343          
    344          #if defined (ZTOOL_P1) || defined (ZTOOL_P2)
    345          /*********************************************************************
    346           * @fn      MT_BuildAndSendZToolCB
    347           *
    348           * @brief
    349           *
    350           *   Build and send a ZTOOL Callback msg
    351           *
    352           * @param   len - length of data portion of the message
    353           *
    354           * @return  void
    355           */

   \                                 In segment BANKED_CODE, align 1, keep-with-next
    356          void MT_BuildAndSendZToolCB( uint16 callbackID, byte len, byte *pData )
   \                     MT_BuildAndSendZToolCB:
    357          {
   \   000000   74F0         MOV     A,#-0x10
   \   000002   12....       LCALL   ?BANKED_ENTER_XDATA
   \   000005                ; Saved register size: 16
   \   000005                ; Auto size: 0
   \   000005   EA           MOV     A,R2
   \   000006   FE           MOV     R6,A
   \   000007   EB           MOV     A,R3
   \   000008   FF           MOV     R7,A
   \   000009   89..         MOV     ?V0 + 0,R1
   \   00000B   8C..         MOV     ?V0 + 6,R4
   \   00000D   8D..         MOV     ?V0 + 7,R5
    358            byte msgLen;
    359            mtOSALSerialData_t *msgPtr;
    360            byte *msg;
    361          
    362            msgLen = sizeof ( mtOSALSerialData_t ) + SPI_0DATA_MSG_LEN + len;
    363          
    364            msgPtr = (mtOSALSerialData_t *)osal_msg_allocate( msgLen );
   \   00000F                ; Setup parameters for call to function osal_msg_allocate
   \   00000F   7409         MOV     A,#0x9
   \   000011   12....       LCALL   ?Subroutine11 & 0xFFFF
   \                     ??CrossCallReturnLabel_42:
   \   000014   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
   \   000017   8A..         MOV     ?V0 + 2,R2
   \   000019   8B..         MOV     ?V0 + 3,R3
    365            if ( msgPtr )
   \   00001B   EA           MOV     A,R2
   \   00001C   7001         JNZ     ??MT_BuildAndSendZToolCB_0
   \   00001E   EB           MOV     A,R3
   \                     ??MT_BuildAndSendZToolCB_0:
   \   00001F   606D         JZ      ??MT_BuildAndSendZToolCB_1
    366            {
    367              msgPtr->hdr.event = CB_FUNC;
   \   000021   7404         MOV     A,#0x4
   \   000023   8A82         MOV     DPL,R2
   \   000025   8B83         MOV     DPH,R3
   \   000027   F0           MOVX    @DPTR,A
    368              msgPtr->msg = (uint8 *)(msgPtr+1);
   \   000028   EA           MOV     A,R2
   \   000029   2402         ADD     A,#0x2
   \   00002B   F8           MOV     R0,A
   \   00002C   EB           MOV     A,R3
   \   00002D   3400         ADDC    A,#0x0
   \   00002F   F9           MOV     R1,A
   \   000030   EA           MOV     A,R2
   \   000031   2404         ADD     A,#0x4
   \   000033   FA           MOV     R2,A
   \   000034   EB           MOV     A,R3
   \   000035   3400         ADDC    A,#0x0
   \   000037   FB           MOV     R3,A
   \   000038   8882         MOV     DPL,R0
   \   00003A   8983         MOV     DPH,R1
   \   00003C   EA           MOV     A,R2
   \   00003D   F0           MOVX    @DPTR,A
   \   00003E   A3           INC     DPTR
   \   00003F   EB           MOV     A,R3
   \   000040   F0           MOVX    @DPTR,A
    369              msg = msgPtr->msg;
    370          
    371              //First byte is used as the event type for MT
    372              *msg++ = SOP_VALUE;
   \   000041   7402         MOV     A,#0x2
   \   000043   8A82         MOV     DPL,R2
   \   000045   8B83         MOV     DPH,R3
   \   000047   F0           MOVX    @DPTR,A
   \   000048   A3           INC     DPTR
    373              *msg++ = HI_UINT16( callbackID );
   \   000049   EF           MOV     A,R7
   \   00004A   F0           MOVX    @DPTR,A
   \   00004B   A3           INC     DPTR
    374              *msg++ = LO_UINT16( callbackID );
   \   00004C   EE           MOV     A,R6
   \   00004D   F0           MOVX    @DPTR,A
   \   00004E   A3           INC     DPTR
   \   00004F   AA82         MOV     R2,DPL
   \   000051   AB83         MOV     R3,DPH
    375              *msg++ = len;
   \   000053   E5..         MOV     A,?V0 + 0
   \   000055   F0           MOVX    @DPTR,A
    376          
    377              //Fill up the data bytes
    378              osal_memcpy( msg, pData, len );
   \   000056                ; Setup parameters for call to function osal_memcpy
   \   000056   85....       MOV     ?V0 + 4,?V0 + 6
   \   000059   85....       MOV     ?V0 + 5,?V0 + 7
   \   00005C   75..00       MOV     ?V0 + 6,#0x0
   \   00005F   78..         MOV     R0,#?V0 + 4
   \   000061   12....       LCALL   ?PUSH_XSTACK_I_THREE
   \   000064   AC..         MOV     R4,?V0 + 0
   \   000066   7D00         MOV     R5,#0x0
   \   000068   8A82         MOV     DPL,R2
   \   00006A   8B83         MOV     DPH,R3
   \   00006C   A3           INC     DPTR
   \   00006D   0A           INC     R2
   \   00006E   AB83         MOV     R3,DPH
   \   000070   90....       MOV     DPTR,#(osal_memcpy & 0xffff)
   \   000073   74..         MOV     A,#((osal_memcpy >> 16) & 0xff)
   \   000075   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
   \   000078   7403         MOV     A,#0x3
   \   00007A   12....       LCALL   ?DEALLOC_XSTACK8
    379          
    380              osal_msg_send( MT_TaskID, (uint8 *)msgPtr );
   \   00007D                ; Setup parameters for call to function osal_msg_send
   \   00007D   AA..         MOV     R2,?V0 + 2
   \   00007F   AB..         MOV     R3,?V0 + 3
   \   000081   90....       MOV     DPTR,#MT_TaskID
   \   000084   E0           MOVX    A,@DPTR
   \   000085   F9           MOV     R1,A
   \   000086   90....       MOV     DPTR,#(osal_msg_send & 0xffff)
   \   000089   74..         MOV     A,#((osal_msg_send >> 16) & 0xff)
   \   00008B   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
    381            }
    382          }
   \                     ??MT_BuildAndSendZToolCB_1:
   \   00008E   02....       LJMP    ??Subroutine18_0 & 0xFFFF

   \                                 In segment BANKED_CODE, align 1, keep-with-next
   \                     ?Subroutine11:
   \   000000   25..         ADD     A,?V0 + 0
   \   000002   FA           MOV     R2,A
   \   000003   7B00         MOV     R3,#0x0
   \   000005   90....       MOV     DPTR,#(osal_msg_allocate & 0xffff)
   \   000008   74..         MOV     A,#((osal_msg_allocate >> 16) & 0xff)
   \   00000A   22           RET
    383          #endif
    384          
    385          /*********************************************************************
    386           * @fn      MT_ProcessCommand
    387           *
    388           * @brief
    389           *
    390           *   Process Event Messages.
    391           *
    392           * @param   byte *msg - pointer to event message
    393           *
    394           * @return
    395           */

   \                                 In segment BANKED_CODE, align 1, keep-with-next
    396          void MT_ProcessCommand( mtOSALSerialData_t *msg )
   \                     MT_ProcessCommand:
    397          {
   \   000000   74F2         MOV     A,#-0xe
   \   000002   12....       LCALL   ?BANKED_ENTER_XDATA
   \   000005                ; Saved register size: 14
   \   000005                ; Auto size: 0
   \   000005   8A..         MOV     ?V0 + 0,R2
   \   000007   8B..         MOV     ?V0 + 1,R3
    398            byte deallocate;
    399          #if defined (ZTOOL_P1) || defined (ZTOOL_P2)
    400            byte *msg_ptr;
    401            byte len;
    402          
    403            // A little setup for AF, CB_FUNC and MT_SYS_APP_RSP_MSG
    404            msg_ptr = msg->msg;
   \   000009   8A82         MOV     DPL,R2
   \   00000B   8B83         MOV     DPH,R3
   \   00000D   A3           INC     DPTR
   \   00000E   A3           INC     DPTR
   \   00000F   E0           MOVX    A,@DPTR
   \   000010   FE           MOV     R6,A
   \   000011   A3           INC     DPTR
   \   000012   E0           MOVX    A,@DPTR
   \   000013   FF           MOV     R7,A
    405          #endif // ZTOOL
    406          
    407            deallocate = true;
    408          
    409            // Use the first byte of the message as the command ID
    410            switch ( msg->hdr.event )
   \   000014   8A82         MOV     DPL,R2
   \   000016   8B83         MOV     DPH,R3
   \   000018   E0           MOVX    A,@DPTR
   \   000019   12....       LCALL   ?UC_SWITCH_SPARSE
   \                     `?<Jumptable for MT_ProcessCommand>_0`:
   \   00001C   00           DB        0
   \   00001D   05           DB        5
   \   00001E   01           DB        1
   \   00001F   ....         DW        ??MT_ProcessCommand_0
   \   000021   02           DB        2
   \   000022   ....         DW        ??MT_ProcessCommand_1
   \   000024   04           DB        4
   \   000025   ....         DW        ??MT_ProcessCommand_2
   \   000027   06           DB        6
   \   000028   ....         DW        ??MT_ProcessCommand_3
   \   00002A   24           DB        36
   \   00002B   ....         DW        ??MT_ProcessCommand_4
   \   00002D   ....         DW        ??MT_ProcessCommand_5
    411            {
    412          #if defined (ZTOOL_P1) || defined (ZTOOL_P2)
    413              case CMD_SERIAL_MSG:
    414                MT_ProcessSerialCommand( msg->msg );
   \                     ??MT_ProcessCommand_0:
   \   00002F                ; Setup parameters for call to function MT_ProcessSerialCommand
   \   00002F   8A82         MOV     DPL,R2
   \   000031   8B83         MOV     DPH,R3
   \   000033   A3           INC     DPTR
   \   000034   A3           INC     DPTR
   \   000035   12....       LCALL   ??Subroutine7_0 & 0xFFFF
   \                     ??CrossCallReturnLabel_23:
   \   000038   90....       MOV     DPTR,#(MT_ProcessSerialCommand & 0xffff)
   \   00003B   74..         MOV     A,#((MT_ProcessSerialCommand >> 16) & 0xff)
   \   00003D   8070         SJMP    ??MT_ProcessCommand_6
    415                break;
    416          
    417              case CMD_DEBUG_MSG:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -