diff options
Diffstat (limited to 'firmware/target/coldfire/iriver/button-target.h')
-rw-r--r-- | firmware/target/coldfire/iriver/button-target.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iriver/button-target.h b/firmware/target/coldfire/iriver/button-target.h new file mode 100644 index 0000000000..b89761b317 --- /dev/null +++ b/firmware/target/coldfire/iriver/button-target.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Jonathan Gordon | ||
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 | /* Custom written for the Hxxx */ | ||
21 | |||
22 | #ifndef _BUTTON_TARGET_H_ | ||
23 | #define _BUTTON_TARGET_H_ | ||
24 | |||
25 | #include <stdbool.h> | ||
26 | #include "config.h" | ||
27 | |||
28 | #define HAS_BUTTON_HOLD | ||
29 | #define HAS_REMOTE_BUTTON_HOLD | ||
30 | |||
31 | bool button_hold(void); | ||
32 | bool remote_button_hold(void); | ||
33 | bool remote_button_hold_only(void); | ||
34 | void button_init_device(void); | ||
35 | int button_read_device(void); | ||
36 | |||
37 | /* iRiver H100/H300 specific button codes */ | ||
38 | |||
39 | /* Main unit's buttons */ | ||
40 | #define BUTTON_ON 0x00000001 | ||
41 | #define BUTTON_OFF 0x00000002 | ||
42 | |||
43 | #define BUTTON_LEFT 0x00000004 | ||
44 | #define BUTTON_RIGHT 0x00000008 | ||
45 | #define BUTTON_UP 0x00000010 | ||
46 | #define BUTTON_DOWN 0x00000020 | ||
47 | |||
48 | #define BUTTON_REC 0x00000040 | ||
49 | #define BUTTON_MODE 0x00000080 | ||
50 | |||
51 | #define BUTTON_SELECT 0x00000100 | ||
52 | |||
53 | #define BUTTON_MAIN (BUTTON_ON|BUTTON_OFF|BUTTON_LEFT|BUTTON_RIGHT|\ | ||
54 | BUTTON_UP|BUTTON_DOWN|BUTTON_REC|BUTTON_MODE|BUTTON_SELECT) | ||
55 | |||
56 | /* Remote control's buttons */ | ||
57 | #define BUTTON_RC_ON 0x00100000 | ||
58 | #define BUTTON_RC_STOP 0x00080000 | ||
59 | |||
60 | #define BUTTON_RC_REW 0x00040000 | ||
61 | #define BUTTON_RC_FF 0x00020000 | ||
62 | #define BUTTON_RC_VOL_UP 0x00010000 | ||
63 | #define BUTTON_RC_VOL_DOWN 0x00008000 | ||
64 | |||
65 | #define BUTTON_RC_REC 0x00004000 | ||
66 | #define BUTTON_RC_MODE 0x00002000 | ||
67 | |||
68 | #define BUTTON_RC_MENU 0x00001000 | ||
69 | |||
70 | #define BUTTON_RC_BITRATE 0x00000800 | ||
71 | #define BUTTON_RC_SOURCE 0x00000400 | ||
72 | |||
73 | #define BUTTON_REMOTE (BUTTON_RC_ON|BUTTON_RC_STOP|BUTTON_RC_REW|BUTTON_RC_FF\ | ||
74 | |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN|BUTTON_RC_REC\ | ||
75 | |BUTTON_RC_MODE|BUTTON_RC_MENU|BUTTON_RC_BITRATE\ | ||
76 | |BUTTON_RC_SOURCE) | ||
77 | |||
78 | #define POWEROFF_BUTTON BUTTON_OFF | ||
79 | #define POWEROFF_COUNT 10 | ||
80 | |||
81 | #endif /* _BUTTON_TARGET_H_ */ | ||