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

📄 spimgr.lst

📁 用IAR开发的ZIGBEE网络路由例子
💻 LST
📖 第 1 页 / 共 4 页
字号:
    339                   SPIMgr_AppFlowControl ( SPI_MGR_ZAPP_RX_NOT_READY );
   \   00005F                ; Setup parameters for call to function SPIMgr_AppFlowControl
   \   00005F   7900         MOV     R1,#0x0
   \   000061   90....       MOV     DPTR,#(SPIMgr_AppFlowControl & 0xffff)
   \   000064   74..         MOV     A,#((SPIMgr_AppFlowControl >> 16) & 0xff)
   \   000066   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
    340          
    341                  /* 2 more bytes are added, 1 for CMD type, other for length */
    342                  msg_ptr = (osal_event_hdr_t *)osal_msg_allocate( length + sizeof(osal_event_hdr_t) );
   \   000069                ; Setup parameters for call to function osal_msg_allocate
   \   000069   7402         MOV     A,#0x2
   \   00006B   2E           ADD     A,R6
   \   00006C   FA           MOV     R2,A
   \   00006D   E4           CLR     A
   \   00006E   3F           ADDC    A,R7
   \   00006F   FB           MOV     R3,A
   \   000070   90....       MOV     DPTR,#(osal_msg_allocate & 0xffff)
   \   000073   74..         MOV     A,#((osal_msg_allocate >> 16) & 0xff)
   \   000075   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
   \   000078   8A..         MOV     ?V0 + 0,R2
   \   00007A   8B..         MOV     ?V0 + 1,R3
    343                  if ( msg_ptr )
   \   00007C   EA           MOV     A,R2
   \   00007D   7001         JNZ     ??SPIMgr_ProcessZAppData_5
   \   00007F   EB           MOV     A,R3
   \                     ??SPIMgr_ProcessZAppData_5:
   \   000080   6031         JZ      ??SPIMgr_ProcessZAppData_3
    344                  {
    345                    msg_ptr->event = SPI_INCOMING_ZAPP_DATA;
   \   000082   7422         MOV     A,#0x22
   \   000084   8A82         MOV     DPL,R2
   \   000086   8B83         MOV     DPH,R3
   \   000088   F0           MOVX    @DPTR,A
    346                    msg_ptr->status = length;
   \   000089   EE           MOV     A,R6
   \   00008A   A3           INC     DPTR
   \   00008B   F0           MOVX    @DPTR,A
    347          
    348                    /* Read the data of Rx buffer */
    349                    HalUARTRead( SPI_MGR_DEFAULT_PORT, (uint8 *)(msg_ptr + 1), length );
   \   00008C                ; Setup parameters for call to function HalUARTRead
   \   00008C   FC           MOV     R4,A
   \   00008D   EF           MOV     A,R7
   \   00008E   FD           MOV     R5,A
   \   00008F   EA           MOV     A,R2
   \   000090   2402         ADD     A,#0x2
   \   000092   0A           INC     R2
   \   000093   0A           INC     R2
   \   000094   EB           MOV     A,R3
   \   000095   3400         ADDC    A,#0x0
   \   000097   FB           MOV     R3,A
   \   000098   7901         MOV     R1,#0x1
   \   00009A   90....       MOV     DPTR,#(HalUARTRead & 0xffff)
   \   00009D   74..         MOV     A,#((HalUARTRead >> 16) & 0xff)
   \   00009F   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
    350          
    351                    /* Send the raw data to application...or where ever */
    352                    osal_msg_send( App_TaskID, (uint8 *)msg_ptr );
   \   0000A2                ; Setup parameters for call to function osal_msg_send
   \   0000A2   AA..         MOV     R2,?V0 + 0
   \   0000A4   AB..         MOV     R3,?V0 + 1
   \   0000A6   90....       MOV     DPTR,#App_TaskID
   \   0000A9   E0           MOVX    A,@DPTR
   \   0000AA   F9           MOV     R1,A
   \   0000AB   90....       MOV     DPTR,#(osal_msg_send & 0xffff)
   \   0000AE   74..         MOV     A,#((osal_msg_send >> 16) & 0xff)
   \   0000B0   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
   \                     ??SPIMgr_ProcessZAppData_3:
   \   0000B3   7F04         MOV     R7,#0x4
   \   0000B5   02....       LJMP    ?BANKED_LEAVE_XDATA
    353                  }
    354                }
    355              }
    356            }
    357          }
    358          
    359          /***************************************************************************************************
    360           * @fn      SPIMgr_ZAppBufferLengthRegister
    361           *
    362           * @brief
    363           *
    364           * @param   maxLen - Max Length that the application wants at a time
    365           *
    366           * @return  None
    367           *
    368           ***************************************************************************************************/

   \                                 In segment BANKED_CODE, align 1, keep-with-next
    369          void SPIMgr_ZAppBufferLengthRegister ( uint16 maxLen )
   \                     SPIMgr_ZAppBufferLengthRegister:
    370          {
   \   000000   C082         PUSH    DPL
   \   000002   C083         PUSH    DPH
   \   000004                ; Saved register size: 2
   \   000004                ; Auto size: 0
    371            /* If the maxLen is larger than the RX buff, something is not right */
    372            if (maxLen <= SPI_MGR_DEFAULT_MAX_RX_BUFF)
   \   000004   C3           CLR     C
   \   000005   EA           MOV     A,R2
   \   000006   9481         SUBB    A,#-0x7f
   \   000008   EB           MOV     A,R3
   \   000009   9400         SUBB    A,#0x0
   \   00000B   90....       MOV     DPTR,#SPIMgr_MaxZAppBufLen
   \   00000E   5006         JNC     ??SPIMgr_ZAppBufferLengthRegister_0
    373              SPIMgr_MaxZAppBufLen = maxLen;
   \   000010   EA           MOV     A,R2
   \   000011   F0           MOVX    @DPTR,A
   \   000012   A3           INC     DPTR
   \   000013   EB           MOV     A,R3
   \   000014   8005         SJMP    ??SPIMgr_ZAppBufferLengthRegister_1
    374            else
    375              SPIMgr_MaxZAppBufLen = 1; /* default is 1 byte */
   \                     ??SPIMgr_ZAppBufferLengthRegister_0:
   \   000016   7401         MOV     A,#0x1
   \   000018   F0           MOVX    @DPTR,A
   \   000019   A3           INC     DPTR
   \   00001A   E4           CLR     A
   \                     ??SPIMgr_ZAppBufferLengthRegister_1:
   \   00001B   02....       LJMP    ?Subroutine0 & 0xFFFF
    376          }
    377          
    378          /***************************************************************************************************
    379           * @fn      SPIMgr_AppFlowControl
    380           *
    381           * @brief
    382           *
    383           * @param   status - ready to send or not
    384           *
    385           * @return  None
    386           *
    387           ***************************************************************************************************/

   \                                 In segment BANKED_CODE, align 1, keep-with-next
    388          void SPIMgr_AppFlowControl ( bool status )
   \                     SPIMgr_AppFlowControl:
    389          {
   \   000000   C082         PUSH    DPL
   \   000002   C083         PUSH    DPH
   \   000004                ; Saved register size: 2
   \   000004                ; Auto size: 0
    390          
    391            /* Make sure only update if needed */
    392            if (status != SPIMgr_ZAppRxStatus )
   \   000004   90....       MOV     DPTR,#SPIMgr_ZAppRxStatus
   \   000007   E0           MOVX    A,@DPTR
   \   000008   69           XRL     A,R1
   \   000009   6002         JZ      ??SPIMgr_AppFlowControl_0
    393            {
    394              SPIMgr_ZAppRxStatus = status;
   \   00000B   E9           MOV     A,R1
   \   00000C   F0           MOVX    @DPTR,A
    395            }
    396          
    397            /* App is ready to read again, ProcessZAppData have to be triggered too */
    398            if (status == SPI_MGR_ZAPP_RX_READY)
   \                     ??SPIMgr_AppFlowControl_0:
   \   00000D   7401         MOV     A,#0x1
   \   00000F   69           XRL     A,R1
   \   000010   700C         JNZ     ??SPIMgr_AppFlowControl_1
    399            {
    400              SPIMgr_ProcessZAppData ( SPI_MGR_DEFAULT_PORT, HAL_UART_RX_TIMEOUT );
   \   000012                ; Setup parameters for call to function SPIMgr_ProcessZAppData
   \   000012   7A04         MOV     R2,#0x4
   \   000014   7901         MOV     R1,#0x1
   \   000016   90....       MOV     DPTR,#(SPIMgr_ProcessZAppData & 0xffff)
   \   000019   74..         MOV     A,#((SPIMgr_ProcessZAppData >> 16) & 0xff)
   \   00001B   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
    401            }
    402          
    403          }
   \                     ??SPIMgr_AppFlowControl_1:
   \   00001E   02....       LJMP    ??Subroutine0_0 & 0xFFFF
    404          
    405          #endif //ZAPP
    406          
    407          /***************************************************************************************************
    408          ***************************************************************************************************/

   Maximum stack usage in bytes:

     Function                       ISTACK PSTACK XSTACK
     --------                       ------ ------ ------
     SPIMgr_AppFlowControl              2      0     12
       -> SPIMgr_ProcessZAppData        4      0      0
     SPIMgr_CalcFCS                     0      0      9
     SPIMgr_Init                        3      0     30
       -> HalUARTOpen                   4      0     60
     SPIMgr_ProcessZAppData             3      0     12
       -> Hal_UART_RxBufLen             0      0     24
       -> SPIMgr_AppFlowControl         0      0     24
       -> osal_msg_allocate             0      0     24
       -> HalUARTRead                   0      0     24
       -> osal_msg_send                 0      0     24
     SPIMgr_RegisterTaskID              2      0      0
     SPIMgr_ZAppBufferLengthRegister
                                        2      0      0


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     App_TaskID                        1
     SPIMgr_MaxZAppBufLen              2
     SPIMgr_ZAppRxStatus               1
     SPIMgr_Init                     143
     ?Subroutine0                      8
     SPIMgr_RegisterTaskID            10
     SPIMgr_CalcFCS                   37
     SPIMgr_ProcessZAppData          184
     SPIMgr_ZAppBufferLengthRegister
                                      30
     SPIMgr_AppFlowControl            33

 
 445 bytes in segment BANKED_CODE
   4 bytes in segment XDATA_Z
 
 445 bytes of CODE  memory
   4 bytes of XDATA memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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