1 // *********************************************************************
    2 //                         IQRF OS functions                           *
    3 // *********************************************************************
    4 //
    5 // Online IQRF OS Reference Guide: http://www.iqrf.org/IQRF-OS-Reference-guide/
    6 //
    7 // Copyright (c) MICRORISC s.r.o.
    8 //
    9 // Intended for:
   10 //   HW: TR-72D, TR-76D, TR-77D, TR-78D, TR-75D, TR-72G, TR-76G, TR-75G, TR-82G
   11 //   OS: 4.06D, 4.06G
   12 //
   13 // File:    IQRF-functions.h
   14 // Version: v1.01                                   Revision: 05/12/2024
   15 //
   16 // Revision history:
   17 //   v1.01: 05/12/2024  The return value of the wasRFICrestarted function is different for TR-7xD and TR-7xG module lines.
   18 //   v1.00: 03/06/2022  First release for OS 4.06D and 4.06G.
   19 //
   20 // *********************************************************************
   21 
   22 #pragma optimize 0
   23 #pragma update_PAGE 0
   24 #pragma update_RP 0
   25 
   26 // Identification header for internal use only
   27 #pragma cdata[0x3800] = OS_VERSION /* OS Version */, MCU_ID /* MCU ID */, TR_FAMILY | 0x80 /*TR Family*/
   28 
   29 #define dummy_address   0x3810
   30 #pragma origin dummy_address
   31 void dummy()
   32 {
   33   #asm
   34     DW 0x2000
   35   #endasm
   36   #pragma updateBank exit=UserBank_01
   37 }
   38 
   39 #define iqrfSleep_address   0x3816
   40 #pragma origin iqrfSleep_address
   41 void iqrfSleep()
   42 {
   43   #asm
   44     DW 0x2000
   45   #endasm
   46   #pragma updateBank exit=UserBank_01
   47 }
   48 
   49 #define _debug_address  0x3819
   50 #pragma origin _debug_address
   51 void _debug()
   52 {
   53   #asm
   54     DW 0x2000
   55   #endasm
   56   #pragma updateBank exit=UserBank_01
   57 }
   58 
   59 #define debug()     \
   60     do {            \
   61         _debug();   \
   62         nop();      \
   63     } while (0)
   64 
   65 #define moduleInfo_address  0x381c
   66 #pragma origin moduleInfo_address
   67 void moduleInfo()
   68 {
   69   #asm
   70     DW 0x2000
   71   #endasm
   72   #pragma updateBank exit=UserBank_01
   73 }
   74 
   75 #define pulsingLEDR_address 0x3822
   76 #pragma origin pulsingLEDR_address
   77 void pulsingLEDR()
   78 {
   79   #asm
   80     DW 0x2000
   81   #endasm
   82   #pragma updateBank exit=UserBank_01
   83 }
   84 
   85 #define pulseLEDR_address   0x3825
   86 #pragma origin pulseLEDR_address
   87 void pulseLEDR()
   88 {
   89   #asm
   90     DW 0x2000
   91   #endasm
   92   #pragma updateBank exit=UserBank_01
   93 }
   94 
   95 #define stopLEDR_address    0x3828
   96 #pragma origin stopLEDR_address
   97 void stopLEDR()
   98 {
   99   #asm
  100     DW 0x2000
  101   #endasm
  102   #pragma updateBank exit=UserBank_01
  103 }
  104 
  105 #define pulsingLEDG_address 0x382b
  106 #pragma origin pulsingLEDG_address
  107 void pulsingLEDG()
  108 {
  109   #asm
  110     DW 0x2000
  111   #endasm
  112   #pragma updateBank exit=UserBank_01
  113 }
  114 
  115 #define pulseLEDG_address   0x382e
  116 #pragma origin pulseLEDG_address
  117 void pulseLEDG()
  118 {
  119   #asm
  120     DW 0x2000
  121   #endasm
  122   #pragma updateBank exit=UserBank_01
  123 }
  124 
  125 #define stopLEDG_address    0x3831
  126 #pragma origin stopLEDG_address
  127 void stopLEDG()
  128 {
  129   #asm
  130     DW 0x2000
  131   #endasm
  132   #pragma updateBank exit=UserBank_01
  133 }
  134 
  135 #define setOnPulsingLED_address 0x3834
  136 #pragma origin setOnPulsingLED_address
  137 void setOnPulsingLED(uns8 ticks @ W)
  138 {
  139   #asm
  140     DW 0x2000
  141   #endasm
  142   #pragma updateBank exit=UserBank_01
  143 }
  144 
  145 #define setOffPulsingLED_address    0x3837
  146 #pragma origin setOffPulsingLED_address
  147 void setOffPulsingLED(uns8 ticks @ W)
  148 {
  149   #asm
  150     DW 0x2000
  151   #endasm
  152   #pragma updateBank exit=UserBank_01
  153 }
  154 
  155 #define eeReadByte_address  0x383a
  156 #pragma origin eeReadByte_address
  157 uns8 eeReadByte(uns8 address @ W)
  158 {
  159   #asm
  160     DW 0x2000
  161   #endasm
  162   #pragma updateBank exit=UserBank_01
  163   return W;
  164 }
  165 
  166 #define eeReadData_address  0x383d
  167 #pragma origin eeReadData_address
  168 bit eeReadData(uns8 address @ param2, uns8 length @ W)
  169 {
  170   #asm
  171     DW 0x2000
  172   #endasm
  173   #pragma updateBank exit=UserBank_01
  174   return Carry;
  175 }
  176 
  177 #define eeWriteByte_address 0x3840
  178 #pragma origin eeWriteByte_address
  179 void eeWriteByte(uns8 address @ param2, uns8 data @ W)
  180 {
  181   #asm
  182     DW 0x2000
  183   #endasm
  184   #pragma updateBank exit=UserBank_01
  185 }
  186 
  187 #define eeWriteData_address 0x3843
  188 #pragma origin eeWriteData_address
  189 void eeWriteData(uns8 address @ param2, uns8 length @ W)
  190 {
  191   #asm
  192     DW 0x2000
  193   #endasm
  194   #pragma updateBank exit=UserBank_01
  195 }
  196 
  197 #define readFromRAM_address 0x3846
  198 #pragma origin readFromRAM_address
  199 uns8 readFromRAM(uns16 address @ FSR0)
  200 {
  201   #asm
  202     DW 0x2000
  203   #endasm
  204   #pragma updateBank exit=UserBank_01
  205   return W;
  206 }
  207 
  208 #define clearBufferINFO_address 0x384c
  209 #pragma origin clearBufferINFO_address
  210 void clearBufferINFO()
  211 {
  212   #asm
  213     DW 0x2000
  214   #endasm
  215   #pragma updateBank exit=UserBank_01
  216 }
  217 
  218 #define swapBufferINFO_address  0x384f
  219 #pragma origin swapBufferINFO_address
  220 void swapBufferINFO()
  221 {
  222   #asm
  223     DW 0x2000
  224   #endasm
  225   #pragma updateBank exit=UserBank_01
  226 }
  227 
  228 #define compareBufferINFO2RF_address    0x3852
  229 #pragma origin compareBufferINFO2RF_address
  230 bit compareBufferINFO2RF(uns8 length @ W)
  231 {
  232   #asm
  233     DW 0x2000
  234   #endasm
  235   #pragma updateBank exit=UserBank_01
  236   return Carry;
  237 }
  238 
  239 #define copyBufferINFO2COM_address  0x3855
  240 #pragma origin copyBufferINFO2COM_address
  241 void copyBufferINFO2COM()
  242 {
  243   #asm
  244     DW 0x2000
  245   #endasm
  246   #pragma updateBank exit=UserBank_01
  247 }
  248 
  249 #define copyBufferINFO2RF_address   0x3858
  250 #pragma origin copyBufferINFO2RF_address
  251 void copyBufferINFO2RF()
  252 {
  253   #asm
  254     DW 0x2000
  255   #endasm
  256   #pragma updateBank exit=UserBank_01
  257 }
  258 
  259 #define copyBufferRF2COM_address    0x385b
  260 #pragma origin copyBufferRF2COM_address
  261 void copyBufferRF2COM()
  262 {
  263   #asm
  264     DW 0x2000
  265   #endasm
  266   #pragma updateBank exit=UserBank_01
  267 }
  268 
  269 #define copyBufferRF2INFO_address   0x385e
  270 #pragma origin copyBufferRF2INFO_address
  271 void copyBufferRF2INFO()
  272 {
  273   #asm
  274     DW 0x2000
  275   #endasm
  276   #pragma updateBank exit=UserBank_01
  277 }
  278 
  279 #define copyBufferCOM2RF_address    0x3861
  280 #pragma origin copyBufferCOM2RF_address
  281 void copyBufferCOM2RF()
  282 {
  283   #asm
  284     DW 0x2000
  285   #endasm
  286   #pragma updateBank exit=UserBank_01
  287 }
  288 
  289 #define copyBufferCOM2INFO_address  0x3864
  290 #pragma origin copyBufferCOM2INFO_address
  291 void copyBufferCOM2INFO()
  292 {
  293   #asm
  294     DW 0x2000
  295   #endasm
  296   #pragma updateBank exit=UserBank_01
  297 }
  298 
  299 #define copyMemoryBlock_address 0x3867
  300 #pragma origin copyMemoryBlock_address
  301 void copyMemoryBlock(uns16 from @ FSR0, uns16 to @ FSR1, uns8 length @ W)
  302 {
  303   #asm
  304     DW 0x2000
  305   #endasm
  306  #pragma updateBank exit=UserBank_01
  307 }
  308 
  309 #define startDelay_address  0x386a
  310 #pragma origin startDelay_address
  311 void startDelay(uns8 ticks @ W)
  312 {
  313   #asm
  314     DW 0x2000
  315   #endasm
  316   #pragma updateBank exit=UserBank_01
  317 }
  318 
  319 #define startLongDelay_address  0x386d
  320 #pragma origin startLongDelay_address
  321 void startLongDelay(uns16 ticks @ param3)
  322 {
  323   #asm
  324     DW 0x2000
  325   #endasm
  326   #pragma updateBank exit=UserBank_01
  327 }
  328 
  329 #define isDelay_address 0x3870
  330 #pragma origin isDelay_address
  331 bit isDelay()
  332 {
  333   #asm
  334     DW 0x2000
  335   #endasm
  336   #pragma updateBank exit=UserBank_01
  337   return Carry;
  338 }
  339 
  340 #define waitDelay_address   0x3873
  341 #pragma origin waitDelay_address
  342 void waitDelay(uns8 ticks @ W)
  343 {
  344   #asm
  345     DW 0x2000
  346   #endasm
  347   #pragma updateBank exit=UserBank_01
  348 }
  349 
  350 #define waitMS_address  0x3876
  351 #pragma origin waitMS_address
  352 void waitMS(uns8 ms @ W)
  353 {
  354   #asm
  355     DW 0x2000
  356   #endasm
  357   #pragma updateBank exit=UserBank_01
  358 }
  359 
  360 #define startCapture_address    0x3879
  361 #pragma origin startCapture_address
  362 void startCapture()
  363 {
  364   #asm
  365     DW 0x2000
  366   #endasm
  367   #pragma updateBank exit=UserBank_01
  368 }
  369 
  370 #define captureTicks_address    0x387c
  371 #pragma origin captureTicks_address
  372 void captureTicks()
  373 {
  374   #asm
  375     DW 0x2000
  376   #endasm
  377   #pragma updateBank exit=UserBank_01
  378 }
  379 
  380 #define waitNewTick_address 0x3882
  381 #pragma origin waitNewTick_address
  382 void waitNewTick()
  383 {
  384   #asm
  385     DW 0x2000
  386   #endasm
  387   #pragma updateBank exit=UserBank_01
  388 }
  389 
  390 #define enableSPI_address   0x3885
  391 #pragma origin enableSPI_address
  392 void enableSPI()
  393 {
  394   #asm
  395     DW 0x2000
  396   #endasm
  397   #pragma updateBank exit=UserBank_01
  398 }
  399 
  400 #define disableSPI_address  0x3888
  401 #pragma origin disableSPI_address
  402 void disableSPI()
  403 {
  404   #asm
  405     DW 0x2000
  406   #endasm
  407   #pragma updateBank exit=UserBank_01
  408 }
  409 
  410 #define startSPI_address    0x388b
  411 #pragma origin startSPI_address
  412 void startSPI(uns8 length @ W)
  413 {
  414   #asm
  415     DW 0x2000
  416   #endasm
  417   #pragma updateBank exit=UserBank_01
  418 }
  419 
  420 #define stopSPI_address 0x388e
  421 #pragma origin stopSPI_address
  422 void stopSPI()
  423 {
  424   #asm
  425     DW 0x2000
  426   #endasm
  427   #pragma updateBank exit=UserBank_01
  428 }
  429 
  430 #define restartSPI_address  0x3891
  431 #pragma origin restartSPI_address
  432 void restartSPI()
  433 {
  434   #asm
  435     DW 0x2000
  436   #endasm
  437   #pragma updateBank exit=UserBank_01
  438 }
  439 
  440 #define getStatusSPI_address    0x3894
  441 #pragma origin getStatusSPI_address
  442 bit getStatusSPI()
  443 {
  444   #asm
  445     DW 0x2000
  446   #endasm
  447   #pragma updateBank exit=UserBank_01
  448   return Carry;
  449 }
  450 
  451 #define setRFpower_address  0x3897
  452 #pragma origin setRFpower_address
  453 void setRFpower(uns8 level @ W)
  454 {
  455   #asm
  456     DW 0x2000
  457   #endasm
  458   #pragma updateBank exit=UserBank_01
  459 }
  460 
  461 #define setLEDG_address 0x389a
  462 #pragma origin setLEDG_address
  463 void setLEDG()
  464 {
  465   #asm
  466     DW 0x2000
  467   #endasm
  468   #pragma updateBank exit=UserBank_01
  469 }
  470 
  471 #define setRFchannel_address    0x389d
  472 #pragma origin setRFchannel_address
  473 void setRFchannel(uns8 channel @ W)
  474 {
  475   #asm
  476     DW 0x2000
  477   #endasm
  478   #pragma updateBank exit=UserBank_01
  479 }
  480 
  481 #define setRFmode_address   0x38a0
  482 #pragma origin setRFmode_address
  483 void setRFmode(uns8 mode @ W)
  484 {
  485   #asm
  486     DW 0x2000
  487   #endasm
  488   #pragma updateBank exit=UserBank_01
  489 }
  490 
  491 #define setRFspeed_address  0x38a3
  492 #pragma origin setRFspeed_address
  493 void setRFspeed(uns8 speed @ W)
  494 {
  495   #asm
  496     DW 0x2000
  497   #endasm
  498   #pragma updateBank exit=UserBank_01
  499 }
  500 
  501 #define setRFsleep_address  0x38a6
  502 #pragma origin setRFsleep_address
  503 void setRFsleep()
  504 {
  505   #asm
  506     DW 0x2000
  507   #endasm
  508   #pragma updateBank exit=UserBank_01
  509 }
  510 
  511 #define setRFready_address  0x38a9
  512 #pragma origin setRFready_address
  513 void setRFready()
  514 {
  515   #asm
  516     DW 0x2000
  517   #endasm
  518   #pragma updateBank exit=UserBank_01
  519 }
  520 
  521 #define RFTXpacket_address  0x38ac
  522 #pragma origin RFTXpacket_address
  523 void RFTXpacket()
  524 {
  525   #asm
  526     DW 0x2000
  527   #endasm
  528   #pragma updateBank exit=UserBank_01
  529 }
  530 
  531 #define RFRXpacket_address  0x38af
  532 #pragma origin RFRXpacket_address
  533 bit RFRXpacket()
  534 {
  535   #asm
  536     DW 0x2000
  537   #endasm
  538   #pragma updateBank exit=UserBank_01
  539   return Carry;
  540 }
  541 
  542 #define checkRF_address 0x38b2
  543 #pragma origin checkRF_address
  544 bit checkRF(uns8 level @ W)
  545 {
  546   #asm
  547     DW 0x2000
  548   #endasm
  549   #pragma updateBank exit=UserBank_01
  550   return Carry;
  551 }
  552 
  553 #define amIBonded_address   0x38b8
  554 #pragma origin amIBonded_address
  555 bit amIBonded()
  556 {
  557   #asm
  558     DW 0x2000
  559   #endasm
  560   #pragma updateBank exit=UserBank_01
  561   return Carry;
  562 }
  563 
  564 #define removeBond_address  0x38bb
  565 #pragma origin removeBond_address
  566 void removeBond()
  567 {
  568   #asm
  569     DW 0x2000
  570   #endasm
  571   #pragma updateBank exit=UserBank_01
  572 }
  573 
  574 #define bondNewNode_address 0x38be
  575 #pragma origin bondNewNode_address
  576 bit bondNewNode(uns8 address @ W)
  577 {
  578   #asm
  579     DW 0x2000
  580   #endasm
  581   #pragma updateBank exit=UserBank_01
  582   return Carry;
  583 }
  584 
  585 #define isBondedNode_address    0x38c1
  586 #pragma origin isBondedNode_address
  587 bit isBondedNode(uns8 address @ W)
  588 {
  589   #asm
  590     DW 0x2000
  591   #endasm
  592   #pragma updateBank exit=UserBank_01
  593   return Carry;
  594 }
  595 
  596 #define removeBondedNode_address    0x38c4
  597 #pragma origin removeBondedNode_address
  598 void removeBondedNode(uns8 address @ W)
  599 {
  600   #asm
  601     DW 0x2000
  602   #endasm
  603   #pragma updateBank exit=UserBank_01
  604 }
  605 
  606 #define rebondNode_address  0x38c7
  607 #pragma origin rebondNode_address
  608 bit rebondNode(uns8 address @ W)
  609 {
  610   #asm
  611     DW 0x2000
  612   #endasm
  613   #pragma updateBank exit=UserBank_01
  614   return Carry;
  615 }
  616 
  617 #define clearAllBonds_address   0x38ca
  618 #pragma origin clearAllBonds_address
  619 void clearAllBonds()
  620 {
  621   #asm
  622     DW 0x2000
  623   #endasm
  624   #pragma updateBank exit=UserBank_01
  625 }
  626 
  627 #define setNonetMode_address    0x38cd
  628 #pragma origin setNonetMode_address
  629 void setNonetMode()
  630 {
  631   #asm
  632     DW 0x2000
  633   #endasm
  634   #pragma updateBank exit=UserBank_01
  635 }
  636 
  637 #define setCoordinatorMode_address  0x38d0
  638 #pragma origin setCoordinatorMode_address
  639 void setCoordinatorMode()
  640 {
  641   #asm
  642     DW 0x2000
  643   #endasm
  644   #pragma updateBank exit=UserBank_01
  645 }
  646 
  647 #define setNodeMode_address 0x38d3
  648 #pragma origin setNodeMode_address
  649 void setNodeMode()
  650 {
  651   #asm
  652     DW 0x2000
  653   #endasm
  654   #pragma updateBank exit=UserBank_01
  655 }
  656 
  657 #define setNetworkFilteringOn_address   0x38d6
  658 #pragma origin setNetworkFilteringOn_address
  659 void setNetworkFilteringOn()
  660 {
  661   #asm
  662     DW 0x2000
  663   #endasm
  664   #pragma updateBank exit=UserBank_01
  665 }
  666 
  667 #define setNetworkFilteringOff_address  0x38d9
  668 #pragma origin setNetworkFilteringOff_address
  669 void setNetworkFilteringOff()
  670 {
  671   #asm
  672     DW 0x2000
  673   #endasm
  674   #pragma updateBank exit=UserBank_01
  675 }
  676 
  677 #define getNetworkParams_address    0x38dc
  678 #pragma origin getNetworkParams_address
  679 uns8 getNetworkParams()
  680 {
  681   #asm
  682     DW 0x2000
  683   #endasm
  684   #pragma updateBank exit=UserBank_01
  685   return W;
  686 }
  687 
  688 #define setRoutingOn_address    0x38df
  689 #pragma origin setRoutingOn_address
  690 void setRoutingOn()
  691 {
  692   #asm
  693     DW 0x2000
  694   #endasm
  695   #pragma updateBank exit=UserBank_01
  696 }
  697 
  698 #define setRoutingOff_address   0x38e2
  699 #pragma origin setRoutingOff_address
  700 void setRoutingOff()
  701 {
  702   #asm
  703     DW 0x2000
  704   #endasm
  705   #pragma updateBank exit=UserBank_01
  706 }
  707 
  708 #define answerSystemPacket_address  0x38e8
  709 #pragma origin answerSystemPacket_address
  710 void answerSystemPacket()
  711 {
  712   #asm
  713     DW 0x2000
  714   #endasm
  715   #pragma updateBank exit=UserBank_01
  716 }
  717 
  718 #define discovery_address   0x38eb
  719 #pragma origin discovery_address
  720 uns8 discovery(uns8 MaxNodeAddress @ W)
  721 {
  722   #asm
  723     DW 0x2000
  724   #endasm
  725   #pragma updateBank exit=UserBank_01
  726   return W;
  727 }
  728 
  729 #define wasRouted_address   0x38ee
  730 #pragma origin wasRouted_address
  731 bit wasRouted()
  732 {
  733   #asm
  734     DW 0x2000
  735   #endasm
  736   #pragma updateBank exit=UserBank_01
  737   return Carry;
  738 }
  739 
  740 #define optimizeHops_address    0x38f1
  741 #pragma origin optimizeHops_address
  742 bit optimizeHops(uns8 method @ W)
  743 {
  744   #asm
  745     DW 0x2000
  746   #endasm
  747   #pragma updateBank exit=UserBank_01
  748   return Carry;
  749 }
  750 
  751 #define getSupplyVoltage_address    0x38f4
  752 #pragma origin getSupplyVoltage_address
  753 uns8 getSupplyVoltage()
  754 {
  755   #asm
  756     DW 0x2000
  757   #endasm
  758   #pragma updateBank exit=UserBank_01
  759   return W;
  760 }
  761 
  762 #define getTemperature_address  0x38f7
  763 #pragma origin getTemperature_address
  764 int8 getTemperature()
  765 {
  766   #asm
  767     DW 0x2000
  768   #endasm
  769   #pragma updateBank exit=UserBank_01
  770   return W;
  771 }
  772 
  773 #define clearBufferRF_address   0x38fa
  774 #pragma origin clearBufferRF_address
  775 void clearBufferRF()
  776 {
  777   #asm
  778     DW 0x2000
  779   #endasm
  780   #pragma updateBank exit=UserBank_01
  781 }
  782 
  783 #define isDiscoveredNode_address    0x3910
  784 #pragma origin isDiscoveredNode_address
  785 bit isDiscoveredNode(uns8 address @ W)
  786 {
  787   #asm
  788     DW 0x2000
  789   #endasm
  790   #pragma updateBank exit=UserBank_01
  791   return Carry;
  792 }
  793 
  794 #define enableRFPGM_address 0x3913
  795 #pragma origin enableRFPGM_address
  796 void enableRFPGM()
  797 {
  798   #asm
  799     DW 0x2000
  800   #endasm
  801   #pragma updateBank exit=UserBank_01
  802 }
  803 
  804 #define disableRFPGM_address    0x3916
  805 #pragma origin disableRFPGM_address
  806 void disableRFPGM()
  807 {
  808   #asm
  809     DW 0x2000
  810   #endasm
  811   #pragma updateBank exit=UserBank_01
  812 }
  813 
  814 #define setupRFPGM_address  0x3919
  815 #pragma origin setupRFPGM_address
  816 void setupRFPGM(uns8 x @ W)
  817 {
  818   #asm
  819     DW 0x2000
  820   #endasm
  821   #pragma updateBank exit=UserBank_01
  822 }
  823 
  824 #define runRFPGM_address    0x391c
  825 #pragma origin runRFPGM_address
  826 void runRFPGM()
  827 {
  828   #asm
  829     DW 0x2000
  830   #endasm
  831   #pragma updateBank exit=UserBank_01
  832 }
  833 
  834 #define iqrfDeepSleep_address   0x391f
  835 #pragma origin iqrfDeepSleep_address
  836 void iqrfDeepSleep()
  837 {
  838   #asm
  839     DW 0x2000
  840   #endasm
  841   #pragma updateBank exit=UserBank_01
  842 }
  843 
  844 #define wasRFICrestarted_address    0x3922
  845 #pragma origin wasRFICrestarted_address
  846 #if !defined( TR7xD )
  847     bit wasRFICrestarted()
  848     {
  849       #asm
  850         DW 0x2000
  851       #endasm
  852       #pragma updateBank exit=UserBank_01
  853       return Carry;
  854     }
  855 #else
  856     uns8 wasRFICrestarted()
  857     {
  858       #asm
  859         DW 0x2000
  860       #endasm
  861       #pragma updateBank exit=UserBank_01
  862       return W;
  863     }
  864 #endif
  865 
  866 #define eeeWriteData_address    0x3925
  867 #pragma origin eeeWriteData_address
  868 bit eeeWriteData(uns16 address @ param3)
  869 {
  870   #asm
  871     DW 0x2000
  872   #endasm
  873   #pragma updateBank exit=UserBank_01
  874   return Carry;
  875 }
  876 
  877 #define eeeReadData_address 0x3928
  878 #pragma origin eeeReadData_address
  879 bit eeeReadData(uns16 address @ param3)
  880 {
  881   #asm
  882     DW 0x2000
  883   #endasm
  884   #pragma updateBank exit=UserBank_01
  885   return Carry;
  886 }
  887 
  888 #define setINDF0_address    0x3931
  889 #pragma origin setINDF0_address
  890 void setINDF0(uns8 value @ W)
  891 {
  892   #asm
  893     DW 0x2000
  894   #endasm
  895   #pragma updateBank exit=UserBank_01
  896 }
  897 
  898 #define setINDF1_address    0x3934
  899 #pragma origin setINDF1_address
  900 void setINDF1(uns8 value @ W)
  901 {
  902   #asm
  903     DW 0x2000
  904   #endasm
  905   #pragma updateBank exit=UserBank_01
  906 }
  907 
  908 #define getRSSI_address 0x3937
  909 #pragma origin getRSSI_address
  910 uns8 getRSSI()
  911 {
  912   #asm
  913     DW 0x2000
  914   #endasm
  915   #pragma updateBank exit=UserBank_01
  916   return W;
  917 }
  918 
  919 #define removeBondAddress_address   0x393a
  920 #pragma origin removeBondAddress_address
  921 void removeBondAddress()
  922 {
  923   #asm
  924     DW 0x2000
  925   #endasm
  926   #pragma updateBank exit=UserBank_01
  927 }
  928 
  929 #define sendFRC_address 0x393d
  930 #pragma origin sendFRC_address
  931 uns8 sendFRC(uns8 command @ W)
  932 {
  933   #asm
  934     DW 0x2000
  935   #endasm
  936   #pragma updateBank exit=UserBank_01
  937   return W;
  938 }
  939 
  940 #define responseFRC_address 0x3940
  941 #pragma origin responseFRC_address
  942 void responseFRC()
  943 {
  944   #asm
  945     DW 0x2000
  946   #endasm
  947   #pragma updateBank exit=UserBank_01
  948 }
  949 
  950 #define bondRequestAdvanced_address 0x3943
  951 #pragma origin bondRequestAdvanced_address
  952 bit bondRequestAdvanced()
  953 {
  954   #asm
  955     DW 0x2000
  956   #endasm
  957   #pragma updateBank exit=UserBank_01
  958   return Carry;
  959 }
  960 
  961 #define prebondNodeAtNode_address   0x3946
  962 #pragma origin prebondNodeAtNode_address
  963 bit prebondNodeAtNode()
  964 {
  965   #asm
  966     DW 0x2000
  967   #endasm
  968   #pragma updateBank exit=UserBank_01
  969   return Carry;
  970 }
  971 
  972 #define nodeAuthorization_address   0x3949
  973 #pragma origin nodeAuthorization_address
  974 bit nodeAuthorization(uns8 address @ W)
  975 {
  976   #asm
  977     DW 0x2000
  978   #endasm
  979   #pragma updateBank exit=UserBank_01
  980   return Carry;
  981 }
  982 
  983 #define dummy01_address 0x394c
  984 #pragma origin dummy01_address
  985 void dummy01()
  986 {
  987   #asm
  988   DW 0x2000
  989   #endasm
  990   #pragma updateBank exit=UserBank_01
  991 }
  992 
  993 #define setAccessPassword_address   0x3958
  994 #pragma origin setAccessPassword_address
  995 void setAccessPassword()
  996 {
  997   #asm
  998     DW 0x2000
  999   #endasm
 1000   #pragma updateBank exit=UserBank_01
 1001 }
 1002 
 1003 #define setUserKey_address  0x395b
 1004 #pragma origin setUserKey_address
 1005 void setUserKey()
 1006 {
 1007   #asm
 1008     DW 0x2000
 1009   #endasm
 1010   #pragma updateBank exit=UserBank_01
 1011 }
 1012 
 1013 #define amIRecipientOfFRC_address   0x3961
 1014 #pragma origin amIRecipientOfFRC_address
 1015 bit amIRecipientOfFRC()
 1016 {
 1017   #asm
 1018     DW 0x2000
 1019   #endasm
 1020   #pragma updateBank exit=UserBank_01
 1021   return Carry;
 1022 }
 1023 
 1024 #define setLEDR_address 0x3964
 1025 #pragma origin setLEDR_address
 1026 void setLEDR()
 1027 {
 1028   #asm
 1029     DW 0x2000
 1030   #endasm
 1031   #pragma updateBank exit=UserBank_01
 1032 }
 1033 
 1034 #define encryptBufferRF_address 0x3967
 1035 #pragma origin encryptBufferRF_address
 1036 void encryptBufferRF(uns8 blocks @ W)
 1037 {
 1038   #asm
 1039     DW 0x2000
 1040   #endasm
 1041   #pragma updateBank exit=UserBank_01
 1042 }
 1043 
 1044 #define decryptBufferRF_address 0x396a
 1045 #pragma origin decryptBufferRF_address
 1046 void decryptBufferRF(uns8 blocks @ W)
 1047 {
 1048   #asm
 1049     DW 0x2000
 1050   #endasm
 1051   #pragma updateBank exit=UserBank_01
 1052 }
 1053 
 1054 #define prebondNodeAtCoordinator_address    0x396d
 1055 #pragma origin prebondNodeAtCoordinator_address
 1056 bit prebondNodeAtCoordinator(uns8 address @ W)
 1057 {
 1058   #asm
 1059     DW 0x2000
 1060   #endasm
 1061   #pragma updateBank exit=UserBank_01
 1062   return Carry;
 1063 }
 1064 
 1065 #define setFSRs_address 0x3970
 1066 #pragma origin setFSRs_address
 1067 uns8 setFSRs(uns8 fsrs @ W)
 1068 {
 1069   #asm
 1070     DW 0x2000
 1071   #endasm
 1072   #pragma updateBank exit=UserBank_01
 1073   return W;
 1074 }
 1075 
 1076 // For internal usage only
 1077 #define updateCRC16_address 0x3973
 1078 #pragma origin updateCRC16_address
 1079 void updateCRC16(uns8 value @ W)
 1080 {
 1081   #asm
 1082     DW 0x2000
 1083   #endasm
 1084   #pragma updateBank exit=UserBank_01
 1085 }
 1086 
 1087 #define smartConnect_address    0x3976
 1088 #pragma origin smartConnect_address
 1089 bit smartConnect(uns8 address @ W)
 1090 {
 1091   #asm
 1092     DW 0x2000
 1093   #endasm
 1094   #pragma updateBank exit=UserBank_01
 1095   return Carry;
 1096 }
 1097 
 1098 #define addressBitmap_address   0x3979
 1099 #pragma origin addressBitmap_address
 1100 uns8 addressBitmap(uns8 bitIndex @ W)
 1101 {
 1102   #asm
 1103     DW 0x2000
 1104   #endasm
 1105   #pragma updateBank exit=UserBank_01
 1106   return W;
 1107 }
 1108 
 1109 #define setServiceChannel_address   0x397c
 1110 #pragma origin setServiceChannel_address
 1111 bit setServiceChannel(uns8 channelNumber @ W)
 1112 {
 1113   #asm
 1114     DW 0x2000
 1115   #endasm
 1116   #pragma updateBank exit=UserBank_01
 1117   return Carry;
 1118 }
 1119 
 1120 #pragma optimize 1
 1121 #pragma update_RP 1
 1122 #pragma update_PAGE 1
 1123 #pragma origin __APPLICATION_ADDRESS