/*******************************************************************************
|
* File Name : Key.h
|
* Description :
|
* Created on : 2020Äê11ÔÂ10ÈÕ
|
* Author : www.hido-studio.com
|
*******************************************************************************/
|
|
#ifndef FML_KEY_H_
|
#define FML_KEY_H_
|
/*******************************************************************************
|
* Include Files *
|
*******************************************************************************/
|
#include "HIDO_TypeDef.h"
|
|
/*******************************************************************************
|
* Macro *
|
*******************************************************************************/
|
|
/*******************************************************************************
|
* Type Definition *
|
*******************************************************************************/
|
typedef enum
|
{
|
KEY_ID_LEFT = 0,
|
KEY_ID_RIGHT,
|
|
KEY_ID_MAX,
|
}E_KeyID;
|
|
typedef enum
|
{
|
KEY_EVENT_UP,
|
KEY_EVENT_DOWN,
|
KEY_EVENT_DOWN_3S,
|
|
KEY_EVENT_MAX,
|
}E_KeyEvent;
|
|
/*******************************************************************************
|
* Global Function *
|
*******************************************************************************/
|
void Key_EventFromISR(E_KeyID _eID, E_KeyEvent _eEvent);
|
void Key_10MsISR(void);
|
HIDO_INT32 Key_PinRegister(E_KeyID _eID, HIDO_VOID *_pGPIO, HIDO_UINT16 _u16Pin, HIDO_UINT16 _u16Press);
|
HIDO_INT32 Key_TimerRegister(HIDO_VOID *_pTimerHandle);
|
HIDO_INT32 Key_Init(void);
|
|
#endif /* FML_KEY_H_ */
|