struct key_dev
{
unsigned char status; /* state machine status */
unsigned char num; /* number */
unsigned short count_ms; /* ms counter */
unsigned short long_click_ms; /* long click check min time */
unsigned short shake_filter_ms; /* shake filter time */
unsigned short max_dclick_ms; /* double click max interval time */
unsigned short continue_send_ms; /* after long, continue send interval */
unsigned char (*read_key)(void); /* key read pin status function pointer*/
};
/******************************************************************************
User Interface [START]
*******************************************************************************/
/******************************************************************************
User Interface [END]
*******************************************************************************/
/**
description : double cilck check. we consider double click event if key pressed
down when after short click up and within max double click interval
param : key_dev - key device pointer
retval : None
author : huohongpeng
data : 2017-03-02
*/
static void key_status_double_check(struct key_dev *key_dev)
{
unsigned char key_read;
/******************************************************************************
User Interface [START]
*******************************************************************************/
/******************************************************************************
User Interface [END]
*******************************************************************************/
void key_check_all_loop_1ms(void);
unsigned short key_read_value(void);