static u8 key_double_click_cnt = 0; if (TASK_BT == task_ctl.work_sta) { if (key_double_click_cnt > 0) { //雙擊超時計時. key_double_click_cnt--; } if(1 == ke ...
static u8 key_double_click_cnt = 0;
if (TASK_BT == task_ctl.work_sta) {
if (key_double_click_cnt > 0) { //雙擊超時計時.
key_double_click_cnt--;
}
if(1 == key_double_click_cnt) {
return DOUBLE_CLICK_KEY;
}
if(DOUBLE_CLICK_KEY == key_val) {
if(key_double_click_cnt) {
key_double_click_cnt = 0;
return DOUBLE_KEY_2CLICK;
} else {
key_double_click_cnt = 400/5; 判斷雙擊時間,
return NO_KEY;
}
}
}
return key_val;