blob: 260c3665ecf30a50822fcb838e4d47d1658b4d82 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*
2 * (C) Copyright 2016, ZIXC Corporation.
3 *
4 */
5
6#ifndef __ZX2975XX_KEY_H__
7#define __ZX2975XX_KEY_H__
8
9/*µç·ԭÀíͼÉÏ£¬µÍµçƽʱ£¬reset/wifi¼ü°´Ï£¬power¼ü̧Æð£»¸ßµçƽʱ£¬reset/wifi¼ü̧Æð£¬power¼ü°´ÏÂ*/
10typedef enum key_status
11{
12 KEY_PRESS = 0, //°´ÏÂ
13 KEY_RELEASE = 1, //̧Æð
14 PWR_KEY_LONG_PRESS = 2, //power¼üΪ³¤°´×´Ì¬
15}keys_status;
16
17typedef enum key_type
18{
19 KEYS_RESET = 0,
20 KEYS_WIFI = 1,
21 KEYS_POWER_ON = 2,
22}keys_type;
23
24typedef enum
25{
26 KEY_POWER = 1,
27 KEY_VOL_UP = 2,
28 KEY_VOL_DOWER = 3,
29 UNKNOW_KEY
30}key_t;
31
32/*=========================================
33* Fun: key module initial
34* return: 0: success
35*=========================================*/
36int key_initial(void);
37
38/*=========================================
39* Fun: Test key's status
40* return: 0: KEY_PRESS, 1: KEY_RELEASE
41*=========================================*/
42int key_is_pressed(keys_type key);
43
44#endif /* __ZX2975XX_KEY_H__ */