UP 模拟器 加入key的模拟支持
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#ifndef HW_LIB_KEY_H
|
||||
#ifndef HW_LIB_SIM_KEY_H
|
||||
#define HW_LIB_KEY_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -8,7 +8,7 @@ extern "C" {
|
||||
#include <string.h>
|
||||
|
||||
#define KEY_TICKS_INTERVAL 5 // 定时器间隔时间,单位为毫秒
|
||||
#define DEBOUNCE_TICKS 3 // 按键去抖动计数阈值,最大为7(0 ~ 7)
|
||||
#define DEBOUNCE_TICKS 0 // 按键去抖动计数阈值,最大为7(0 ~ 7)
|
||||
#define SHORT_TICKS (300 / KEY_TICKS_INTERVAL) // 短按阈值,单位为定时器间隔的倍数
|
||||
#define LONG_TICKS (1000 / KEY_TICKS_INTERVAL) // 长按阈值,单位为定时器间隔的倍数
|
||||
#define KEY_STOP_FREE 1 // 按键停止释放状态标识
|
||||
@@ -99,4 +99,4 @@ void key_ticks(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif //HW_LIB_KEY_H
|
||||
#endif //HW_LIB_SIM_KEY_H
|
||||
|
Reference in New Issue
Block a user