]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/asm-arm/arch-mx51/keypad.h
applied patches from Freescale and Ka-Ro
[karo-tx-uboot.git] / include / asm-arm / arch-mx51 / keypad.h
1 /*
2  * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the MX51-3Stack Freescale board.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19  * MA 02111-1307 USA
20  */
21
22 #ifndef _MXC_KEYPAD_H_
23 #define _MXC_KEYPAD_H_
24
25 #include <config.h>
26
27 #define KEY_1                   2
28 #define KEY_2                   3
29 #define KEY_3                   4
30 #define KEY_F1                  59
31 #define KEY_UP                  103
32 #define KEY_F2                  60
33
34 #define KEY_4                   5
35 #define KEY_5                   6
36 #define KEY_6                   7
37 #define KEY_LEFT                105
38 #define KEY_SELECT              0x161
39 #define KEY_RIGHT               106
40
41 #define KEY_7                   8
42 #define KEY_8                   9
43 #define KEY_9                   10
44 #define KEY_F3                  61
45 #define KEY_DOWN                108
46 #define KEY_F4                  62
47
48 #define KEY_0                   11
49 #define KEY_OK                  0x160
50 #define KEY_ESC                 1
51 #define KEY_ENTER               28
52 #define KEY_MENU                139     /* Menu (show menu) */
53 #define KEY_BACK                158     /* AC Back */
54
55 #if defined(CONFIG_MX51_BBG)
56 #define TEST_HOME_KEY_DEPRESS(k, e)  (((k) == (KEY_F1)) && (((e) == (KDepress))))
57 #define TEST_POWER_KEY_DEPRESS(k, e) (((k) == (KEY_F3)) && (((e) == (KDepress))))
58 #elif defined(CONFIG_MX51_3DS)
59 #define TEST_HOME_KEY_DEPRESS(k, e)  (((k) == (KEY_MENU)) && (((e) == (KDepress))))
60 #define TEST_POWER_KEY_DEPRESS(k, e) (((k) == (KEY_F2)) && (((e) == (KDepress))))
61 #else
62 # error Undefined board type!
63 #endif
64
65 #endif