#ifndef		_MAIN_H_
#define		_MAIN_H_

#include	<HS26P10.h> 

		
#define		OSCILLOSCOPE  	0
#define		UART  		1
#define		Send_MODE  	0



/* function <<==================================================*/
typedef bit			BOOL;			//布尔变量(位变量)

typedef unsigned char BYTE;			//无符号 字符变量

typedef unsigned char UCHAR8;		//无符号 字符变量
typedef unsigned char uchar8;		//无符号 字符变量
typedef unsigned int uint8;			//无符号 字符变量

typedef unsigned short U8;			//无符号 字符变量
typedef unsigned short u8;			//无符号 字符变量

typedef signed char char8;			//有符号 字符变量
typedef signed char CHAR8;			//有符号 字符变量

typedef signed short shart8;		//有符号 字符变量
typedef signed short SHART8;		//有符号 字符变量
typedef signed int int8;			//有符号 字符变量


typedef signed long WORD;			//有符号 16bit字符变量
typedef unsigned long UWORD;		//无符号 16bit字符变量

typedef unsigned long U16;			
typedef unsigned long u16;			

typedef signed long long DWORD;		 
typedef unsigned long long UDWORD;	 
typedef unsigned long long U32;		
typedef unsigned long long u32;		

typedef float	FLOAT;				//单精度浮点数(32bit)
typedef double	DOUBLE;				//双精度浮点数(32bit)
typedef long double	LDOUBLE;

/* function <<==================================================*/
#define HIBYTE(wval)		*(((BYTE*)(&wval))+1)//16-bit数据 高8位
#define LWBYTE(wval)		*(((BYTE*)(&wval))+0)//16-bit数据 低8位

#define HIWORD(wval)		*(((WORD*)(&wval))+1)//32-bit数据 高8位
#define LWWORD(wval)		*(((WORD*)(&wval))+0)//32-bit数据 低8位

/* function <<==================================================*/



#pragma code_address 0x0020 
unsigned long __ROM RollingCode[3]={0x01,0x02,0x03};


void __interrupt[0x08] inrserv(void);
void GPIO_init(void);
void BANK0_RAM_CLR(void);
void DELAY_US(unsigned char DELAY_CNT);
void __interrupt[0x08] inrserv(void);
unsigned long FindTable(unsigned long __ROM *p,unsigned int count);
void SendDATE_test(u8 TX_DATE);
void DELAY_104us(void);




#endif