Main.LST
上传用户:gxz1972
上传日期:2019-09-13
资源大小:323k
文件大小:5k
源码类别:

传真(Fax)编程

开发平台:

C/C++

  1. C51 COMPILER V7.02b   MAIN                                                                 11/30/2007 14:07:12 PAGE 1   
  2. C51 COMPILER V7.02b, COMPILATION OF MODULE MAIN
  3. OBJECT MODULE PLACED IN Main.OBJ
  4. COMPILER INVOKED BY: C:KeilC51BINc51.exe Main.c DB OE
  5. stmt level    source
  6.    1          //-----------------------------------------------------------------------------
  7.    2          // Main.c
  8.    3          //-----------------------------------------------------------------------------
  9.    4          // Copyright 2007 Vson Technology, Inc.
  10.    5          // http://www.usbmcu.com
  11.    6          //
  12.    7          // Program Description:
  13.    8          //
  14.    9          //
  15.   10          //
  16.   11          //
  17.   12          //
  18.   13          // MCU:            C8051F347
  19.   14          // Tool chain:     Keil C51 7.50 / Keil EVAL C51
  20.   15          //                 Silicon Laboratories IDE version 2.6
  21.   16          // Command Line:   
  22.   17          // Project Name:   TR1000
  23.   18          //
  24.   19          //
  25.   20          // Release 1.0
  26.   21          //    -All changes by Brin Cai
  27.   22          //    -24 JUL 2007
  28.   23          //
  29.   24          //
  30.   25          //
  31.   26          //update date: 
  32.   27          //2007.11.30 学生按键接收缓冲大小 由20 改为 60
  33.   28          //2007.10.24 
  34.   29          // 1.对于学生机:只做包序比较--》比较ID号和包序号 解决时分复用问题
  35.   30          // 2.对于教师机:没有做更改,一个教室教师机只有一个,所有没有ID号的区别
  36.   31          //2007.08.13 ADC solution bit change(10bit--->12bit)
  37.   32          //-----------------------------------------------------------------------------
  38.   33          // Includes
  39.   34          //-----------------------------------------------------------------------------
  40.   35          
  41.   36          #include "Include_H.h"
  42.   37          
  43.   38          //-----------------------------------------------------------------------------
  44.   39          // Main.c Globals Variables
  45.   40          //-----------------------------------------------------------------------------
  46.   41          
  47.   42          DEVICE_STATUS    gDeviceStatus;
  48.   43          EP_STATUS        gEp0Status;
  49.   44          EP_STATUS        gEp1InStatus;
  50.   45          EP_STATUS        gEp2OutStatus;
  51.   46          EP0_COMMAND      gEp0Command;
  52.   47          
  53.   48          //-----------------------------------------------------------------------------
  54.   49          // MAIN Routine
  55.   50          //-----------------------------------------------------------------------------
  56.   51          
  57.   52          void main (void)
  58.   53          {
  59.   54   1         
  60.   55   1         PCA0MD &= ~0x40;                    // Disable Watchdog timer
  61. C51 COMPILER V7.02b   MAIN                                                                 11/30/2007 14:07:12 PAGE 2   
  62.   56   1         Initial();
  63.   57   1      
  64.   58   1      
  65.   59   1         EA = 1;                             // Enable global interrupts
  66.   60   1      
  67.   61   1         USB0_Enable ();                     // Enable USB0
  68.   62   1      
  69.   63   1         //RF_DATA_PORT_OUT_INITIAL; //delete at 2007.10.09
  70.   64   1         //nRF2401Configuration();
  71.   65   1      
  72.   66   1         RF_DATA_PORT_IN_INITIAL;
  73.   67   1         while (1)
  74.   68   1         {
  75.   69   2            gbitRfReceivedDataFlag = nRF2401RxData();
  76.   70   2                State_Machine();
  77.   71   2                if (1 == gbitClearStudentIdBuffer)
  78.   72   2                {
  79.   73   3                   ClearStudentIdBuffer();
  80.   74   3                       gbitClearStudentIdBuffer = 0;
  81.   75   3                       StopTimer2();
  82.   76   3                }
  83.   77   2                
  84.   78   2         }//while
  85.   79   1      }//main
  86.   80          
  87.   81          
  88.   82          //-----------------------------------------------------------------------------
  89.   83          // USB0_Enable
  90.   84          //-----------------------------------------------------------------------------
  91.   85          //
  92.   86          // Return Value : None
  93.   87          // Parameters   : None
  94.   88          //
  95.   89          // This function enables the USB transceiver
  96.   90          //
  97.   91          //-----------------------------------------------------------------------------
  98.   92          void USB0_Enable (void)
  99.   93          {
  100.   94   1      
  101.   95   1         UWRITE_BYTE(POWER, 0x00);           // Enable USB0 by clearing the
  102.   96   1                                             // USB Inhibit bit
  103.   97   1                                             // Suspend mode disabled
  104.   98   1      }
  105.   99          
  106.  100          //-----------------------------------------------------------------------------
  107.  101          // End Of File
  108.  102          //-----------------------------------------------------------------------------
  109. MODULE INFORMATION:   STATIC OVERLAYABLE
  110.    CODE SIZE        =     74    ----
  111.    CONSTANT SIZE    =   ----    ----
  112.    XDATA SIZE       =   ----    ----
  113.    PDATA SIZE       =   ----    ----
  114.    DATA SIZE        =     54    ----
  115.    IDATA SIZE       =   ----    ----
  116.    BIT SIZE         =   ----    ----
  117. END OF MODULE INFORMATION.
  118. C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)