/*
 * data.h
 *
 *  Created on: 2016-4-11
 *      Author: Administrator
 */

#ifndef DATA_H_
#define DATA_H_






extern BitUnion Flag;
#define WorkOn			Flag.OneBit.b0
#define data_ok			Flag.OneBit.b1
#define LongKeyFlag		Flag.OneBit.b2
#define ShortKeyFlag	Flag.OneBit.b3
#define KeyReadFlag		Flag.OneBit.b4
#define WorkOffFlag		Flag.OneBit.b5
#define	LongKeycacFlag	Flag.OneBit.b6
#define	LongKeycacReadFlag	Flag.OneBit.b7

extern	BitUnion	AlarmFlag;
#define NoWaterFlag			AlarmFlag.OneBit.b0	// 1-无水标志
#define V_NoWater			AlarmFlag.OneBit.b1	// 2-电压大于某个值，无水
#define I_NoWater			AlarmFlag.OneBit.b2	// 4-电流小于某个值，无水，用于判断工作中或上电雾化片断路
#define Rate_V_NoWater		AlarmFlag.OneBit.b3	// 8-电压斜率检水
#define _Rate_V_NoWater		AlarmFlag.OneBit.b4	//16-负电压斜率检水
#define B_Rate_V_NoWater	AlarmFlag.OneBit.b5	//32-大电压斜率检水，用于判断工作中雾化片断路
#define Num_NoWater			AlarmFlag.OneBit.b6	//64-超调判断

extern	uint		CurrentAdjustNum;
extern	uint KeyDownNum;
//extern	uchar KeyUpNum;
extern	uchar Time20MScnt;
extern	uchar	V_NoWatercnt;
extern	uchar	AdjustOvercnt;
extern	uchar	NoWaterTimecnt;
extern	uchar  main_cnt;
extern	uchar 	SubNum;
extern	unsigned long AD_temp_V;
extern	unsigned long AD_temp_I;
extern	uint AD_V;
extern	uint AD_I;
extern	uint AD_cnt;
extern	uchar Power;
extern	uint	LEDFre;
extern  uchar	CurrentShortCnt;
extern	uchar	I_NoWatercnt;
extern uchar    cnt;			//校正计数器

extern uchar keycnt;
extern uchar keycnttime;

#endif /* DATA_H_ */
