KT24-1110_65E-HA-651B/include_lib/driver/cpu/br25/asm/plcnt.h
2024-11-10 18:44:17 +08:00

31 lines
1.0 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _PLCNT_DRV_H_
#define _PLCNT_DRV_H_
#define TOUCH_KEY_CH_MAX 3
typedef struct _CTM_KEY_VAR {
s32 touch_release_buf[TOUCH_KEY_CH_MAX]; //按键释放值滤波器buffer
u16 touch_cnt_buf[TOUCH_KEY_CH_MAX]; //按键计数值滤波器buffer
s16 FLT1CFG1; //滤波器1配置参数1
s16 FLT1CFG2; //滤波器1配置参数2, 等于(-RELEASECFG0)<<FLT1CFG0
s16 PRESSCFG; //按下判决门限
s16 RELEASECFG0; //释放判决门限0
s16 RELEASECFG1; //释放判决门限1
s8 FLT0CFG; //滤波器0配置参数(0/1/2/3)
s8 FLT1CFG0; //滤波器1配置参数0
u16 touch_key_state; //按键状态标志,随时可能被中断改写,按键处理程序需要将此标志复制出来再行处理
u8 touch_init_cnt[TOUCH_KEY_CH_MAX]; //初始化计数器非0时进行初始化
} sCTM_KEY_VAR;
/* =========== pclcnt API ============= */
//plcnt 初始化
int plcnt_init(void *_data);
//获取plcnt按键状态
u8 get_plcnt_value(void);
#endif /* _PLCNT_DRV_H_ */