FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/kpd/kpd_physical_key_def.h @ 446:bed6d393f3e0
C1xx targets: sensible handling of Compal's power key wiring
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 28 Jan 2018 19:26:10 +0000 |
parents | 945cf7f506b2 |
children | 92dbfa906f66 |
comparison
equal
deleted
inserted
replaced
445:399f3a5a5450 | 446:bed6d393f3e0 |
---|---|
24 #ifndef _KPD_PHYSICAL_KEY_DEF_H_ | 24 #ifndef _KPD_PHYSICAL_KEY_DEF_H_ |
25 #define _KPD_PHYSICAL_KEY_DEF_H_ | 25 #define _KPD_PHYSICAL_KEY_DEF_H_ |
26 | 26 |
27 #ifndef _WINDOWS | 27 #ifndef _WINDOWS |
28 #include "config/board.cfg" | 28 #include "config/board.cfg" |
29 #include "config/fc-target.cfg" | |
29 #endif | 30 #endif |
30 | 31 |
31 /** Definition of the physical key ID. | 32 /** Definition of the physical key ID. |
32 */ | 33 */ |
33 | 34 |
61 #define KPD_PKEY_NAV_CENTER (22) | 62 #define KPD_PKEY_NAV_CENTER (22) |
62 #define KPD_PKEY_REC (23) | 63 #define KPD_PKEY_REC (23) |
63 | 64 |
64 #endif | 65 #endif |
65 | 66 |
67 #ifndef CONFIG_TARGET_COMPAL | |
68 | |
66 /* The PWR key is mapped on Analog Base Band, it's the SPI which inform | 69 /* The PWR key is mapped on Analog Base Band, it's the SPI which inform |
67 the keypad that the PWR key is pressed, so the process for this key | 70 the keypad that the PWR key is pressed, so the process for this key |
68 is different of the others, a subscriber can be notified only by a | 71 is different of the others, a subscriber can be notified only by a |
69 short press of the PWR key, even if this key has been set for a long press | 72 short press of the PWR key, even if this key has been set for a long press |
70 or repeat press with the function kpd_define_repeat_keys. The following | 73 or repeat press with the function kpd_define_repeat_keys. The following |
71 #define allows to map any key with the PWR key. */ | 74 #define allows to map any key with the PWR key. */ |
72 #define KPD_SHORT_PRESS_PWR_KEY KPD_PKEY_RED | 75 #define KPD_SHORT_PRESS_PWR_KEY KPD_PKEY_RED |
73 | 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 | |
74 | 91 |
75 #endif /* #ifndef _KPD_PHYSICAL_KEY_DEF_H_ */ | 92 #endif /* #ifndef _KPD_PHYSICAL_KEY_DEF_H_ */ |