#ifndef _BUTTON_H_
#define _BUTTON_H_

//KEY PIN



#define     BUTTON_KNOB_NOACT		0
#define     BUTTON_KNOB_LEFT		1
#define     BUTTON_KNOB_RIGHT		2

#define     BUTTON_DOWN_NOACT		0
#define     BUTTON_DOWN_SHORT		1
#define     BUTTON_DOWN_LONG		2

typedef struct{
    INT8U LeftTurnNowSts ;
    INT8U LeftTurnOldSts  ;
    INT8U RightTurnNowSts;
    INT8U RightTurnOldSts;
    INT16U	PushTime;

    INT8U PushSts       ; 
    INT8U KnobSts       ;
    INT8U DownSts       ;
    
}_ButtonSts;

extern _ButtonSts ButtonSts;

void Button_Init(void);
void Button_Sleep_Init(void);
void Button_Down_Pro(void);
INT8U Get_Button_Knob_Status(void);
INT8U Get_Button_Down_Status(void);
void Button_Service(void);
extern void LongTimeNoKeyTmCntReset(void );

#endif