/******************************* Initial Condition*****************************

 Crystal input should be force at 12Mhz

*******************************************************************************/
#define    XTAL_12Mhz

#define    SET         1
#define    CLR         0

#define    BIT         bit
#define    BYTE        unsigned char
#define    WORD        unsigned int
#define    DWORD       unsigned long 

#define    XBYTE       BYTE volatile xdata


#define    HIBYTE( V1 )     ((BYTE)((V1) >> 8))
#define    LOBYTE( V1 )     ((BYTE)((V1) & 0xFF))

/*********************************** ID ***************************************
 
 USB_VID  -> This VID is registered under Megawin Technology Co., Ltd. at USB-IF.
             Any third party needs the written approval from Megawin in order to
             use this VID.
 
*******************************************************************************/
#define    USB_VID          0xE6A
#define    USB_PID          0x317
#define    USB_DID          0x106


#define    MF_STRING                             // Supported Manufacture String
#define    PD_STRING                             // Supported Product String
//#define    SN_STRING                             // Supported SerialNumber String


typedef struct
   { BYTE Suspend : 1;
     BYTE Reset : 1;
     BYTE WakeUp : 1;
     BYTE EmuOK : 1;
     BYTE Res4 : 1;
     BYTE Res5 : 1;
     BYTE Res6 : 1;
     BYTE Res7 : 1;
   } USBEVENT;