D2: Implement HAS_BUTTON_HOLD.
[kugel-rb.git] / firmware / target / arm / tcc780x / cowond2 / button-target.h
blob1ce602a30ddba79405510a9b859a98ff05869716
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Rob Purchase
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _BUTTON_TARGET_H_
21 #define _BUTTON_TARGET_H_
23 #include <stdbool.h>
24 #include "config.h"
26 #define HAS_BUTTON_HOLD
28 bool button_hold(void);
29 void button_init_device(void);
30 int button_read_device(void);
32 /* Main unit's buttons */
33 #define BUTTON_POWER 0x00000001
34 #define BUTTON_PLUS 0x00000002
35 #define BUTTON_MINUS 0x00000004
36 #define BUTTON_MENU 0x00000008
38 /* Faked buttons based on touchscreen quadrants (not yet read) */
39 #define BUTTON_UP 0x00000020
40 #define BUTTON_DOWN 0x00000040
41 #define BUTTON_LEFT 0x00000080
42 #define BUTTON_RIGHT 0x00000100
43 #define BUTTON_SELECT 0x00000200
45 #define BUTTON_MAIN 0x3FF
47 /* No remote */
48 #define BUTTON_REMOTE 0
50 /* Software power-off */
51 #define POWEROFF_BUTTON BUTTON_POWER
52 #define POWEROFF_COUNT 40
54 #endif /* _BUTTON_TARGET_H_ */