#ifndef  _MAIN_H_
#define  _MAIN_H_
#include <cms.h>

/*******************************************************
					IO定义				  
********************************************************/
#define		KEY1		RB5
#define		KEY2		RB4

#define		LED_R		RB3
#define		LED_G		RB2

#define		FAN			RA7

#define		RED			RA4
#define		GREEN		RA3
#define		BLUE		RA5

#define		BUZ			RA6

#define 	Set_Buz_On 		   BUZ = !BUZ  //交流蜂鸣器
#define 	Set_Buz_Off  	   BUZ=0         //蜂鸣器关闭,降低功耗
/*******************************************************
					全局变量定义				  
********************************************************/
unsigned char	tcount,mode,pwmsett;
unsigned char	kcount,keycn,kold,keyc,keyf,keycl,kdata;
unsigned char   secl,sech,errcl,ssech;
unsigned int    secm,ssecl;

unsigned char   lmode;

volatile unsigned char 	BuzzerTime,Rbeep;

//RGB
unsigned char R_Data,G_Data,B_Data;
unsigned char LED_Time_ms,Pwm_cycle,led_type;
#define	  LED_cycle   200
/*******************位定义******************************/
volatile bit normal;
volatile bit errff,errf,ewwf,onoff,wonf,wipeeef,testoff;
volatile bit f_SS_RED,f_SD_RED,f_SD_BLUE;
unsigned char	kcount,keycn,kold,keyc,keyf,keycl,kdata;

//RGB
volatile bit Ledholdf,PWM_fh;
#endif














