blob: 260c3665ecf30a50822fcb838e4d47d1658b4d82 [file] [log] [blame]
/*
* (C) Copyright 2016, ZIXC Corporation.
*
*/
#ifndef __ZX2975XX_KEY_H__
#define __ZX2975XX_KEY_H__
/*µç·ԭÀíͼÉÏ£¬µÍµçƽʱ£¬reset/wifi¼ü°´Ï£¬power¼ü̧Æð£»¸ßµçƽʱ£¬reset/wifi¼ü̧Æð£¬power¼ü°´ÏÂ*/
typedef enum key_status
{
KEY_PRESS = 0, //°´ÏÂ
KEY_RELEASE = 1, //̧Æð
PWR_KEY_LONG_PRESS = 2, //power¼üΪ³¤°´×´Ì¬
}keys_status;
typedef enum key_type
{
KEYS_RESET = 0,
KEYS_WIFI = 1,
KEYS_POWER_ON = 2,
}keys_type;
typedef enum
{
KEY_POWER = 1,
KEY_VOL_UP = 2,
KEY_VOL_DOWER = 3,
UNKNOW_KEY
}key_t;
/*=========================================
* Fun: key module initial
* return: 0: success
*=========================================*/
int key_initial(void);
/*=========================================
* Fun: Test key's status
* return: 0: KEY_PRESS, 1: KEY_RELEASE
*=========================================*/
int key_is_pressed(keys_type key);
#endif /* __ZX2975XX_KEY_H__ */