
#ifndef __HS_KEY_H_
#define __HS_KEY_H_


#include "common.h"







#define KEY_SELECT		0
#define KEY_UP			1
#define KEY_DOWN		3
#define KEY_BACK		2




typedef struct tsHSKey{
	unsigned char onFlag;
	unsigned char softRelease;
	unsigned char pressedSec;
	unsigned int  pressTime;
	unsigned int  longPressTimeOne;
	unsigned int  longPressTimeKeep;
	unsigned int  prevTime;


}HSKey;






void ReadKEY(void);
void KeyInit(void);




void KeySelectPressed(void);
void KeySelectReleased(void);
void KeySelectLongPressedOne(void);
void KeySelectLongPressedKeep(void);

void KeyUpPressed(void);
void KeyUpReleased(void);
void KeyUpLongPressedOne(void);
void KeyUpLongPressedKeep(void);


void KeyDownPressed(void);
void KeyDownReleased(void);
void KeyDownLongPressedOne(void);
void KeyDownLongPressedKeep(void);


void KeyBackPressed(void);
void KeyBackReleased(void);
void KeyBackLongPressedOne(void);
void KeyBackLongPressedKeep(void);


#endif 
