changeset 138:385841ccb7f8

.../kpd/board/kpd_scan_functions.c: support Mot C1xx and Pirelli keypads
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 08 Oct 2016 05:31:43 +0000
parents 1974d7cacf84
children 3e16c8832c0e
files src/cs/drivers/drv_app/kpd/board/kpd_scan_functions.c
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/kpd/board/kpd_scan_functions.c	Sat Oct 08 05:15:48 2016 +0000
+++ b/src/cs/drivers/drv_app/kpd/board/kpd_scan_functions.c	Sat Oct 08 05:31:43 2016 +0000
@@ -19,6 +19,7 @@
  * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved
  */
 #include "board.cfg"
+#include "fc-target.cfg"
 
 #include "nucleus.h" /* used for HISR */
 
@@ -90,12 +91,33 @@
    #define KP_COLS      5
    const T_KPD_PHYSICAL_KEY_ID keypad_layout[KP_ROWS][KP_COLS]=
    {                           
+#ifdef CONFIG_TARGET_COMPAL
+   /* Mot C1xx keypad */
+   {KPD_PKEY_GREEN, KPD_PKEY_3,          KPD_PKEY_2,         KPD_PKEY_1,
+	KPD_PKEY_NULL},
+   {KPD_PKEY_UP,    KPD_PKEY_6,          KPD_PKEY_5,         KPD_PKEY_4,
+	KPD_PKEY_NULL},
+   {KPD_PKEY_DOWN,  KPD_PKEY_9,          KPD_PKEY_8,         KPD_PKEY_7,
+	KPD_PKEY_NULL},
+   {KPD_PKEY_LEFT,  KPD_PKEY_DIESE,      KPD_PKEY_0,         KPD_PKEY_STAR,
+	KPD_PKEY_NULL},
+   {KPD_PKEY_RIGHT, KPD_PKEY_SOFT_RIGHT, KPD_PKEY_NAV_CENTER,KPD_PKEY_SOFT_LEFT,
+	KPD_PKEY_NULL},
+#elif defined(CONFIG_TARGET_PIRELLI)
+   /* Pirelli's keypad */
+   {KPD_PKEY_NAV_CENTER, KPD_PKEY_LEFT,       KPD_PKEY_RIGHT, KPD_PKEY_UP,    KPD_PKEY_NULL},
+   {KPD_PKEY_SOFT_LEFT,  KPD_PKEY_SOFT_RIGHT, KPD_PKEY_GREEN, KPD_PKEY_DOWN,  KPD_PKEY_VOL_UP},
+   {KPD_PKEY_3,          KPD_PKEY_6,          KPD_PKEY_9,     KPD_PKEY_DIESE, KPD_PKEY_VOL_DOWN},
+   {KPD_PKEY_2,          KPD_PKEY_5,          KPD_PKEY_8,     KPD_PKEY_0,     KPD_PKEY_REC},
+   {KPD_PKEY_1,          KPD_PKEY_4,          KPD_PKEY_7,     KPD_PKEY_STAR,  KPD_PKEY_NULL},
+#else
    /* Layout of D-Sample and E-Sample */
    {KPD_PKEY_GREEN, KPD_PKEY_VOL_DOWN, KPD_PKEY_VOL_UP,KPD_PKEY_SOFT_LEFT,  KPD_PKEY_LEFT},
    {KPD_PKEY_1,     KPD_PKEY_2,        KPD_PKEY_3,     KPD_PKEY_REC,        KPD_PKEY_RIGHT},
    {KPD_PKEY_4,     KPD_PKEY_5,        KPD_PKEY_6,     KPD_PKEY_SOFT_RIGHT, KPD_PKEY_UP},
    {KPD_PKEY_7,     KPD_PKEY_8,        KPD_PKEY_9,     KPD_PKEY_NULL,       KPD_PKEY_DOWN},
    {KPD_PKEY_STAR,  KPD_PKEY_0,        KPD_PKEY_DIESE, KPD_PKEY_NULL,       KPD_PKEY_NAV_CENTER},
+#endif
    };
 #endif