diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-07-27 13:27:31 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-07-27 13:27:31 +0000 |
commit | c849219370fd65be2167a24a9f06f03bc1284ac1 (patch) | |
tree | f86aecea35281ccd42a180c2a92a4b17fecfbcfc /firmware/target/coldfire/iaudio/x5/button-target.h | |
parent | 81537d49dfa871bbdd4cd83fee292b290ff3c980 (diff) | |
download | rockbox-c849219370fd65be2167a24a9f06f03bc1284ac1.tar.gz rockbox-c849219370fd65be2167a24a9f06f03bc1284ac1.zip |
Moved the X5 button driver to the target tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10339 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iaudio/x5/button-target.h')
-rwxr-xr-x | firmware/target/coldfire/iaudio/x5/button-target.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/button-target.h b/firmware/target/coldfire/iaudio/x5/button-target.h new file mode 100755 index 0000000000..998522fe15 --- /dev/null +++ b/firmware/target/coldfire/iaudio/x5/button-target.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Linus Nielsen Feltzing | ||
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 | #ifndef _BUTTON_TARGET_H_ | ||
20 | #define _BUTTON_TARGET_H_ | ||
21 | |||
22 | #include <stdbool.h> | ||
23 | #include "config.h" | ||
24 | |||
25 | #define HAS_BUTTON_HOLD | ||
26 | #define HAS_REMOTE_BUTTON_HOLD | ||
27 | |||
28 | bool button_hold(void); | ||
29 | bool remote_button_hold(void); | ||
30 | void button_init_device(void); | ||
31 | int button_read_device(void); | ||
32 | |||
33 | /* iaudio X5 specific button codes */ | ||
34 | |||
35 | /* Main unit's buttons */ | ||
36 | #define BUTTON_POWER 0x00000001 | ||
37 | #define BUTTON_REC 0x00000002 | ||
38 | |||
39 | #define BUTTON_LEFT 0x00000004 | ||
40 | #define BUTTON_RIGHT 0x00000008 | ||
41 | #define BUTTON_UP 0x00000010 | ||
42 | #define BUTTON_DOWN 0x00000020 | ||
43 | |||
44 | #define BUTTON_PLAY 0x00000040 | ||
45 | #define BUTTON_SELECT 0x00000080 | ||
46 | |||
47 | #define BUTTON_MAIN (BUTTON_POWER|BUTTON_PLAY|BUTTON_LEFT|BUTTON_RIGHT\ | ||
48 | |BUTTON_UP|BUTTON_DOWN|BUTTON_REC|BUTTON_SELECT) | ||
49 | |||
50 | /* Remote control's buttons */ | ||
51 | #define BUTTON_RC_PLAY 0x00100000 | ||
52 | |||
53 | #define BUTTON_RC_REW 0x00080000 | ||
54 | #define BUTTON_RC_FF 0x00040000 | ||
55 | #define BUTTON_RC_VOL_UP 0x00020000 | ||
56 | #define BUTTON_RC_VOL_DOWN 0x00010000 | ||
57 | |||
58 | #define BUTTON_RC_REC 0x00008000 | ||
59 | #define BUTTON_RC_MENU 0x00004000 | ||
60 | |||
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_POWER | ||
68 | #define POWEROFF_COUNT 10 | ||
69 | |||
70 | #endif /* _BUTTON_TARGET_H_ */ | ||