summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/button.h')
-rw-r--r--firmware/drivers/button.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/firmware/drivers/button.h b/firmware/drivers/button.h
new file mode 100644
index 0000000000..a8cc71b875
--- /dev/null
+++ b/firmware/drivers/button.h
@@ -0,0 +1,54 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Daniel Stenberg
11 *
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.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include "config.h"
21
22void button_init (void);
23int button_get (void);
24
25/* Shared button codes */
26#define BUTTON_NONE 0x0000
27#define BUTTON_ON 0x0001
28#define BUTTON_UP 0x0010
29#define BUTTON_DOWN 0x0020
30#define BUTTON_LEFT 0x0040
31#define BUTTON_RIGHT 0x0080
32
33/* Button modifiers */
34#define BUTTON_HELD 0x4000
35#define BUTTON_REL 0x8000
36
37
38#ifdef HAVE_RECORDER_KEYPAD
39
40/* Recorder specific button codes */
41#define BUTTON_OFF 0x0002
42#define BUTTON_PLAY 0x0004
43#define BUTTON_F1 0x0100
44#define BUTTON_F2 0x0200
45#define BUTTON_F3 0x0400
46
47#elif HAVE_PLAYER_KEYPAD
48
49/* Jukebox 6000 and Studio specific button codes */
50#define BUTTON_MENU 0x0002
51#define BUTTON_PLAY BUTTON_UP
52#define BUTTON_STOP BUTTON_DOWN
53
54#endif