LCDView.lst
上传用户:xhjmsc
上传日期:2019-09-13
资源大小:389k
文件大小:21k
源码类别:

传真(Fax)编程

开发平台:

C/C++

  1. ##############################################################################
  2. #                                                                            #
  3. # IAR MSP430 C/EC++ Compiler V2.10A/W32                23/Apr/2007  18:04:06 #
  4. # Copyright 1996-2003 IAR Systems. All rights reserved.                      #
  5. #                                                                            #
  6. #    __rt_version  =  1                                                      #
  7. #    __double_size =  32                                                     #
  8. #    __reg_r4      =  free                                                   #
  9. #    __reg_r5      =  free                                                   #
  10. #    __pic         =  no                                                     #
  11. #    Source file   =  E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  12. #                     filesLCDView.c                                        #
  13. #    Command line  =  -I "C:Program FilesIAR SystemsEmbedded Workbench    #
  14. #                     3.2430INC" -I "C:Program FilesIAR                 #
  15. #                     SystemsEmbedded Workbench 3.2430INCCLIB" -lCN     #
  16. #                     E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  17. #                     DebugList -lA E:projectFaxProgramVson_Bryan_Fax_ #
  18. #                     Conexant_070423DebugList -o                         #
  19. #                     E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  20. #                     DebugObj -z2 --no_cse --no_unroll --no_inline        #
  21. #                     --no_code_motion --debug -e                            #
  22. #                     E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  23. #                     filesLCDView.c                                        #
  24. #    List file     =  E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  25. #                     DebugListLCDView.lst                                 #
  26. #    Object file   =  E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  27. #                     DebugObjLCDView.r43                                  #
  28. #                                                                            #
  29. #                                                                            #
  30. ##############################################################################
  31. E:projectFaxProgramVson_Bryan_Fax_Conexant_070423filesLCDView.c
  32.       1          //LCD View
  33.       2          //new  Apr. 06, 2007
  34.       3          //Author bryan
  35.       4          
  36.       5          #include "includeH.h"
  37.                                     In segment DATA16_AN, at 0x1c
  38.       unsigned char const volatile __data P4IN
  39.                         P4IN:
  40.       000000                        DS8 1
  41.                                     In segment DATA16_AN, at 0x1d
  42.       unsigned char volatile __data P4OUT
  43.                         P4OUT:
  44.       000000                        DS8 1
  45.       6          
  46.       7          
  47.       8          
  48.                                     In segment CODE, align 2, keep-with-next
  49.       9          void ViewCommunicationTX(unsigned char ViewTimeControlWord)
  50.                         ViewCommunicationTX:
  51.      10          {
  52.       000000   0A12                 PUSH.W  R10
  53.       000002   0B12                 PUSH.W  R11
  54.       000004   4A4C                 MOV.B   R12, R10
  55.      11               unsigned char ucGeneralCnt = 0;
  56.       000006   4B43                 MOV.B   #0x0, R11
  57.      12               /*
  58.      13                unsigned char ucYear=0xa1;
  59.      14               unsigned char ucMonth=0xa2;
  60.      15               unsigned char ucDate=0xa3;
  61.      16                unsigned char ucHour=0xa4;
  62.      17                unsigned char ucMinute=0xa5;
  63.      18                unsigned char ucSecond=0xa6;
  64.      19                unsigned char ucRingNum=0xa7;
  65.      20                unsigned char ucIcon0=0xa8;
  66.      21                unsigned char ucIcon1=0xa9;
  67.      22                unsigned char ucIcon2=0xa0;
  68.      23               */
  69.      24                __disable_interrupt();
  70.       000008   32C2                 DINT
  71.      25            VIEW_PORT_OUT &= ~bitVIEWCLK;
  72.       00000A   E2C31D00             BIC.B   #0x2, &0x1d
  73.      26            while ((VIEW_PORT_IN & bitVIEWDATASI) == bitVIEWDATASI)//wait Low
  74.                         ??ViewCommunicationTX_0:
  75.       00000E   D2B31C00             BIT.B   #0x1, &0x1c
  76.       000012   1528                 JNC     ??ViewCommunicationTX_2
  77.      27               {  
  78.      28                if (gwTimeOverflowCount++ == 0xffff)
  79.       000014   1E42....             MOV.W   &gwTimeOverflowCount, R14
  80.       000018   1F43                 MOV.W   #0x1, R15
  81.       00001A   0F5E                 ADD.W   R14, R15
  82.       00001C   824F....             MOV.W   R15, &gwTimeOverflowCount
  83.       000020   3E93                 CMP.W   #0xffff, R14
  84.       000022   0220                 JNE     ??ViewCommunicationTX_3
  85.      29                      gucTimeOverflowCount++;
  86.       000024   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  87.      30                  if (gucTimeOverflowCount == 10)
  88.                         ??ViewCommunicationTX_3:
  89.       000028   F2900A00....         CMP.B   #0xa, &gucTimeOverflowCount
  90.       00002E   EF23                 JNE     ??ViewCommunicationTX_0
  91.      31                      {gucGeneralStatus &= ~bitSendFaxSignalOK;gucTimeOverflowCount=0;gwTimeOverflowCount=0;break;}
  92.       000030   F2C01000....         BIC.B   #0x10, &gucGeneralStatus
  93.       000036   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  94.       00003A   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  95.      32               } 
  96.      33            if ((VIEW_PORT_IN & bitVIEWDATASI) != bitVIEWDATASI)
  97.                         ??ViewCommunicationTX_2:
  98.       00003E   D2B31C00             BIT.B   #0x1, &0x1c
  99.       000042   182C                 JC      ??ViewCommunicationTX_4
  100.      34             {
  101.      35                SendOneViewData(ViewTimeControlWord);//00 10Bytes is effect
  102.       000044   4C4A                 MOV.B   R10, R12
  103.       000046   B012....             CALL    #SendOneViewData
  104.      36                                                     //01 4Bytes is effect RingNum Icon2-1
  105.      37                
  106.      38                 /*
  107.      39                 SendOneViewData(gucHour);
  108.      40                 SendOneViewData(gucMinute);
  109.      41                 SendOneViewData(gucSecond);
  110.      42                 SendOneViewData(gucMonth);
  111.      43                 SendOneViewData(gucDate);
  112.      44                 SendOneViewData(gucYear);
  113.      45                 SendOneViewData(gucViewRingNum);
  114.      46                 SendOneViewData(gucViewStaticStatus);
  115.      47                 SendOneViewData(gucViewDynamicStatus);
  116.      48                 SendOneViewData(gucIcon2);
  117.      49                 */
  118.      50                 for (ucGeneralCnt=0; ucGeneralCnt<10; ucGeneralCnt++)
  119.       00004A   4B43                 MOV.B   #0x0, R11
  120.                         ??ViewCommunicationTX_1:
  121.       00004C   7B900A00             CMP.B   #0xa, R11
  122.       000050   092C                 JC      ??ViewCommunicationTX_5
  123.      51                 {
  124.      52                     SendOneViewData(aucViewData[ucGeneralCnt]);
  125.       000052   4E4B                 MOV.B   R11, R14
  126.       000054   3EF0FF00             AND.W   #0xff, R14
  127.       000058   5C4E....             MOV.B   aucViewData(R14), R12
  128.       00005C   B012....             CALL    #SendOneViewData
  129.      53                 }
  130.       000060   5B53                 ADD.B   #0x1, R11
  131.       000062   F43F                 JMP     ??ViewCommunicationTX_1
  132.      54                 
  133.      55                 delay1us(50);
  134.                         ??ViewCommunicationTX_5:
  135.       000064   3C403200             MOV.W   #0x32, R12
  136.       000068   B012....             CALL    #delay1us
  137.      56                 VIEW_PORT_OUT |= bitVIEWCLK;
  138.       00006C   E2D31D00             BIS.B   #0x2, &0x1d
  139.      57                 VIEW_PORT_OUT |= bitVIEWDATASO;
  140.       000070   E2D21D00             BIS.B   #0x4, &0x1d
  141.      58             }
  142.      59            _EINT();
  143.                         ??ViewCommunicationTX_4:
  144.       000074   32D2                 EINT
  145.      60          }
  146.       000076   3B41                 POP.W   R11
  147.       000078   3A41                 POP.W   R10
  148.       00007A   3041                 RET
  149.      61          
  150.                                     In segment CODE, align 2, keep-with-next
  151.      62          void ViewCommunicationRX(void)
  152.                         ViewCommunicationRX:
  153.      63          {
  154.       000000   0A12                 PUSH.W  R10
  155.       000002   0B12                 PUSH.W  R11
  156.      64            unsigned char ucGeneralCnt = 0;   
  157.       000004   4A43                 MOV.B   #0x0, R10
  158.      65            __disable_interrupt();
  159.       000006   32C2                 DINT
  160.      66            while ((VIEW_PORT_IN & bitVIEWDATASI) != bitVIEWDATASI)//wait Low
  161.                         ??ViewCommunicationRX_0:
  162.       000008   D2B31C00             BIT.B   #0x1, &0x1c
  163.       00000C   152C                 JC      ??ViewCommunicationRX_3
  164.      67               {  
  165.      68                //if ((gucGeneralStatus & bitModemActive) == bitModemActive)
  166.      69                  //break;
  167.      70                if (gwTimeOverflowCount++ == 0xffff)
  168.       00000E   1E42....             MOV.W   &gwTimeOverflowCount, R14
  169.       000012   1F43                 MOV.W   #0x1, R15
  170.       000014   0F5E                 ADD.W   R14, R15
  171.       000016   824F....             MOV.W   R15, &gwTimeOverflowCount
  172.       00001A   3E93                 CMP.W   #0xffff, R14
  173.       00001C   0220                 JNE     ??ViewCommunicationRX_4
  174.      71                      gucTimeOverflowCount++;
  175.       00001E   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  176.      72                  if (gucTimeOverflowCount == 10)
  177.                         ??ViewCommunicationRX_4:
  178.       000022   F2900A00....         CMP.B   #0xa, &gucTimeOverflowCount
  179.       000028   EF23                 JNE     ??ViewCommunicationRX_0
  180.      73                      {gucGeneralStatus &= ~bitSendFaxSignalOK;gucTimeOverflowCount=0;gwTimeOverflowCount=0;break;}
  181.       00002A   F2C01000....         BIC.B   #0x10, &gucGeneralStatus
  182.       000030   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  183.       000034   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  184.      74               } 
  185.      75            VIEW_PORT_OUT &= ~bitVIEWCLK;
  186.                         ??ViewCommunicationRX_3:
  187.       000038   E2C31D00             BIC.B   #0x2, &0x1d
  188.      76            while ((VIEW_PORT_IN & bitVIEWDATASI) == bitVIEWDATASI)//wait Low
  189.                         ??ViewCommunicationRX_1:
  190.       00003C   D2B31C00             BIT.B   #0x1, &0x1c
  191.       000040   0328                 JNC     ??ViewCommunicationRX_5
  192.      77               {  
  193.      78                if ((gucGeneralStatus & bitModemActive) == bitModemActive)
  194.       000042   E2B3....             BIT.B   #0x2, &gucGeneralStatus
  195.       000046   FA2B                 JNC     ??ViewCommunicationRX_1
  196.      79                  break;
  197.      80               } 
  198.      81            if ((VIEW_PORT_IN & bitVIEWDATASI) != bitVIEWDATASI)
  199.                         ??ViewCommunicationRX_5:
  200.       000048   D2B31C00             BIT.B   #0x1, &0x1c
  201.       00004C   132C                 JC      ??ViewCommunicationRX_6
  202.      82             {
  203.      83               /*
  204.      84               SendOneViewData(0x80);
  205.      85               gucHour=ReceiveOneViewData();
  206.      86               gucMinute=ReceiveOneViewData();
  207.      87               gucSecond=ReceiveOneViewData();
  208.      88               gucMonth = ReceiveOneViewData();
  209.      89               gucDate = ReceiveOneViewData();
  210.      90               gucYear = ReceiveOneViewData();
  211.      91               gucViewRingNum=ReceiveOneViewData();
  212.      92               gucViewStaticStatus=ReceiveOneViewData();
  213.      93               gucViewDynamicStatus=ReceiveOneViewData();
  214.      94               gucIcon2=ReceiveOneViewData();
  215.      95               */
  216.      96               for (ucGeneralCnt=0; ucGeneralCnt<10; ucGeneralCnt++)
  217.       00004E   4A43                 MOV.B   #0x0, R10
  218.                         ??ViewCommunicationRX_2:
  219.       000050   7A900A00             CMP.B   #0xa, R10
  220.       000054   092C                 JC      ??ViewCommunicationRX_7
  221.      97                    {
  222.      98                        aucViewData[ucGeneralCnt]=ReceiveOneViewData();
  223.       000056   4B4A                 MOV.B   R10, R11
  224.       000058   3BF0FF00             AND.W   #0xff, R11
  225.       00005C   B012....             CALL    #ReceiveOneViewData
  226.       000060   CB4C....             MOV.B   R12, aucViewData(R11)
  227.      99                    }
  228.       000064   5A53                 ADD.B   #0x1, R10
  229.       000066   F43F                 JMP     ??ViewCommunicationRX_2
  230.     100               delay1us(50);
  231.                         ??ViewCommunicationRX_7:
  232.       000068   3C403200             MOV.W   #0x32, R12
  233.       00006C   B012....             CALL    #delay1us
  234.     101               VIEW_PORT_OUT |= bitVIEWCLK;
  235.       000070   E2D31D00             BIS.B   #0x2, &0x1d
  236.     102             }
  237.     103            
  238.     104            _EINT();
  239.                         ??ViewCommunicationRX_6:
  240.       000074   32D2                 EINT
  241.     105           
  242.     106          }
  243.       000076   3B41                 POP.W   R11
  244.       000078   3A41                 POP.W   R10
  245.       00007A   3041                 RET
  246.     107          
  247.     108          
  248.     109          
  249.                                     In segment CODE, align 2, keep-with-next
  250.     110          void SendOneViewData(unsigned char ucViewTxData)
  251.                         SendOneViewData:
  252.     111          {
  253.       000000   0A12                 PUSH.W  R10
  254.       000002   0B12                 PUSH.W  R11
  255.       000004   4A4C                 MOV.B   R12, R10
  256.     112            unsigned char ucGeneralCount=0;
  257.       000006   4B43                 MOV.B   #0x0, R11
  258.     113            for (ucGeneralCount=0;ucGeneralCount<8;ucGeneralCount++)
  259.       000008   4B43                 MOV.B   #0x0, R11
  260.                         ??SendOneViewData_0:
  261.       00000A   7B92                 CMP.B   #0x8, R11
  262.       00000C   1D2C                 JC      ??SendOneViewData_1
  263.     114               {
  264.     115                  VIEW_PORT_OUT &= ~bitVIEWCLK;
  265.       00000E   E2C31D00             BIC.B   #0x2, &0x1d
  266.     116                  delay1us(50);//
  267.       000012   3C403200             MOV.W   #0x32, R12
  268.       000016   B012....             CALL    #delay1us
  269.     117                  if ((ucViewTxData & BIT0) == BIT0)
  270.       00001A   5AB3                 BIT.B   #0x1, R10
  271.       00001C   0328                 JNC     ??SendOneViewData_2
  272.     118                    {VIEW_PORT_OUT |= bitVIEWDATASO;} //set   Tx bit
  273.       00001E   E2D21D00             BIS.B   #0x4, &0x1d
  274.       000022   023C                 JMP     ??SendOneViewData_3
  275.     119                  else
  276.     120                    {VIEW_PORT_OUT &= ~bitVIEWDATASO;} //reset Tx bit
  277.                         ??SendOneViewData_2:
  278.       000024   E2C21D00             BIC.B   #0x4, &0x1d
  279.     121                  ucViewTxData=ucViewTxData>>1; 
  280.                         ??SendOneViewData_3:
  281.       000028   12C3                 CLRC
  282.       00002A   4A10                 RRC.B   R10
  283.     122                  delay1us(50);//
  284.       00002C   3C403200             MOV.W   #0x32, R12
  285.       000030   B012....             CALL    #delay1us
  286.     123                  VIEW_PORT_OUT |= bitVIEWCLK;
  287.       000034   E2D31D00             BIS.B   #0x2, &0x1d
  288.     124                  delay1us(100);
  289.       000038   3C406400             MOV.W   #0x64, R12
  290.       00003C   B012....             CALL    #delay1us
  291.     125                  VIEW_PORT_OUT &= ~bitVIEWCLK;
  292.       000040   E2C31D00             BIC.B   #0x2, &0x1d
  293.     126                  
  294.     127               }
  295.       000044   5B53                 ADD.B   #0x1, R11
  296.       000046   E13F                 JMP     ??SendOneViewData_0
  297.     128          }
  298.                         ??SendOneViewData_1:
  299.       000048   3B41                 POP.W   R11
  300.       00004A   3A41                 POP.W   R10
  301.       00004C   3041                 RET
  302.     129          
  303.                                     In segment CODE, align 2, keep-with-next
  304.     130          unsigned char ReceiveOneViewData(void)
  305.                         ReceiveOneViewData:
  306.     131          {
  307.       000000   0A12                 PUSH.W  R10
  308.       000002   0B12                 PUSH.W  R11
  309.     132            unsigned char ucGeneralCount=0;
  310.       000004   4B43                 MOV.B   #0x0, R11
  311.     133            unsigned char ucViewRxData;
  312.     134            for (ucGeneralCount=0;ucGeneralCount<8;ucGeneralCount++)
  313.       000006   4B43                 MOV.B   #0x0, R11
  314.                         ??ReceiveOneViewData_0:
  315.       000008   7B92                 CMP.B   #0x8, R11
  316.       00000A   1E2C                 JC      ??ReceiveOneViewData_1
  317.     135               {
  318.     136                  ucViewRxData=ucViewRxData>>1;
  319.       00000C   12C3                 CLRC
  320.       00000E   4A10                 RRC.B   R10
  321.     137                  VIEW_PORT_OUT &= ~bitVIEWCLK;
  322.       000010   E2C31D00             BIC.B   #0x2, &0x1d
  323.     138                  delay1us(100);
  324.       000014   3C406400             MOV.W   #0x64, R12
  325.       000018   B012....             CALL    #delay1us
  326.     139                  VIEW_PORT_OUT |= bitVIEWCLK;
  327.       00001C   E2D31D00             BIS.B   #0x2, &0x1d
  328.     140                  delay1us(50);
  329.       000020   3C403200             MOV.W   #0x32, R12
  330.       000024   B012....             CALL    #delay1us
  331.     141                  if ((VIEW_PORT_IN & bitVIEWDATASI) == bitVIEWDATASI)
  332.       000028   D2B31C00             BIT.B   #0x1, &0x1c
  333.       00002C   0328                 JNC     ??ReceiveOneViewData_2
  334.     142                    {ucViewRxData |= BIT7;} //1
  335.       00002E   7AD08000             BIS.B   #0x80, R10
  336.       000032   023C                 JMP     ??ReceiveOneViewData_3
  337.     143                  else
  338.     144                    {ucViewRxData &= ~BIT7;} //0
  339.                         ??ReceiveOneViewData_2:
  340.       000034   7AC08000             BIC.B   #0x80, R10
  341.     145                  
  342.     146                  delay1us(50);
  343.                         ??ReceiveOneViewData_3:
  344.       000038   3C403200             MOV.W   #0x32, R12
  345.       00003C   B012....             CALL    #delay1us
  346.     147                  VIEW_PORT_OUT &= ~bitVIEWCLK;
  347.       000040   E2C31D00             BIC.B   #0x2, &0x1d
  348.     148               }
  349.       000044   5B53                 ADD.B   #0x1, R11
  350.       000046   E03F                 JMP     ??ReceiveOneViewData_0
  351.     149             return  ucViewRxData; 
  352.                         ??ReceiveOneViewData_1:
  353.       000048   4C4A                 MOV.B   R10, R12
  354.       00004A   3B41                 POP.W   R11
  355.       00004C   3A41                 POP.W   R10
  356.       00004E   3041                 RET
  357.     150          } 
  358.     151          
  359.     152          /*
  360.     153                  if ((VIEW_PORT_OUT & bitVIEWCLK) == bitVIEWCLK)
  361.     154                    {VIEW_PORT_OUT &= ~bitVIEWDATA;} //Reset CLOCK
  362.     155                  else
  363.     156                    {VIEW_PORT_OUT |= bitVIEWDATA;} //set CLOCK
  364.     157          */ 
  365.    Maximum stack usage in bytes:
  366.      Function                CSTACK
  367.      --------                ------
  368.      ReceiveOneViewData          6
  369.        -> delay1us               6
  370.        -> delay1us               6
  371.        -> delay1us               6
  372.      SendOneViewData             6
  373.        -> delay1us               6
  374.        -> delay1us               6
  375.        -> delay1us               6
  376.      ViewCommunicationRX         6
  377.        -> ReceiveOneViewData     6
  378.        -> delay1us               6
  379.      ViewCommunicationTX         6
  380.        -> SendOneViewData        6
  381.        -> SendOneViewData        6
  382.        -> delay1us               6
  383.    Segment part sizes:
  384.      Function/Label      Bytes
  385.      --------------      -----
  386.      P4IN                   1
  387.      P4OUT                  1
  388.      ViewCommunicationTX  124
  389.      ViewCommunicationRX  124
  390.      SendOneViewData       78
  391.      ReceiveOneViewData    80
  392.  
  393.  406 bytes in segment CODE
  394.    2 bytes in segment DATA16_AN
  395.  
  396.  406 bytes of CODE memory
  397.    0 bytes of DATA memory (+ 2 bytes shared)
  398. Errors: none
  399. Warnings: none