36 lines
791 B
C
36 lines
791 B
C
#ifndef KEY_PROTOCOL_H
|
|
#define KEY_PROTOCOL_H
|
|
|
|
#include "tkc/types_def.h"
|
|
|
|
typedef struct
|
|
{
|
|
uint16_t keyCnt;
|
|
uint8_t flag_Pressed;
|
|
uint8_t flag_Reset;
|
|
}KEY_DAT;
|
|
#define KEY_NUMBERS 2
|
|
|
|
#define KEY_OFF 0
|
|
#define KEY_ON 1
|
|
|
|
#define KEY_SHORT_ON 1 //短按
|
|
#define KEY_LONG_ON 2 //长按
|
|
#define KEY_PRESS_HOLD 1 //按键识别次数
|
|
|
|
#define KEY_LONGPRESS_COUNTER 100 //每次timer时间*次数=长按键识别时间 150*20ms=3000ms
|
|
#define KEY_LLONGPRESS_COUNTER 500
|
|
|
|
#define IODELAY 10
|
|
// #define IODELAY 8
|
|
|
|
|
|
enum
|
|
{
|
|
LV_KEY_OPTION = 113, // 0x11
|
|
LV_KEY_SELECT = 119, // 0x12
|
|
LV_KEY_OTHER1 = 122, // 0x12
|
|
};
|
|
|
|
#endif
|