63 lines
1.7 KiB
C
63 lines
1.7 KiB
C
/*
|
|
******************************************************************************
|
|
*
|
|
* @file key.h
|
|
* @brief key module
|
|
* @ic sy8835
|
|
*
|
|
* @version 1.0
|
|
* @date 2024/11/01 09:59:40
|
|
* @author Alex Xu
|
|
*
|
|
* Copyright (c) 2013-2099,Tkplusemi Technology Co.,Ltd.
|
|
* All Rights Reserved
|
|
*
|
|
* History:
|
|
* Revision Date Author Desc
|
|
* 1.0.0 2024/11/01 Alex build this file
|
|
******************************************************************************
|
|
*/
|
|
|
|
#ifndef __KEY_H__
|
|
#define __KEY_H__
|
|
|
|
/*_____ I N C L U D E S ____________________________________________________*/
|
|
|
|
#include "define.h"
|
|
|
|
/******************************************************************************\
|
|
Macro definitions
|
|
\******************************************************************************/
|
|
|
|
/******************************************************************************\
|
|
Variables definitions
|
|
\******************************************************************************/
|
|
|
|
#if KEY_ENABLE
|
|
|
|
extern bit Key_Press_short_irq;
|
|
extern bit Key_Press_l_irq;
|
|
extern bit Key_Press_ll_irq;
|
|
|
|
extern bit Key_l_Flag;
|
|
|
|
typedef enum {
|
|
KEY_EVENT_Empty = 0x00,
|
|
KEY_EVENT_SHORT, //Key short press(60ms-1s) interrupt flag
|
|
KEY_EVENT_L_2S, //Key long press for 2/3s interrupt flag
|
|
KEY_EVENT_LL_8S, //Key super long press for 8s interrupt flag
|
|
}KEY_EVENT_E;
|
|
|
|
extern idata KEY_EVENT_E Event_key;
|
|
|
|
/******************************************************************************\
|
|
Functions definitions
|
|
\******************************************************************************/
|
|
|
|
extern void Key_Handler(void );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|