www.pudn.com > UDISK.rar > FW.H


//************************************************************************ 
//author:dragon 
//web:8dragon.com 
//2004.2.5完成于桃龙源 
//************************************************************************* 
#include "AT89X52.H" 
#define BYTE	unsigned char 
#define WORD	unsigned short 
#define DWORD	unsigned long 
#define ENABLE_INTERRUPTS		EA = 1 
#define DISABLE_INTERRUPTS		EA = 0 
sbit nRest=P1^4; 
sbit MCU_LED1=P1^0; 
sbit MCU_LED2=P1^1; 
sbit MCU_LED3=P1^2; 
sbit MCU_LED4=P1^3; 
typedef struct _CONTROL { 
		BYTE  	SLAVE_FOUND			:1;				// Slave USB device found 
		BYTE  	SLAVE_ENUMERATED	:1;			// slave USB device enumeration done 
		BYTE	SLAVE_REMOVED		:1; 
		BYTE	SLAVE_ONLINE		:1; 
		BYTE 	bMassDevice			:1;				// Set when EZUSB completes its enumeration process. 
		BYTE 	TIMEOUT_ERR			:1;				// timeout error during data endpoint transfer 
		BYTE	DATA_STOP			:1;					// device unplugged during data transfer 
		}Control, * pControl;	 
//************************************************************************ 
//author:dragon 
//web:8dragon.com 
//2004.2.5完成于桃龙源 
//*************************************************************************