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