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

传真(Fax)编程

开发平台:

C/C++

  1. #include "includeH.h"
  2. void SendATcmdModemSoftReset(void)                    //
  3. {       
  4.         unsigned char ucGeneralCnt=0,ATcmdSoftReset[]={0x41,0x54,0x5a,0x0d}; //add a ";" , a bug of Jan. 9,2007
  5.         unsigned int wGeneralCount=0;
  6.         gwTxNum=sizeof (ATcmdSoftReset);
  7.         gpucTxBufPnt=0;
  8.         
  9.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  10.         {
  11.           aucUartTxBuf[ucGeneralCnt]=ATcmdSoftReset[ucGeneralCnt];          
  12.         }               
  13.                       
  14.         TXBUF0=aucUartTxBuf[0];    
  15.         gucTxBufCnt=1;
  16.         while (wGeneralCount++<0xffff)    
  17.         {
  18.           if ((aucUartRxBuf[gucUartRxCnt-2]==0x0d)&&(aucUartRxBuf[gucUartRxCnt-3]==0x4B))
  19.             break;
  20.           
  21.         //if check time>min. 5S, Receive Fax error, progra should be quit  
  22.         //RxFaxTimeOverflowErrorQuit();
  23.         }     
  24. }    
  25. void SendATcmd(void)                    //
  26. {       
  27.         unsigned char ucGeneralCnt=0,ATcmdPrefix[]={0x41,0x54,0x0d};
  28.         gwTxNum=sizeof (ATcmdPrefix);
  29.         gpucTxBufPnt=0;
  30.         
  31.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  32.         {
  33.           aucUartTxBuf[ucGeneralCnt]=ATcmdPrefix[ucGeneralCnt];          
  34.         }               
  35.                       
  36.         TXBUF0=aucUartTxBuf[0];    
  37.         gucTxBufCnt=1; 
  38. }    
  39. void SendATcmdPrefix(void)                    //
  40. {       
  41.         unsigned char ucGeneralCnt=0,ATcmdPrefix[]={0x41,0x54};
  42.         gwTxNum=sizeof (ATcmdPrefix);
  43.         gpucTxBufPnt=0;
  44.         
  45.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  46.         {
  47.           aucUartTxBuf[ucGeneralCnt]=ATcmdPrefix[ucGeneralCnt];          
  48.         }               
  49.                       
  50.         TXBUF0=aucUartTxBuf[0];    
  51.         gucTxBufCnt=1; 
  52. }    
  53. void SendATcmdSuffix(void)                    //
  54. {       
  55.         unsigned char ucGeneralCnt=0,ATcmdSuffix[]={0x0D};
  56.         gwTxNum=sizeof (ATcmdSuffix);
  57.         gpucTxBufPnt=0;
  58.         
  59.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  60.         {
  61.           aucUartTxBuf[ucGeneralCnt]=ATcmdSuffix[ucGeneralCnt];          
  62.         }               
  63.                       
  64.         TXBUF0=aucUartTxBuf[0];    
  65.         gucTxBufCnt=1;
  66. }
  67.   
  68. void SendATconfigFS0(void)
  69. {       
  70.         unsigned char ucGeneralCnt=0,
  71.         ATFS0[] = {0x41,0x54,0x26,0x46,0x53,0x30,0x3d,0x30,0x45,0x31,0x56,0x31,0x51,0x30,0X0d};
  72.         gwTxNum=sizeof (ATFS0);
  73.         gpucTxBufPnt=0;
  74.         
  75.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  76.         {
  77.           aucUartTxBuf[ucGeneralCnt]=ATFS0[ucGeneralCnt];          
  78.         }               
  79.                       
  80.         TXBUF0=aucUartTxBuf[0];    
  81.         gucTxBufCnt=1; 
  82. }
  83. void SendATconfigS7(void)
  84. {       
  85.         unsigned char ucGeneralCnt=0,
  86.         //ATS7[] = {0x41,0x54,0x53,0x37,0x3d,0x36,0x30,0x26,0x44,0x33,0x26,
  87.         //0x4b,0x34,0x5c,0x51,0x31,0x5c,0x4a,0x30,0x0d};//Ambient
  88.         ATS7[] = {0x41,0x54,0x53,0x37,0x3d,0x36,0x30,0x26,0x44,0x33,0x26,0x4b,0x34,0x0d};//Conexant
  89.         gwTxNum=sizeof (ATS7);
  90.         gpucTxBufPnt=0;
  91.         
  92.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  93.         {
  94.           aucUartTxBuf[ucGeneralCnt]=ATS7[ucGeneralCnt];          
  95.         }               
  96.                       
  97.         TXBUF0=aucUartTxBuf[0];    
  98.         gucTxBufCnt=1; 
  99. }     
  100. void SendATconfigX4M1(void)
  101. {       
  102.         unsigned char ucGeneralCnt=0,ATX4M1L0[] = {0x41,0x54,0x58,0x34,0x4d,0x31,0x4c,0x30,0x0d};
  103.         gwTxNum= sizeof (ATX4M1L0);
  104.         gpucTxBufPnt=0;
  105.         
  106.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  107.         {
  108.           aucUartTxBuf[ucGeneralCnt]=ATX4M1L0[ucGeneralCnt];          
  109.         }               
  110.                       
  111.         TXBUF0=aucUartTxBuf[0];    
  112.         gucTxBufCnt=1; 
  113. }     
  114. void SendATconfigFE0EndofRX(void)
  115. {       
  116.         unsigned char ucGeneralCnt=0;
  117.         //Ambient
  118.         //unsigned char ATFE0EndofRX[] = {0x41,0x54,0x26, 0x46, 0x45, 0x31, 0x56, 0x31, 0x57, 0x32, 0x26, 0x44, 0x32, 0x26, 0x43, 
  119.                                       //0x31, 0x53, 0x30, 0x3d, 0x30, 0x2d, 0x43, 0x30, 0x0d};  // 26 is different of 2b a bug of Sep. 22
  120.         //Conexant
  121.         unsigned char ATFE0EndofRX[] = {0x41,0x54,0x26, 0x46, 0x45, 0x30, 0x56, 0x31, 0x26, 0x43, 0x31, 0x26, 0x44, 
  122.                                       0x32, 0x53, 0x39, 0x35, 0x3d, 0x34, 0x37, 0x53, 0x30, 0x3d, 0x30,0x0d};  // 26 is different of 2b a bug of Sep. 22
  123.         gwTxNum=sizeof (ATFE0EndofRX);
  124.         gpucTxBufPnt=0;
  125.         
  126.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  127.         {
  128.           aucUartTxBuf[ucGeneralCnt]=ATFE0EndofRX[ucGeneralCnt];          
  129.         }               
  130.                       
  131.         TXBUF0=aucUartTxBuf[0];    
  132.         gucTxBufCnt=1; 
  133. }
  134. void SendATconfigS7RX(void)
  135. {       
  136.         unsigned char ucGeneralCnt=0;
  137.         unsigned char ATS7RX[] = {0x41,0x54,0x53,0x37,0x3d,0x36,0x30,
  138.          0x4c,0x30,0x4d,0x31,0x26,0x4b,0x33,0x4e,0x31,0x58,0x34,0x0d};
  139.         gwTxNum=sizeof (ATS7RX);
  140.         gpucTxBufPnt=0;
  141.         
  142.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  143.         {
  144.           aucUartTxBuf[ucGeneralCnt]=ATS7RX[ucGeneralCnt];          
  145.         }               
  146.                       
  147.         TXBUF0=aucUartTxBuf[0];    
  148.         gucTxBufCnt=1; 
  149. }     
  150. void SendATconfigS0RX(void)
  151. {       
  152.         unsigned char ucGeneralCnt=0,ATS0RX[]={0x41,0x54,0x53,0x30,0x3d,0x30,0x0d};
  153.         gwTxNum=sizeof (ATS0RX);
  154.         gpucTxBufPnt=0;
  155.         
  156.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  157.         {
  158.           aucUartTxBuf[ucGeneralCnt]=ATS0RX[ucGeneralCnt];          
  159.         }               
  160.                       
  161.         TXBUF0=aucUartTxBuf[0];    
  162.         gucTxBufCnt=1; 
  163. }     
  164. void SendATcmdFCLASS0(void)
  165. {       
  166.         unsigned char ucGeneralCnt=0,
  167.         FCLASS0[]={0x41,0x54,0x2b,0x46,0x43,0x4c,0x41,0x53,0x53,0x3d,0x30,0x0d};
  168.         gwTxNum=sizeof (FCLASS0);
  169.         gpucTxBufPnt=0;
  170.         
  171.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  172.         {
  173.           aucUartTxBuf[ucGeneralCnt]=FCLASS0[ucGeneralCnt];//a bug of Sep. 21 Fclass---->Fclass0          
  174.         }               
  175.                       
  176.         TXBUF0=aucUartTxBuf[0];    
  177.         gucTxBufCnt=1; 
  178. }     
  179. void SendATcmdFCLASS(void)
  180. {       
  181.         unsigned char ucGeneralCnt=0,
  182.         FCLASS[]={0x41,0x54,0x2b,0x46,0x43,0x4c,0x41,0x53,0x53,0x3d,0x31,0x0d};
  183.         gwTxNum=sizeof (FCLASS);
  184.         gpucTxBufPnt=0;
  185.         
  186.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  187.         {
  188.           aucUartTxBuf[ucGeneralCnt]=FCLASS[ucGeneralCnt];          
  189.         }               
  190.                       
  191.         TXBUF0=aucUartTxBuf[0];    
  192.         gucTxBufCnt=1; 
  193. }     
  194.      
  195. void SendATcmdDT(void)                    //ATDT
  196. {       
  197.         unsigned char ucGeneralCnt=0,
  198.                       DT[]={0x41,0x54,0x44,0x54,0x39,0x36,0x31,0x31,0x33,0x39,0x35,0x30,0x39,0x0d};
  199.         gwTxNum=sizeof (DT);
  200.         gpucTxBufPnt=0;
  201.         
  202.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  203.         {
  204.           aucUartTxBuf[ucGeneralCnt]=DT[ucGeneralCnt];          
  205.         }               
  206.                       
  207.         TXBUF0=aucUartTxBuf[0];    
  208.         gucTxBufCnt=1; 
  209. }    
  210. void SendATcmdFRH(void)                    //AT+FRH
  211. {       
  212.         unsigned char ucGeneralCnt=0,
  213.                       FRH[]={0x41,0x54,0x2b,0x46,0x52,0x48,0x3d,0x33,0x0d};
  214.         gwTxNum=sizeof (FRH);
  215.         gpucTxBufPnt=0;
  216.         
  217.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  218.         {
  219.           aucUartTxBuf[ucGeneralCnt]=FRH[ucGeneralCnt];          
  220.         }               
  221.                       
  222.         TXBUF0=aucUartTxBuf[0];    
  223.         gucTxBufCnt=1; 
  224. }    
  225. void SendATcmdFTH(void)                    //AT+FTH
  226. {       
  227.         unsigned char ucGeneralCnt=0,
  228.                       FTH[]={0x41,0x54,0x2b,0x46,0x54,0x48,0x3d,0x33,0x0d};
  229.         gwTxNum=sizeof (FTH);
  230.         gpucTxBufPnt=0;
  231.         
  232.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  233.         {
  234.           aucUartTxBuf[ucGeneralCnt]=FTH[ucGeneralCnt];          
  235.         }               
  236.                       
  237.         TXBUF0=aucUartTxBuf[0];    
  238.         gucTxBufCnt=1; 
  239. }    
  240. /*
  241. void SendATdataFTHNSF(void)                    //DataFTHNSF
  242. {       
  243.         unsigned char ucGeneralCnt=0;
  244.         unsigned char FTHNSF[] = {0xff,0x13,0x54,0x47,0x46,0x33,0x36,0x36,0x43,0x00,0x77,0x9C,0x10,0x03};
  245.         gwTxNum=sizeof (FTHNSF);
  246.         gpucTxBufPnt=0;
  247.         
  248.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  249.         {
  250.           aucUartTxBuf[ucGeneralCnt]=FTHNSF[ucGeneralCnt];          
  251.         }               
  252.                       
  253.         TXBUF0=aucUartTxBuf[0];    
  254.         gucTxBufCnt=1; 
  255. }    
  256. */
  257. void SendATdataFTHTSI(void)                    //DataFTHTSI
  258. {       
  259.         unsigned char ucGeneralCnt=0,
  260.                       FTHTSI[]={0xff,0x03,0x43,0x78,0x61,0x46,0x10,0x03};
  261.         gwTxNum=sizeof (FTHTSI);
  262.         gpucTxBufPnt=0;
  263.         
  264.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  265.         {
  266.           aucUartTxBuf[ucGeneralCnt]=FTHTSI[ucGeneralCnt];          
  267.         }               
  268.                       
  269.         TXBUF0=aucUartTxBuf[0];    
  270.         gucTxBufCnt=1; 
  271. }    
  272. void SendATdataFTHCSI(void)                    //DataFTHCSI
  273. {       
  274.         unsigned char ucGeneralCnt=0;//, a bug of Jan.5,2007
  275.                       //FTHCSI[]={0xff,0x03,0x40,0x20,0x20,0x20,0x20,0x20,
  276.                        //0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
  277.                        //0x36,0x33,0x38,0x10,0x03};
  278.         gwTxNum = sizeof (FTHCSI);//gwTxNum=ucDataNum;
  279.         gpucTxBufPnt=0;
  280.         
  281.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  282.         {
  283.           aucUartTxBuf[ucGeneralCnt]=FTHCSI[ucGeneralCnt];          
  284.         }               
  285.                       
  286.         TXBUF0=aucUartTxBuf[0];    
  287.         gucTxBufCnt=1; 
  288. }    
  289. void SendATdataFTHDIS(void)                    //DataFTHDIS
  290. {       
  291.         unsigned char ucGeneralCnt=0;
  292.                       //FTHDIS[]={0xff,0x13,0x80,0x00,0x46,0x78,0x10,0x03};//c6 T.4 2D
  293.         gwTxNum=sizeof (FTHDIS);
  294.         gpucTxBufPnt=0;
  295.         
  296.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  297.         {
  298.           aucUartTxBuf[ucGeneralCnt]=FTHDIS[ucGeneralCnt];          
  299.         }               
  300.                       
  301.         TXBUF0=aucUartTxBuf[0];    
  302.         gucTxBufCnt=1; 
  303. }    
  304. /*
  305. void SendATdataFTHDCS(void)                    //DataFTHDCS
  306. {       
  307.         unsigned char ucGeneralCnt=0,
  308.                       FTHDCS[]={0xff,0x13,0x83,0x00,0x46,0x78,0x10,0x03};
  309.         gwTxNum=sizeof (FTHDCS);
  310.         gpucTxBufPnt=0;
  311.         
  312.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  313.         {
  314.           aucUartTxBuf[ucGeneralCnt]=FTHDCS[ucGeneralCnt];          
  315.         }               
  316.                       
  317.         TXBUF0=aucUartTxBuf[0];    
  318.         gucTxBufCnt=1; 
  319. }
  320. */
  321. void SendATdataFTHCFR(void)                    //DataFTHCFR
  322. {       
  323.         unsigned char ucGeneralCnt=0,
  324.                       FTHCFR[]={0xff,0x13,0x84,0x10,0x03};
  325.         gwTxNum=sizeof (FTHCFR);
  326.         gpucTxBufPnt=0;
  327.         
  328.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  329.         {
  330.           aucUartTxBuf[ucGeneralCnt]=FTHCFR[ucGeneralCnt];          
  331.         }               
  332.                       
  333.         TXBUF0=aucUartTxBuf[0];    
  334.         gucTxBufCnt=1; 
  335. }
  336. void SendATdataFTHMCF(void)                    //DataFTHMCF
  337. {       
  338.         unsigned char ucGeneralCnt=0,
  339.                       FTHMCF[]={0xff,0x13,0x8C,0x10,0x03};
  340.         gwTxNum=sizeof (FTHMCF);
  341.         gpucTxBufPnt=0;
  342.         
  343.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  344.         {
  345.           aucUartTxBuf[ucGeneralCnt]=FTHMCF[ucGeneralCnt];          
  346.         }               
  347.                       
  348.         TXBUF0=aucUartTxBuf[0];    
  349.         gucTxBufCnt=1; 
  350. }
  351. void SendATdataFTHEOP(void)                    //DataFTHEOP
  352. {       
  353.         unsigned char ucGeneralCnt=0,
  354.                       FTHEOP[]={0xff,0x13,0x2f,0x10,0x03};
  355.         gwTxNum=sizeof (FTHEOP);
  356.         gpucTxBufPnt=0;
  357.         
  358.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  359.         {
  360.           aucUartTxBuf[ucGeneralCnt]=FTHEOP[ucGeneralCnt];          
  361.         }               
  362.                       
  363.         TXBUF0=aucUartTxBuf[0];    
  364.         gucTxBufCnt=1; 
  365. }     
  366. void SendATdataFTHDNC(void)                    //DataFTHDNC
  367. {       
  368.         unsigned char ucGeneralCnt=0,
  369.                       FTHDNC[]={0xff,0x13,0xfb,0x10,0x03};
  370.         gwTxNum=sizeof (FTHDNC);
  371.         gpucTxBufPnt=0;
  372.         
  373.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  374.         {
  375.           aucUartTxBuf[ucGeneralCnt]=FTHDNC[ucGeneralCnt];          
  376.         }               
  377.                       
  378.         TXBUF0=aucUartTxBuf[0];    
  379.         gucTxBufCnt=1; 
  380. /*
  381. void SendATcmdFTS(void)                    //
  382. {       
  383.         unsigned char ucGeneralCnt=0,
  384.                       FTS[]={0x41,0x54,0x2b,0x46,0x54,0x53,0x3d,0x38,0x0d};
  385.         gwTxNum=sizeof (FTS);
  386.         gpucTxBufPnt=0;
  387.         
  388.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  389.         {
  390.           aucUartTxBuf[ucGeneralCnt]=FTS[ucGeneralCnt];          
  391.         }               
  392.                       
  393.         TXBUF0=aucUartTxBuf[0];    
  394.         gucTxBufCnt=1; 
  395. }    
  396. */
  397. void SendATcmdFTM(void)                    //
  398. {       
  399.         unsigned char ucGeneralCnt=0,
  400.                       FTM[]={0x41,0x54,0x2b,0x46,0x54,0x4d,0x3d,0x39,0x36,0x0d};
  401.         gwTxNum=sizeof (FTM);
  402.         gpucTxBufPnt=0;
  403.         
  404.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  405.         {
  406.           aucUartTxBuf[ucGeneralCnt]=FTM[ucGeneralCnt];          
  407.         }               
  408.                       
  409.         TXBUF0=aucUartTxBuf[0];    
  410.         gucTxBufCnt=1; 
  411. }    
  412. void SendATcmdFRM(void)                    //
  413. {       
  414.         unsigned char ucGeneralCnt=0,
  415.                       FRM[]={0x41,0x54,0x2b,0x46,0x52,0x4d,0x3d,0x39,0x36,0x0d};
  416.         gwTxNum=sizeof (FRM);
  417.         gpucTxBufPnt=0;
  418.         
  419.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  420.         {
  421.           aucUartTxBuf[ucGeneralCnt]=FRM[ucGeneralCnt];          
  422.         }               
  423.                       
  424.         TXBUF0=aucUartTxBuf[0];    
  425.         gucTxBufCnt=1; 
  426. }    
  427. /*
  428. void SendATcmdFRM146(void)                    //
  429. {       
  430.         unsigned char ucGeneralCnt=0,
  431.                       FRM[]={0x41,0x54,0x2b,0x46,0x52,0x4d,0x3d,0x31,0x34,0x36,0x0d};
  432.         gwTxNum=sizeof (FRM);
  433.         gpucTxBufPnt=0;
  434.         
  435.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  436.         {
  437.           aucUartTxBuf[ucGeneralCnt]=FRM[ucGeneralCnt];          
  438.         }               
  439.                       
  440.         TXBUF0=aucUartTxBuf[0];    
  441.         gucTxBufCnt=1; 
  442. }    
  443. void SendATdataTF(void)                    //Data DLE ETX
  444. {       
  445.         unsigned char ucGeneralCnt=0,
  446.                       TerminalFlag[]={0x10,0x03};
  447.         gwTxNum=sizeof (TerminalFlag);
  448.         gpucTxBufPnt=0;
  449.         
  450.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  451.         {
  452.           aucUartTxBuf[ucGeneralCnt]=TerminalFlag[ucGeneralCnt];          
  453.         }               
  454.                       
  455.         TXBUF0=aucUartTxBuf[0];    
  456.         gucTxBufCnt=1; 
  457. }    
  458. */
  459. void SendATcmdH0(void)                    //H 0(0x30) Num 0
  460. {       
  461.         unsigned char ucGeneralCnt=0,
  462.                       H0[]={0x41,0x54,0x48,0x30,0x0d};//H0[]={0x41,0x54,0x48,0x4f,0x0d};
  463.         gwTxNum=sizeof (H0);
  464.         gpucTxBufPnt=0;
  465.         
  466.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  467.         {
  468.           aucUartTxBuf[ucGeneralCnt]=H0[ucGeneralCnt];          
  469.         }               
  470.                       
  471.         TXBUF0=aucUartTxBuf[0];    
  472.         gucTxBufCnt=1; 
  473. }                   
  474. void SendATcmdATA(void)                    //
  475. {       
  476.         unsigned char ucGeneralCnt=0,ATA[]={0x41,0x54,0x41,0x0d};
  477.         gwTxNum=sizeof (ATA);
  478.         gpucTxBufPnt=0;
  479.         
  480.         for(ucGeneralCnt=0;ucGeneralCnt<gwTxNum;ucGeneralCnt++)
  481.         {
  482.           aucUartTxBuf[ucGeneralCnt]=ATA[ucGeneralCnt];          
  483.         }               
  484.         TXBUF0=aucUartTxBuf[0];    
  485.         gucTxBufCnt=1; 
  486. }