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

📄 mac_low_level.lst

📁 CC2431无线定位程序非常有参考价值
💻 LST
📖 第 1 页 / 共 2 页
字号:
     44          
     45          /**************************************************************************************************
     46           * @fn          macLowLevelInit
     47           *
     48           * @brief       Initialize low-level MAC.  Called only once on system power-up.
     49           *
     50           * @param       none
     51           *
     52           * @return      none
     53           **************************************************************************************************
     54           */

   \                                 In segment BANKED_CODE, align 1, keep-with-next
     55          void macLowLevelInit(void)
   \                     macLowLevelInit:
     56          {
   \   000000   C082         PUSH    DPL
   \   000002   C083         PUSH    DPH
   \   000004                ; Saved register size: 2
   \   000004                ; Auto size: 0
     57            /* initialize mcu before anything else */
     58            MAC_RADIO_MCU_INIT();
   \   000004                ; Setup parameters for call to function macMcuInit
   \   000004   90....       MOV     DPTR,#(macMcuInit & 0xffff)
   \   000007   74..         MOV     A,#((macMcuInit >> 16) & 0xff)
   \   000009   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     59          
     60            /* software initialziation */
     61            macRadioInit();
   \   00000C                ; Setup parameters for call to function macRadioInit
   \   00000C   90....       MOV     DPTR,#(macRadioInit & 0xffff)
   \   00000F   74..         MOV     A,#((macRadioInit >> 16) & 0xff)
   \   000011   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     62            macRxOnOffInit();
   \   000014                ; Setup parameters for call to function macRxOnOffInit
   \   000014   90....       MOV     DPTR,#(macRxOnOffInit & 0xffff)
   \   000017   74..         MOV     A,#((macRxOnOffInit >> 16) & 0xff)
   \   000019   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     63            macRxInit();
   \   00001C                ; Setup parameters for call to function macRxInit
   \   00001C   90....       MOV     DPTR,#(macRxInit & 0xffff)
   \   00001F   74..         MOV     A,#((macRxInit >> 16) & 0xff)
   \   000021   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     64            macTxInit();
   \   000024                ; Setup parameters for call to function macTxInit
   \   000024   90....       MOV     DPTR,#(macTxInit & 0xffff)
   \   000027   74..         MOV     A,#((macTxInit >> 16) & 0xff)
   \   000029   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     65            macBackoffTimerInit();
   \   00002C                ; Setup parameters for call to function macBackoffTimerInit
   \   00002C   90....       MOV     DPTR,#(macBackoffTimerInit & 0xffff)
   \   00002F   74..         MOV     A,#((macBackoffTimerInit >> 16) & 0xff)
   \   000031                REQUIRE ?Subroutine0
   \   000031                ; // Fall through to label ?Subroutine0
     66          }

   \                                 In segment BANKED_CODE, align 1, keep-with-next
   \                     ?Subroutine0:
   \   000000   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
   \   000003   D083         POP     DPH
   \   000005   D082         POP     DPL
   \   000007   02....       LJMP    ?BRET
     67          
     68          
     69          /**************************************************************************************************
     70           * @fn          macLowLevelReset
     71           *
     72           * @brief       Reset low-level MAC.
     73           *
     74           * @param       none
     75           *
     76           * @return      none
     77           **************************************************************************************************
     78           */

   \                                 In segment BANKED_CODE, align 1, keep-with-next
     79          void macLowLevelReset(void)
   \                     macLowLevelReset:
     80          {
   \   000000   C082         PUSH    DPL
   \   000002   C083         PUSH    DPH
   \   000004                ; Saved register size: 2
   \   000004                ; Auto size: 0
     81            MAC_ASSERT(!HAL_INTERRUPTS_ARE_ENABLED());   /* interrupts must be disabled */
   \   000004   A2AF         MOV     C,0xa8.7
   \   000006   5008         JNC     ??macLowLevelReset_0
   \   000008                ; Setup parameters for call to function halAssertHandler
   \   000008   90....       MOV     DPTR,#(halAssertHandler & 0xffff)
   \   00000B   74..         MOV     A,#((halAssertHandler >> 16) & 0xff)
   \   00000D   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     82          
     83            /* reset radio modules;  if not awake, skip this */
     84            if (macSleepState == MAC_SLEEP_STATE_AWAKE)
   \                     ??macLowLevelReset_0:
   \   000010   90....       MOV     DPTR,#macSleepState
   \   000013   E0           MOVX    A,@DPTR
   \   000014   7010         JNZ     ??macLowLevelReset_1
     85            {
     86              macRxTxReset();
   \   000016                ; Setup parameters for call to function macRxTxReset
   \   000016   90....       MOV     DPTR,#(macRxTxReset & 0xffff)
   \   000019   74..         MOV     A,#((macRxTxReset >> 16) & 0xff)
   \   00001B   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     87              macRadioReset();
   \   00001E                ; Setup parameters for call to function macRadioReset
   \   00001E   90....       MOV     DPTR,#(macRadioReset & 0xffff)
   \   000021   74..         MOV     A,#((macRadioReset >> 16) & 0xff)
   \   000023   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     88            }
     89          
     90            /* reset timer */
     91            macBackoffTimerReset();
   \                     ??macLowLevelReset_1:
   \   000026                ; Setup parameters for call to function macBackoffTimerReset
   \   000026   90....       MOV     DPTR,#(macBackoffTimerReset & 0xffff)
   \   000029   74..         MOV     A,#((macBackoffTimerReset >> 16) & 0xff)
   \   00002B   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     92          
     93            /* power up the radio */
     94            macSleepWakeUp();
   \   00002E                ; Setup parameters for call to function macSleepWakeUp
   \   00002E   90....       MOV     DPTR,#(macSleepWakeUp & 0xffff)
   \   000031   74..         MOV     A,#((macSleepWakeUp >> 16) & 0xff)
   \   000033   80..         SJMP    ?Subroutine0
     95          }

   \                                 In segment SFR_AN, at 0xa8
   \   union <unnamed> volatile __sfr _A_IEN0
   \                     _A_IEN0:
   \   000000                DS 1
     96          
     97          
     98          /**************************************************************************************************
     99          */

   Maximum stack usage in bytes:

     Function                  ISTACK PSTACK XSTACK
     --------                  ------ ------ ------
     macLowLevelInit               2      0      0
       -> macMcuInit               4      0      0
       -> macRadioInit             4      0      0
       -> macRxOnOffInit           4      0      0
       -> macRxInit                4      0      0
       -> macTxInit                4      0      0
       -> macBackoffTimerInit      4      0      0
     macLowLevelReset              2      0      0
       -> halAssertHandler         4      0      0
       -> macRxTxReset             4      0      0
       -> macRadioReset            4      0      0
       -> macBackoffTimerReset     4      0      0
       -> macSleepWakeUp           4      0      0


   Segment part sizes:

     Function/Label   Bytes
     --------------   -----
     macLowLevelInit    49
     ?Subroutine0       10
     macLowLevelReset   53
     _A_IEN0             1

 
 112 bytes in segment BANKED_CODE
   1 byte  in segment SFR_AN
 
 112 bytes of CODE memory
   0 bytes of DATA memory (+ 1 byte shared)

Errors: none
Warnings: none

⌨️ 快捷键说明

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