
/*
******************************************************************************************************
 @Module        
 @Filename     .h
 @Project        
------------------------------------------------------------------------------------------------------
 @Controller     

 @Compiler       

 @ Frequency   Using external clock MHz

 @Codegenerator 0.1

 @Description   This file contains the CPU and compiler Specific.

------------------------------------------------------------------------------------------------------
 @Date          2013-03-15 15:15:00

******************************************************************************************************
*/


#ifndef _TYPEDEF_H_
#define _TYPEDEF_H_


/*
*********************************************************************************************************
 									@Macros
*********************************************************************************************************
*/





/*
********************************************************************************************************
									 @DEFINE LOGIC
********************************************************************************************************
*/

#ifdef TRUE	
#undef TRUE 
#endif

#ifdef FALSE 
#undef FALSE
#endif

#ifdef true
#undef true 
#endif

#ifdef false 
#undef false
#endif

typedef enum {
	FALSE=0,
	TRUE,
}BOOL;

typedef enum {
	false=0,
	true=1,
}bool;

typedef enum {
	
	FALLING_EDGE =0,
		
	RISING_EDGE=1,

	NO_CHANGE=2,
	
}EDGE;

#ifndef	FAIL
#define FAIL 1
#endif

#ifndef	SUCCESS
#define SUCCESS 0
#endif

#ifndef  LOGIC_LOW	
#define  LOGIC_LOW			0
#endif

#ifndef  LOGIC_HIGH		
#define  LOGIC_HIGH			1
#endif

#ifndef  HIGH_ACTIVE_ON		
#define   HIGH_ACTIVE_ON	1
#endif

#ifndef  LOW_ACTIVE_OFF		
#define   LOW_ACTIVE_OFF	0
#endif

#ifndef  LOW_ACTIVE_ON		
#define   LOW_ACTIVE_ON		0
#endif

#ifndef  HIGH_ACTIVE_OFF		
#define   HIGH_ACTIVE_OFF	1
#endif

#define	SET_LOW			0
#define	SET_HIGH			1

#define CONTINUE			0
#define COMPLETE			1

#define ENABLE_             	1
#define DISABLE_            	0

//#define NULL				0
/*
*********************************************************************************************************
									@Typedefs
*********************************************************************************************************
*/

typedef unsigned char   BOOLEAN;
typedef unsigned char   INT8U;			/* Unsigned  8 bit quantity                                   */
typedef signed   char  	INT8S;                /* Signed    8 bit quantity                                     */
typedef unsigned int   	INT16U;             /* Unsigned 16 bit quantity                                   */
typedef signed   int   	INT16S;             /* Signed   16 bit quantity                                    */
typedef unsigned long   INT32U;            /* Unsigned 32 bit quantity                                   */
typedef signed   long  	INT32S;            /* Signed   32 bit quantity                                     */
typedef float          	FP32;                /* Single precision floating point                            */
typedef double         	FP64;                /* Double precision floating point                           */




#define UBYTE          	INT8U                    
            
#define UWORD          	INT16U
#define LONG           	INT32S
#define ULONG          	INT32U



//typedef signed char		S8;
//typedef signed int			S16;
//typedef signed long		S32;

//typedef signed char		s8;

//typedef signed int			s16;
//typedef signed long			s32;

//typedef unsigned char		U8;
//typedef unsigned int		U16;
//typedef ULONG				U32;
//typedef unsigned long long	U64;

//typedef unsigned char		u8;
//typedef unsigned int		u16;
typedef ULONG				u32;
//typedef unsigned long long	u64;

typedef unsigned char		BYTE;
typedef unsigned int		WORD;
typedef unsigned long		DWORD;




#endif	//_APP_CPU_H_

