###############################################################################
#                                                                             #
# IAR 8051 C/C++ Compiler V7.30B/W32                    12/Sep/2010  21:57:30 #
# Copyright 2004-2007 IAR Systems. All rights reserved.                       #
#                                                                             #
#    Core               =  plain                                              #
#    Code model         =  banked                                             #
#    Data model         =  large                                              #
#    Calling convention =  xdata reentrant                                    #
#    Constant location  =  data                                               #
#    Dptr setup         =  1,16                                               #
#    Source file        =  C:\Texas Instruments 33\ZStack-1.4.3-1.2.1\Compone #
#                          nts\mac\low_level\srf03\mac_sleep.c                #
#    Command line       =  -f "C:\Texas Instruments                           #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\Tools\CC2430DB\f8wRouter.cf #
#                          g" (-DCPU32MHZ -DFORCE_MAC_NEAR                    #
#                          -DROOT=__near_func -DMAC_CFG_APP_PENDING_QUEUE=TRU #
#                          E -DRTR_NWK -DBLINK_LEDS "-DCONST=const __code"    #
#                          -DGENERIC=__generic) -f "C:\Texas Instruments      #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\Tools\CC2430DB\f8wConfig.cf #
#                          g" (-DSECURE=1 -DDEFAULT_CHANLIST=0x04000000       #
#                          -DZDAPP_CONFIG_PAN_ID=0x00FF                       #
#                          -DNWK_START_DELAY=100 -DEXTENDED_JOINING_RANDOM_MA #
#                          SK=0x007F -DBEACON_REQUEST_DELAY=100               #
#                          -DBEACON_REQ_DELAY_MASK=0x00FF                     #
#                          -DROUTE_EXPIRY_TIME=30 -DAPSC_ACK_WAIT_DURATION_PO #
#                          LLED=3000 -DNWK_INDIRECT_MSG_TIMEOUT=7             #
#                          -DMAX_RREQ_ENTRIES=10 -DAPSC_MAX_FRAME_RETRIES=3   #
#                          -DNWK_MAX_DATA_RETRIES=2                           #
#                          -DMAX_POLL_FAILURE_RETRIES=2 -DMAX_BCAST=9         #
#                          -DAPS_MAX_GROUPS=16 -DMAX_RTG_ENTRIES=20           #
#                          -DNWK_MAX_BINDING_ENTRIES=10                       #
#                          -DMAX_BINDING_CLUSTER_IDS=5 "-DDEFAULT_KEY={0x02,  #
#                          0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x00,    #
#                          0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0D}"         #
#                          -DRFD_RCVC_ALWAYS_ON=FALSE -DPOLL_RATE=1000        #
#                          -DQUEUED_POLL_RATE=100 -DRESPONSE_POLL_RATE=100)   #
#                          -DREJOIN_POLL_RATE=440 "C:\Texas Instruments       #
#                          33\ZStack-1.4.3-1.2.1\Components\mac\low_level\srf #
#                          03\mac_sleep.c" -D CC2430EB -D LOCATION_REFNODE    #
#                          -D xNV_RESTORE -D ZTOOL_P1 -D MT_TASK -D           #
#                          POWER_SAVING -D HAL_UART_BIG_TX_BUF=1 -D           #
#                          SPI_MGR_DEFAULT_MAX_TX_BUFF=1024 -D                #
#                          SPI_MGR_DEFAULT_OVERFLOW=1 -lC "C:\Texas           #
#                          Instruments 33\ZStack-1.4.3-1.2.1\Projects\zstack\ #
#                          Project\Location\CC2430DB\RefNode\List\" -lA       #
#                          "C:\Texas Instruments 33\ZStack-1.4.3-1.2.1\Projec #
#                          ts\zstack\Project\Location\CC2430DB\RefNode\List\" #
#                           --diag_suppress Pe001,Pa010 --diag_remark pe550   #
#                          -o "C:\Texas Instruments                           #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\RefNode\Obj\" -e                     #
#                          --require_prototypes -z9 --no_code_motion --debug  #
#                          --core=plain --dptr=16,1 --data_model=large        #
#                          --code_model=banked --calling_convention=xdata_ree #
#                          ntrant --place_constants=data --nr_virtual_regs 8  #
#                          -I "C:\Texas Instruments                           #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\" -I "C:\Texas Instruments           #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\SOURCE\" -I "C:\Texas             #
#                          Instruments 33\ZStack-1.4.3-1.2.1\Projects\zstack\ #
#                          Project\Location\CC2430DB\..\..\..\ZMAIN\TI2430DB\ #
#                          " -I "C:\Texas Instruments                         #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\MT\" -I    #
#                          "C:\Texas Instruments 33\ZStack-1.4.3-1.2.1\Projec #
#                          ts\zstack\Project\Location\CC2430DB\..\..\..\..\.. #
#                          \COMPONENTS\HAL\INCLUDE\" -I "C:\Texas             #
#                          Instruments 33\ZStack-1.4.3-1.2.1\Projects\zstack\ #
#                          Project\Location\CC2430DB\..\..\..\..\..\COMPONENT #
#                          S\HAL\TARGET\CC2430BB\" -I "C:\Texas Instruments   #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\OSAL\MCU\C #
#                          CSOC\" -I "C:\Texas Instruments                    #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\OSAL\INCLU #
#                          DE\" -I "C:\Texas Instruments                      #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\STACK\AF\" #
#                           -I "C:\Texas Instruments                          #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\STACK\NWK\ #
#                          " -I "C:\Texas Instruments                         #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\STACK\SEC\ #
#                          " -I "C:\Texas Instruments                         #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\STACK\SYS\ #
#                          " -I "C:\Texas Instruments                         #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\STACK\ZDO\ #
#                          " -I "C:\Texas Instruments                         #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\ZMAC\F8W\" #
#                           -I "C:\Texas Instruments                          #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\ZMAC\" -I  #
#                          "C:\Texas Instruments 33\ZStack-1.4.3-1.2.1\Projec #
#                          ts\zstack\Project\Location\CC2430DB\..\..\..\..\.. #
#                          \COMPONENTS\SERVICES\SADDR\" -I "C:\Texas          #
#                          Instruments 33\ZStack-1.4.3-1.2.1\Projects\zstack\ #
#                          Project\Location\CC2430DB\..\..\..\..\..\COMPONENT #
#                          S\SERVICES\SDATA\" -I "C:\Texas Instruments        #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\MAC\INCLUD #
#                          E\" -I "C:\Texas Instruments                       #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\MAC\HIGH_L #
#                          EVEL\" -I "C:\Texas Instruments                    #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\MAC\LOW_LE #
#                          VEL\SRF03\" -I "C:\Texas Instruments               #
#                          33\ZStack-1.4.3-1.2.1\Projects\zstack\Project\Loca #
#                          tion\CC2430DB\..\..\..\..\..\COMPONENTS\MAC\LOW_LE #
#                          VEL\SRF03\SINGLE_CHIP\" -I "C:\Program Files\IAR   #
#                          Systems\Embedded Workbench 4.0 Evaluation          #
#                          version\8051\INC\" -I "C:\Program Files\IAR        #
#                          Systems\Embedded Workbench 4.0 Evaluation          #
#                          version\8051\INC\CLIB\"                            #
#    List file          =  C:\Texas Instruments 33\ZStack-1.4.3-1.2.1\Project #
#                          s\zstack\Project\Location\CC2430DB\RefNode\List\ma #
#                          c_sleep.lst                                        #
#    Object file        =  C:\Texas Instruments 33\ZStack-1.4.3-1.2.1\Project #
#                          s\zstack\Project\Location\CC2430DB\RefNode\Obj\mac #
#                          _sleep.r51                                         #
#                                                                             #
#                                                                             #
###############################################################################

