比如目前感覺按鍵有點(diǎn)靈敏,想修改靈敏度,不知道這些參數(shù)要怎么修改,比如那個閾值{35,30}改如何修改 ,還是默認(rèn)充電時間是否可以修改 ,是改大點(diǎn)就沒那么靈敏嗎?
uint16_t TKY_BaseLine[MAX_QUEUE_NUM] = {0};//存放庫初始化之前校準(zhǔn)的基線值
TKY_CHARGE_S TKY_ChargeTime_s[MAX_QUEUE_NUM]? = {0};//存放庫初始化之前校準(zhǔn)的充電時間
const UINT8 TKY_ChargeTime[MAX_QUEUE_NUM] = {2,2,2,2,2,2,2,2,2,2,2,2};//默認(rèn)的充電參數(shù),當(dāng)校準(zhǔn)失敗后使用該參數(shù)初始化觸摸庫
//將CH582的GPIO口按照ADC通道序列進(jìn)行了排序,不要動
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
};
//觸摸按鍵檢測序列,數(shù)組中值為ADC通道號
const UINT8 TKY_ChannelQueue[ MAX_QUEUE_NUM ] = {
??? 9, 10, 1, 6, 7, 8, 5, 4, 3, 12, 2, 11
};
//觸摸按鍵觸發(fā)閾值,按照檢測序列對應(yīng),此處應(yīng)當(dāng)按照各個通道的差異性設(shè)置不同的閾值
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}
};