diff options
Diffstat (limited to 'firmware/target/coldfire/iaudio/m3/button-target.h')
-rw-r--r-- | firmware/target/coldfire/iaudio/m3/button-target.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/m3/button-target.h b/firmware/target/coldfire/iaudio/m3/button-target.h new file mode 100644 index 0000000000..d273766c31 --- /dev/null +++ b/firmware/target/coldfire/iaudio/m3/button-target.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Jens Arnold | ||
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 | #ifndef _BUTTON_TARGET_H_ | ||
21 | #define _BUTTON_TARGET_H_ | ||
22 | |||
23 | #include <stdbool.h> | ||
24 | #include "config.h" | ||
25 | |||
26 | #define HAS_BUTTON_HOLD | ||
27 | #define HAS_REMOTE_BUTTON_HOLD | ||
28 | |||
29 | bool button_hold(void); | ||
30 | bool remote_button_hold(void); | ||
31 | void button_init_device(void); | ||
32 | int button_read_device(void); | ||
33 | |||
34 | /* iaudio M3 specific button codes */ | ||
35 | |||
36 | /* Main unit's buttons */ | ||
37 | #define BUTTON_PLAY 0x00000001 | ||
38 | |||
39 | #define BUTTON_LEFT 0x00000002 | ||
40 | #define BUTTON_RIGHT 0x00000004 | ||
41 | #define BUTTON_VOL_UP 0x00000008 | ||
42 | #define BUTTON_VOL_DOWN 0x00000010 | ||
43 | |||
44 | #define BUTTON_MODE 0x00000020 | ||
45 | #define BUTTON_REC 0x00000040 | ||
46 | |||
47 | |||
48 | #define BUTTON_MAIN (BUTTON_PLAY|BUTTON_LEFT|BUTTON_RIGHT\ | ||
49 | |BUTTON_VOL_UP|BUTTON_VOL_DOWN|BUTTON_MODE|BUTTON_REC) | ||
50 | |||
51 | /* Remote control's buttons */ | ||
52 | #define BUTTON_RC_PLAY 0x00100000 | ||
53 | |||
54 | #define BUTTON_RC_REW 0x00080000 | ||
55 | #define BUTTON_RC_FF 0x00040000 | ||
56 | #define BUTTON_RC_VOL_UP 0x00020000 | ||
57 | #define BUTTON_RC_VOL_DOWN 0x00010000 | ||
58 | |||
59 | #define BUTTON_RC_REC 0x00008000 | ||
60 | #define BUTTON_RC_MENU 0x00004000 | ||
61 | #define BUTTON_RC_MODE 0x00002000 | ||
62 | |||
63 | #define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN\ | ||
64 | |BUTTON_RC_REW|BUTTON_RC_FF\ | ||
65 | |BUTTON_RC_REC|BUTTON_RC_MENU|BUTTON_RC_MODE) | ||
66 | |||
67 | #define POWEROFF_BUTTON BUTTON_PLAY | ||
68 | #define RC_POWEROFF_BUTTON BUTTON_RC_PLAY | ||
69 | #define POWEROFF_COUNT 30 | ||
70 | |||
71 | #endif /* _BUTTON_TARGET_H_ */ | ||