comparison src/cs/drivers/drv_app/kpd/kpd_physical_key_def.h @ 0:b6a5e36de839

src/cs: initial import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 04:39:26 +0000
parents
children 7409b22cac61
comparison
equal deleted inserted replaced
-1:000000000000 0:b6a5e36de839
1 /**
2 * @file kpd_physical_key_def.h
3 *
4 * Definition of physical key values available on keypad.
5 *
6 * @author Laurent Sollier (l-sollier@ti.com)
7 * @version 0.1
8 */
9
10 /*
11 * History:
12 *
13 * Date Author Modification
14 * ----------------------------------------
15 * 11/02/2001 L Sollier Create
16 *
17 *
18 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved
19 */
20
21 /** Definition of the physical key ID.
22 */
23
24 #ifndef _KPD_PHYSICAL_KEY_DEF_H_
25 #define _KPD_PHYSICAL_KEY_DEF_H_
26
27 #ifndef _WINDOWS
28 #include "config/board.cfg"
29 #include "config/fc-target.cfg"
30 #endif
31
32 /** Definition of the physical key ID.
33 */
34
35 #define KPD_PKEY_NULL (-1)
36
37 #define KPD_PKEY_0 (0)
38 #define KPD_PKEY_1 (1)
39 #define KPD_PKEY_2 (2)
40 #define KPD_PKEY_3 (3)
41 #define KPD_PKEY_4 (4)
42 #define KPD_PKEY_5 (5)
43 #define KPD_PKEY_6 (6)
44 #define KPD_PKEY_7 (7)
45 #define KPD_PKEY_8 (8)
46 #define KPD_PKEY_9 (9)
47 #define KPD_PKEY_UP (10)
48 #define KPD_PKEY_DOWN (11)
49 #define KPD_PKEY_SOFT_LEFT (12)
50 #define KPD_PKEY_SOFT_RIGHT (13)
51 #define KPD_PKEY_GREEN (14)
52 #define KPD_PKEY_RED (15)
53 #define KPD_PKEY_DIESE (16)
54 #define KPD_PKEY_STAR (17)
55
56 #if (BOARD == 40) || (BOARD == 41) || (BOARD == 42) || (BOARD == 43) || (defined _WINDOWS)
57
58 #define KPD_PKEY_VOL_UP (18)
59 #define KPD_PKEY_VOL_DOWN (19)
60 #define KPD_PKEY_LEFT (20)
61 #define KPD_PKEY_RIGHT (21)
62 #define KPD_PKEY_NAV_CENTER (22)
63 #define KPD_PKEY_REC (23)
64
65 #endif
66
67 #ifndef CONFIG_TARGET_COMPAL
68
69 /* The PWR key is mapped on Analog Base Band, it's the SPI which inform
70 the keypad that the PWR key is pressed, so the process for this key
71 is different of the others, a subscriber can be notified only by a
72 short press of the PWR key, even if this key has been set for a long press
73 or repeat press with the function kpd_define_repeat_keys. The following
74 #define allows to map any key with the PWR key. */
75 #define KPD_SHORT_PRESS_PWR_KEY KPD_PKEY_RED
76
77 #else
78
79 /*
80 * On C1xx phones the red key grounds not only the PWON signal to the ABB,
81 * but also row input line 4 of the regular keypad matrix. The latter
82 * results in the regular keypad interrupt being generated, so we have
83 * to handle it with the regular keys, not in TI's way. We disable the
84 * KPD_SHORT_PRESS_PWR_KEY mechanism by defining it to a key that does not
85 * exist on this keypad.
86 */
87
88 #define KPD_SHORT_PRESS_PWR_KEY KPD_PKEY_REC
89
90 #endif
91
92 #endif /* #ifndef _KPD_PHYSICAL_KEY_DEF_H_ */