C:\Texas Instruments 33\ZStack-1.4.3-1.2.1\Components\mac\low_level\srf03\mac_sleep.c
      1          /**************************************************************************************************
      2            Filename:       mac_sleep.c
      3            Revised:        $Date: 2007-10-29 22:38:47 -0700 (Mon, 29 Oct 2007) $
      4            Revision:       $Revision: 15812 $
      5          
      6            Description:    Describe the purpose and contents of the file.
      7          
      8          
      9            Copyright 2006-2007 Texas Instruments Incorporated. All rights reserved.
     10          
     11            IMPORTANT: Your use of this Software is limited to those specific rights
     12            granted under the terms of a software license agreement between the user
     13            who downloaded the software, his/her employer (which must be your employer)
     14            and Texas Instruments Incorporated (the "License").  You may not use this
     15            Software unless you agree to abide by the terms of the License. The License
     16            limits your use, and you acknowledge, that the Software may not be modified,
     17            copied or distributed unless embedded on a Texas Instruments microcontroller
     18            or used solely and exclusively in conjunction with a Texas Instruments radio
     19            frequency transceiver, which is integrated into your product.  Other than for
     20            the foregoing purpose, you may not use, reproduce, copy, prepare derivative
     21            works of, modify, distribute, perform, display or sell this Software and/or
     22            its documentation for any purpose.
     23          
     24            YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
     25            PROVIDED “AS IS?WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
     26            INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
     27            NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
     28            TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
     29            NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
     30            LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
     31            INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
     32            OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
     33            OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
     34            (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
     35          
     36            Should you have any questions regarding your right to use this Software,
     37            contact Texas Instruments Incorporated at www.TI.com.
     38          **************************************************************************************************/
     39          
     40          /* ------------------------------------------------------------------------------------------------
     41           *                                          Includes
     42           * ------------------------------------------------------------------------------------------------
     43           */
     44          
     45          /* hal */
     46          #include "hal_types.h"
     47          
     48          /* exported low-level */
     49          #include "mac_low_level.h"
     50          
     51          /* low-level specific */
     52          #include "mac_sleep.h"
     53          #include "mac_radio.h"
     54          #include "mac_tx.h"
     55          #include "mac_rx.h"
     56          #include "mac_rx_onoff.h"
     57          
     58          /* target specific */
     59          #include "mac_radio_defs.h"

   \                                 In  segment SFR_AN, at 0xa8
   \   union <unnamed> volatile __sfr _A_IEN0
   \                     _A_IEN0:
   \   000000                DS 1

   \                                 In  segment SFR_AN, at 0xbe
   \   unsigned char volatile __sfr SLEEP
   \                     SLEEP:
   \   000000                DS 1

   \                                 In  segment SFR_AN, at 0xc3
   \   unsigned char volatile __sfr T2CNF
   \                     T2CNF:
   \   000000                DS 1
     60          
     61          /* debug */
     62          #include "mac_assert.h"
     63          
     64          
     65          /* ------------------------------------------------------------------------------------------------
     66           *                                         Global Variables
     67           * ------------------------------------------------------------------------------------------------
     68           */

   \                                 In  segment XDATA_I, align 1, keep-with-next
     69          uint8 macSleepState = MAC_SLEEP_STATE_RADIO_OFF;
   \                     macSleepState:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for macSleepState>`
   \   000001                REQUIRE __INIT_XDATA_I
     70          
     71          
     72          /**************************************************************************************************
     73           * @fn          macSleepWakeUp
     74           *
     75           * @brief       Wake up the radio from sleep mode.
     76           *
     77           * @param       none
     78           *
     79           * @return      none
     80           **************************************************************************************************
     81           */

   \                                 In  segment BANKED_CODE, align 1, keep-with-next
     82          void macSleepWakeUp(void)
   \                     macSleepWakeUp:
     83          {
   \   000000   C082         PUSH    DPL
   \   000002   C083         PUSH    DPH
   \   000004                ; Saved register size: 2
   \   000004                ; Auto size: 0
     84            /* don't wake up radio if it's already awake */
     85            if (macSleepState == MAC_SLEEP_STATE_AWAKE)
   \   000004   90....       MOV     DPTR,#macSleepState
   \   000007   E0           MOVX    A,@DPTR
   \   000008   602E         JZ      ??macSleepWakeUp_0
     86            {
     87              return;
     88            }
     89          
     90            /* wake up MAC timer */
     91            MAC_RADIO_TIMER_WAKE_UP();
   \   00000A   43C301       ORL     0xc3,#0x1
   \                     ??macSleepWakeUp_1:
   \   00000D   E5C3         MOV     A,0xc3
   \   00000F   A2E0         MOV     C,0xE0 /* A   */.0
   \   000011   50FA         JNC     ??macSleepWakeUp_1
     92          
     93            /* if radio was completely off, restore from that state first */
     94            if (macSleepState == MAC_SLEEP_STATE_RADIO_OFF)
   \   000013   E0           MOVX    A,@DPTR
   \   000014   6402         XRL     A,#0x2
   \   000016   700F         JNZ     ??macSleepWakeUp_2
     95            {
     96              /* turn on radio power */
     97              MAC_RADIO_TURN_ON_POWER();
   \   000018   90DF17       MOV     DPTR,#-0x20e9
   \   00001B   E0           MOVX    A,@DPTR
   \   00001C   C2E3         CLR     0xE0 /* A   */.3
   \   00001E   F0           MOVX    @DPTR,A
   \                     ??macSleepWakeUp_3:
   \   00001F   E0           MOVX    A,@DPTR
   \   000020   A2E4         MOV     C,0xE0 /* A   */.4
   \   000022   40FB         JC      ??macSleepWakeUp_3
     98          
     99              /* power-up initialization of receive logic */
    100              macRxRadioPowerUpInit();
   \   000024                ; Setup parameters for call to function macRxRadioPowerUpInit
   \   000024   12....       LCALL   ??macRxRadioPowerUpInit?relay
    101            }
    102          
    103            /* turn on the oscillator */
    104            MAC_RADIO_TURN_ON_OSC();
   \                     ??macSleepWakeUp_2:
   \   000027   E5BE         MOV     A,0xbe
   \   000029   A2E6         MOV     C,0xE0 /* A   */.6
   \   00002B   4003         JC      ??macSleepWakeUp_4
   \   00002D                ; Setup parameters for call to function halAssertHandler
   \   00002D   12....       LCALL   ??halAssertHandler?relay
    105          
    106            /* update sleep state here before requesting to turn on receiver */
    107            macSleepState = MAC_SLEEP_STATE_AWAKE;
   \                     ??macSleepWakeUp_4:
   \   000030   E4           CLR     A
   \   000031   90....       MOV     DPTR,#macSleepState
   \   000034   F0           MOVX    @DPTR,A
    108          
    109            /* turn on the receiver if enabled */
    110            macRxOnRequest();
   \   000035                ; Setup parameters for call to function macRxOnRequest
   \   000035   12....       LCALL   ??macRxOnRequest?relay
    111          }
   \                     ??macSleepWakeUp_0:
   \   000038   D083         POP     DPH
   \   00003A   D082         POP     DPL
   \   00003C   02....       LJMP    ?BRET
   \   00003F                REQUIRE SLEEP
   \   00003F                REQUIRE T2CNF
    112          
    113          
    114          /**************************************************************************************************
    115           * @fn          macSleep
    116           *
    117           * @brief       Puts radio into the selected sleep mode.
    118           *
    119           * @param       sleepState - selected sleep level, see #defines in .h file
    120           *
    121           * @return      TRUE if radio was successfully put into selected sleep mode.
    122           *              FALSE if it was not safe for radio to go to sleep.
    123           **************************************************************************************************
    124           */

   \                                 In  segment BANKED_CODE, align 1, keep-with-next
    125          uint8 macSleep(uint8 sleepState)
   \                     macSleep:
    126          {
   \   000000   74F7         MOV     A,#-0x9
   \   000002   12....       LCALL   ?BANKED_ENTER_XDATA
   \   000005                ; Saved register size: 9
   \   000005                ; Auto size: 0
   \   000005   E9           MOV     A,R1
   \   000006   FE           MOV     R6,A
    127            halIntState_t  s;
    128          
    129            /* disable interrupts until macSleepState can be set */
    130            HAL_ENTER_CRITICAL_SECTION(s);
   \   000007   A2AF         MOV     C,0xa8.7
   \   000009   E4           CLR     A
   \   00000A   92E0         MOV     0xE0 /* A   */.0,C
   \   00000C   FF           MOV     R7,A
   \   00000D   C2AF         CLR     0xa8.7
    131          
    132            /* assert checks */
    133            MAC_ASSERT(macSleepState == MAC_SLEEP_STATE_AWAKE); /* radio must be awake to put it to sleep */
   \   00000F   90....       MOV     DPTR,#macSleepState
   \   000012   E0           MOVX    A,@DPTR
   \   000013   6003         JZ      ??macSleep_0
   \   000015                ; Setup parameters for call to function halAssertHandler
   \   000015   12....       LCALL   ??halAssertHandler?relay
    134            MAC_ASSERT(macRxFilter == RX_FILTER_OFF); /* do not sleep when scanning or in promiscuous mode */
   \                     ??macSleep_0:
   \   000018   90....       MOV     DPTR,#macRxFilter
   \   00001B   E0           MOVX    A,@DPTR
   \   00001C   6003         JZ      ??macSleep_1
   \   00001E                ; Setup parameters for call to function halAssertHandler
   \   00001E   12....       LCALL   ??halAssertHandler?relay
    135          
    136            /* if either RX or TX is active or any RX enable flags are set, it's not OK to sleep */
    137            if (macRxActive || macRxOutgoingAckFlag || macTxActive || macRxEnableFlags)
   \                     ??macSleep_1:
   \   000021   90....       MOV     DPTR,#macRxActive
   \   000024   E0           MOVX    A,@DPTR
   \   000025   7012         JNZ     ??macSleep_2
   \   000027   90....       MOV     DPTR,#macRxOutgoingAckFlag
   \   00002A   E0           MOVX    A,@DPTR
   \   00002B   700C         JNZ     ??macSleep_2
   \   00002D   90....       MOV     DPTR,#macTxActive
   \   000030   E0           MOVX    A,@DPTR
   \   000031   7006         JNZ     ??macSleep_2
   \   000033   90....       MOV     DPTR,#macRxEnableFlags
   \   000036   E0           MOVX    A,@DPTR
   \   000037   6009         JZ      ??macSleep_3
    138            {
    139              HAL_EXIT_CRITICAL_SECTION(s);
   \                     ??macSleep_2:
   \   000039   EF           MOV     A,R7
   \   00003A   A2E0         MOV     C,0xE0 /* A   */.0
   \   00003C   92AF         MOV     0xa8.7,C
    140              return(FALSE);
   \   00003E   7900         MOV     R1,#0x0
   \   000040   802C         SJMP    ??macSleep_4
    141            }
    142          
    143            /* turn off the receiver */
    144            macRxOff();
   \                     ??macSleep_3:
   \   000042                ; Setup parameters for call to function macRxOff
   \   000042   12....       LCALL   ??macRxOff?relay
    145          
    146            /* update sleep state variable */
    147            macSleepState = sleepState;
   \   000045   EE           MOV     A,R6
   \   000046   90....       MOV     DPTR,#macSleepState
   \   000049   F0           MOVX    @DPTR,A
    148          
    149            /* macSleepState is now set, re-enable interrupts */
    150            HAL_EXIT_CRITICAL_SECTION(s);
   \   00004A   EF           MOV     A,R7
   \   00004B   A2E0         MOV     C,0xE0 /* A   */.0
   \   00004D   92AF         MOV     0xa8.7,C
    151          
    152            /* put MAC timer to sleep */
    153            MAC_RADIO_TIMER_SLEEP();
   \   00004F   53C3FE       ANL     0xc3,#0xfe
   \                     ??macSleep_5:
   \   000052   E5C3         MOV     A,0xc3
   \   000054   A2E0         MOV     C,0xE0 /* A   */.0
   \   000056   40FA         JC      ??macSleep_5
    154          
    155            /* put radio in selected sleep mode */
    156            if (sleepState == MAC_SLEEP_STATE_OSC_OFF)
   \   000058   7401         MOV     A,#0x1
   \   00005A   6E           XRL     A,R6
   \   00005B   600F         JZ      ??macSleep_6
    157            {
    158              MAC_RADIO_TURN_OFF_OSC();
    159            }
    160            else
    161            {
    162              MAC_ASSERT(sleepState == MAC_SLEEP_STATE_RADIO_OFF); /* unknown sleep state */
   \   00005D   7402         MOV     A,#0x2
   \   00005F   6E           XRL     A,R6
   \   000060   6003         JZ      ??macSleep_7
   \   000062                ; Setup parameters for call to function halAssertHandler
   \   000062   12....       LCALL   ??halAssertHandler?relay
    163              MAC_RADIO_TURN_OFF_POWER();
   \                     ??macSleep_7:
   \   000065   90DF17       MOV     DPTR,#-0x20e9
   \   000068   E0           MOVX    A,@DPTR
   \   000069   D2E3         SETB    0xE0 /* A   */.3
   \   00006B   F0           MOVX    @DPTR,A
    164            }
    165          
    166            /* radio successfully entered sleep mode */
    167            return(TRUE);
   \                     ??macSleep_6:
   \   00006C   7901         MOV     R1,#0x1
   \                     ??macSleep_4:
   \   00006E   7F01         MOV     R7,#0x1
   \   000070   02....       LJMP    ?BANKED_LEAVE_XDATA
   \   000073                REQUIRE _A_IEN0
   \   000073                REQUIRE T2CNF
    168          }

   \                                 In  segment XDATA_ID, align 1, keep-with-next
   \                     `?<Initializer for macSleepState>`:
   \   000000   02           DB 2

   \                                 In  segment BANK_RELAYS, align 1
   \                     ??macSleepWakeUp?relay:
   \   000000   12....       LCALL   ?BDISPATCH
   \   000003   ......       DC24    macSleepWakeUp

   \                                 In  segment BANK_RELAYS, align 1
   \                     ??macSleep?relay:
   \   000000   12....       LCALL   ?BDISPATCH
   \   000003   ......       DC24    macSleep
    169          
    170          
    171          
    172          /**************************************************************************************************
    173           *                                  Compile Time Integrity Checks
    174           **************************************************************************************************
    175           */
    176          #if ((MAC_SLEEP_STATE_AWAKE == MAC_SLEEP_STATE_OSC_OFF) ||  \
    177               (MAC_SLEEP_STATE_AWAKE == MAC_SLEEP_STATE_RADIO_OFF))
    178          #error "ERROR!  Non-unique state values."
    179          #endif
    180          
    181          
    182          /**************************************************************************************************
    183          */

   Maximum stack usage in bytes:

     Function                   ISTACK PSTACK XSTACK
     --------                   ------ ------ ------
     macSleep                       0      0      9
       -> halAssertHandler          0      0     18
       -> halAssertHandler          0      0     18
       -> macRxOff                  0      0     18
       -> halAssertHandler          0      0     18
     macSleepWakeUp                 2      0      0
       -> macRxRadioPowerUpInit     4      0      0
       -> halAssertHandler          4      0      0
       -> macRxOnRequest            4      0      0


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     _A_IEN0                           1
     SLEEP                             1
     T2CNF                             1
     macSleepState                     1
     macSleepWakeUp                   63
     macSleep                        115
     ?<Initializer for macSleepState>
                                       1
     ??macSleepWakeUp?relay            6
     ??macSleep?relay                  6

 
 178 bytes in segment BANKED_CODE
  12 bytes in segment BANK_RELAYS
   3 bytes in segment SFR_AN
   1 byte  in segment XDATA_I
   1 byte  in segment XDATA_ID
 
 191 bytes of CODE  memory
   0 bytes of DATA  memory (+ 3 bytes shared)
   1 byte  of XDATA memory

Errors: none
Warnings: none
