比如目前感觉按键有点灵敏,想修改灵敏度,不知道这些参数要怎么修改,比如那个阈值{35,30}改如何修改 ,还是默认充电时间是否可以修改 ,是改大点就没那么灵敏吗?
uint16_t TKY_BaseLine[MAX_QUEUE_NUM] = {0};//存放库初始化之前校准的基线值
TKY_CHARGE_S TKY_ChargeTime_s[MAX_QUEUE_NUM]? = {0};//存放库初始化之前校准的充电时间
const UINT8 TKY_ChargeTime[MAX_QUEUE_NUM] = {2,2,2,2,2,2,2,2,2,2,2,2};//默认的充电参数,当校准失败后使用该参数初始化触摸库
//将CH582的GPIO口按照ADC通道序列进行了排序,不要动
const uint32_t TKY_Pin[ 14 ] = {
??? GPIO_Pin_4, GPIO_Pin_5, GPIO_Pin_12, GPIO_Pin_13,GPIO_Pin_14, GPIO_Pin_15, GPIO_Pin_3,
??? GPIO_Pin_2, GPIO_Pin_1, GPIO_Pin_0,GPIO_Pin_6, GPIO_Pin_7, GPIO_Pin_8, GPIO_Pin_9
};
//触摸按键检测序列,数组中值为ADC通道号
const UINT8 TKY_ChannelQueue[ MAX_QUEUE_NUM ] = {
??? 9, 10, 1, 6, 7, 8, 5, 4, 3, 12, 2, 11
};
//触摸按键触发阈值,按照检测序列对应,此处应当按照各个通道的差异性设置不同的阈值
const TKY_CHANNEL_THRESHOLD TouchKeyChannelThreshold[ MAX_QUEUE_NUM ] = {
??? {35,30},{35,30},{35,30},
??? {35,30},{35,30},{35,30},
??? {35,30},{35,30},{35,30},
??? {35,30},{35,30},{35,30}
};