- //-----------------------------------------------------------------------------
- // GlobalVariabel_H.h
- //-----------------------------------------------------------------------------
- // Copyright 2007 Vson Technology, Inc.
- // http://www.usbmcu.com
- //
- // Program Description:
- //
- //
- //
- //
- //
- // MCU: C8051F347
- // Tool chain: Keil C51 7.50 / Keil EVAL C51
- // Silicon Laboratories IDE version 2.6
- // Command Line:
- // Project Name: TR1000
- //
- //
- // Release 1.0
- // -All changes by Brin Cai
- // -24 JUL 2007
- //
- //
- #include "Class_Define_H.h"
- #include "USB_Structs_H.h"
- #ifndef _GlobalVariabel_H_
- #define _GlobalVariabel_H_
- //-----------------------------------------------------------------------------
- // nRF2401RX.c global variables
- //-----------------------------------------------------------------------------
- /*
- extern sbitRfData;
- extern sbitRfCLK;
- extern sbitRfDR4;
- extern sbitRfCS4;
- extern sbitRfCE4;
- extern sbitRfDR3;
- extern sbitRfCS3;
- extern sbitRfCE3;
- extern sbitRfDR2;
- extern sbitRfCS2;
- extern sbitRfCE2;
- extern sbitRfDR1;
- extern sbitRfCS1;
- extern sbitRfCE1;
- */
- #define cstStuIdBufIndexMax 20
- //#define cstStuIdBufIndexMax 60
- //nRF2401RX.c global Constants
- sbit sbitRfData4 = P2^5;
- sbit sbitRfCLK4 = P2^4;
- sbit sbitRfDR4 = P2^3;
- sbit sbitRfCS4 = P2^2;
- sbit sbitRfCE4 = P2^1;
- sbit sbitRfData3 = P0^0;
- sbit sbitRfCLK3 = P0^1;
- sbit sbitRfDR3 = P2^0;
- sbit sbitRfCS3 = P1^7;
- sbit sbitRfCE3 = P1^6;
- sbit sbitRfData2 = P2^6;
- sbit sbitRfCLK2 = P2^7;
- sbit sbitRfDR2 = P1^5;
- sbit sbitRfCS2 = P1^4;
- sbit sbitRfCE2 = P1^3;
- sbit sbitRfData1 = P0^2;
- sbit sbitRfCLK1 = P0^3;
- sbit sbitRfDR1 = P1^2;
- sbit sbitRfCS1 = P1^1;
- sbit sbitRfCE1 = P1^0;
- //led
- sbit sbitLED = P0^5;
- //nRF2401RX.c global Constants
- extern data bit gbitRfReceivedDataFlag;
- extern data bit gbitBulkMultiPackageTxFlag;
- extern data bit gbitClearStudentIdBuffer;
- extern idata unsigned char gaucReadDataBuffer[7];
- extern idata unsigned char gaucTxData2HostBuffer[64];
- extern idata unsigned char gaucRxDataFromRfBuffer[64];
- extern data BYTE M_State;
- extern idata unsigned int gwDelayCnt;
- extern idata unsigned char gucPacketCount;
- extern idata unsigned char gucStudentKeyDataCount;
- extern idata unsigned char gpucStudentIdBufferPoint;
- extern idata unsigned char gaucRfConfigData0[4]; //2007.10.09
- extern xdata BYTE gaucTempStorage[MAX_BLOCK_SIZE];
- //xdata BYTE gaucStudentIdBuffer[20][6]; // 缓冲区:存储ID号和包序号
- xdata BYTE gaucStudentIdBuffer[cstStuIdBufIndexMax][6]; // 缓冲区:存储ID号和包序号
- //USB ISR
- extern EP_STATUS gEp1InStatus;
- //-----------------------------------------------------------------------------
- // USB_ISR.c Extern Global Variables
- //-----------------------------------------------------------------------------
- extern DEVICE_STATUS gDeviceStatus;
- extern EP0_COMMAND gEp0Command;
- extern EP_STATUS gEp0Status;
- extern EP_STATUS gEp1InStatus;
- extern EP_STATUS gEp2OutStatus;
- //-----------------------------------------------------------------------------
- // USB_Standard_Requests.c Extern Global Variables
- //-----------------------------------------------------------------------------
- extern code DESCRIPTORS gDescriptorMap;
- extern DEVICE_STATUS gDeviceStatus;
- extern EP_STATUS gEp0Status;
- extern EP_STATUS gEp2OutStatus;
- extern EP_STATUS gEp1InStatus;
- extern EP0_COMMAND gEp0Command;
- //-----------------------------------------------------------------------------
- // USB_Utilities.c Extern Global Variables
- //-----------------------------------------------------------------------------
- extern DEVICE_STATUS gDeviceStatus;
- extern code DESCRIPTORS gDescriptorMap;
- extern DEVICE_STATUS gDeviceStatus;
- extern EP_STATUS gEp0Status;
- extern EP_STATUS gEp2OutStatus;
- extern EP_STATUS gEp1InStatus;
- //-----------------------------------------------------------------------------
- // Main.c Globals Variables
- //-----------------------------------------------------------------------------
- extern DEVICE_STATUS gDeviceStatus;
- extern EP_STATUS gEp0Status;
- extern EP_STATUS gEp1InStatus;
- extern EP_STATUS gEp2OutStatus;
- extern EP0_COMMAND gEp0Command;
- //-----------------------------------------------------------------------------
- // USB_Standard_Requests.c Global Variables
- //-----------------------------------------------------------------------------
- extern BYTE bEpState;
- extern UINT uNumBytes;
- extern PIF_STATUS pIfStatus;
- #endif //