FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/kpd/board/kpd_scan_functions.c @ 280:82665effff30
keypad boot init overhaul: handle initially held-down keys
This change fixes two previous behavioural defects:
1) On Compal phones, the PWR key had to be released before the boot
sequence would proceed at all - it was stuck in an endless IRQ loop
at the point of Nucleus enabling interrupts, before anything else.
2) On both Compal and sane platforms including Luna, if some regular
non-PWR key was held down at boot time, the boot sequence would
proceed and complete normally, but all non-PWR keypad buttons would
be dead for the remainder of that boot cycle.
The fix is a generic solution - no Compal-specific hack ended up being
needed for the special case of their idiotic PWON-to-ROW4 hw wiring.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 24 Sep 2021 00:47:12 +0000 |
parents | 4dd30fac5933 |
children |
comparison
equal
deleted
inserted
replaced
279:4dd30fac5933 | 280:82665effff30 |
---|---|
9 */ | 9 */ |
10 | 10 |
11 /* | 11 /* |
12 * History: | 12 * History: |
13 * | 13 * |
14 * Date Author Modification | 14 * Date Author Modification |
15 * ------------------------------------ | 15 * ------------------------------------ |
16 * 10/10/2001 L Sollier Create | 16 * 10/10/2001 L Sollier Create |
17 * | 17 * |
18 * | 18 * |
19 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved | 19 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved |
20 */ | 20 */ |
21 #include "board.cfg" | 21 #include "board.cfg" |
272 /* Debouncing time = 64ms */ | 272 /* Debouncing time = 64ms */ |
273 kpd_set_debouncing_time(0x3F); | 273 kpd_set_debouncing_time(0x3F); |
274 | 274 |
275 #endif | 275 #endif |
276 | 276 |
277 /* | |
278 * FreeCalypso change: we remove keypad interrupt unmasking | |
279 * from this point in the boot process, and instead our call | |
280 * to kpd_wait_for_key_release() at the beginning of kpd_core() | |
281 * will unmask interrupts after getting to a clear state first. | |
282 */ | |
283 #if 0 | |
277 /* Activate all outputs */ | 284 /* Activate all outputs */ |
278 *(volatile UINT16*) KP_COL_OUT = KP_ALL_ON; | 285 *(volatile UINT16*) KP_COL_OUT = KP_ALL_ON; |
279 | 286 |
280 /* Unmask keypad interrupt */ | 287 /* Unmask keypad interrupt */ |
281 #if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41)) | 288 #if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41)) |
283 #elif (CHIPSET == 12) | 290 #elif (CHIPSET == 12) |
284 F_INTH_ENABLE_ONE_IT(C_INTH_KEYBOARD_IT); | 291 F_INTH_ENABLE_ONE_IT(C_INTH_KEYBOARD_IT); |
285 #else | 292 #else |
286 IQ_Unmask (IQ_ARMIO); | 293 IQ_Unmask (IQ_ARMIO); |
287 #endif | 294 #endif |
295 #endif | |
288 } | 296 } |
289 | 297 |
290 | 298 |
291 | 299 |
292 /** | 300 /** |