diff options
Diffstat (limited to 'firmware/target/arm/olympus/mrobe-500/button-target.h')
-rw-r--r-- | firmware/target/arm/olympus/mrobe-500/button-target.h | 78 |
1 files changed, 21 insertions, 57 deletions
diff --git a/firmware/target/arm/olympus/mrobe-500/button-target.h b/firmware/target/arm/olympus/mrobe-500/button-target.h index 6637c5bf2b..80dd246744 100644 --- a/firmware/target/arm/olympus/mrobe-500/button-target.h +++ b/firmware/target/arm/olympus/mrobe-500/button-target.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * \/ \/ \/ \/ \/ | 7 | * \/ \/ \/ \/ \/ |
8 | * $Id: $ | 8 | * $Id: $ |
9 | * | 9 | * |
10 | * Copyright (C) 2007 by Karl Kurbjun | 10 | * Copyright (C) 2007 by Jonathan Gordon |
11 | * | 11 | * |
12 | * All files in this archive are subject to the GNU General Public License. | 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. | 13 | * See the file COPYING in the source tree root for full license agreement. |
@@ -29,71 +29,35 @@ bool button_hold(void); | |||
29 | void button_init_device(void); | 29 | void button_init_device(void); |
30 | int button_read_device(void); | 30 | int button_read_device(void); |
31 | 31 | ||
32 | /* Toshiba Gigabeat specific button codes */ | 32 | /* m:robe 500 specific button codes */ |
33 | 33 | ||
34 | #define BUTTON_POWER 0x00000001 | 34 | #define BUTTON_POWER 0x00000001 |
35 | #define BUTTON_MENU 0x00000002 | ||
36 | |||
37 | #define BUTTON_LEFT 0x00000004 | ||
38 | #define BUTTON_RIGHT 0x00000008 | ||
39 | #define BUTTON_UP 0x00000010 | ||
40 | #define BUTTON_DOWN 0x00000020 | ||
41 | |||
42 | #define BUTTON_VOL_UP 0x00000040 | ||
43 | #define BUTTON_VOL_DOWN 0x00000080 | ||
44 | |||
45 | #define BUTTON_SELECT 0x00000100 | ||
46 | #define BUTTON_A 0x00000200 | ||
47 | 35 | ||
48 | /* Remote control buttons */ | 36 | /* Remote control buttons */ |
49 | 37 | ||
50 | #define BUTTON_RC_VOL_UP 0x00000400 | 38 | #define BUTTON_RC_HEART 0x00000002 |
51 | #define BUTTON_RC_VOL_DOWN 0x00000800 | 39 | #define BUTTON_RC_MODE 0x00000004 |
52 | #define BUTTON_RC_FF 0x00001000 | 40 | #define BUTTON_RC_VOL_DOWN 0x00000008 |
53 | #define BUTTON_RC_REW 0x00002000 | 41 | #define BUTTON_RC_VOL_UP 0x00000010 |
54 | |||
55 | #define BUTTON_RC_PLAY 0x00004000 | ||
56 | #define BUTTON_RC_DSP 0x00008000 | ||
57 | |||
58 | /* Toshiba Gigabeat specific remote button ADC values */ | ||
59 | /* The remote control uses ADC 1 to emulate button pushes | ||
60 | Reading (approx) Button HP plugged in? Remote plugged in? | ||
61 | 0 N/A Yes No | ||
62 | 125 Play/Pause Cant tell Yes | ||
63 | 241 Speaker+ Cant tell Yes | ||
64 | 369 Rewind Cant tell Yes | ||
65 | 492 Fast Fwd Cant tell Yes | ||
66 | 616 Vol + Cant tell Yes | ||
67 | 742 Vol - Cant tell Yes | ||
68 | 864 None Cant tell Yes | ||
69 | 1023 N/A No No | ||
70 | */ | ||
71 | 42 | ||
72 | /* | ||
73 | Notes: | ||
74 | 43 | ||
75 | Buttons on the remote are translated into equivalent button presses just | 44 | #define BUTTON_RC_PLAY 0x00000020 |
76 | as if you were pressing them on the Gigabeat itself. | 45 | #define BUTTON_RC_REW 0x00000040 |
77 | 46 | #define BUTTON_RC_FF 0x00000080 | |
78 | We cannot tell if the hold is asserted on the remote. The Hold function on | 47 | #define BUTTON_RC_DOWN 0x00000100 |
79 | the remote is to block the output of the buttons changing. | 48 | #define BUTTON_TOUCH 0x00000200 |
80 | 49 | ||
81 | Only one button can be sensed at a time. If another is pressed, the button | 50 | /* compatibility hacks */ |
82 | with the lowest reading is dominant. So, if Rewind and Vol + are pressed | 51 | #define BUTTON_LEFT BUTTON_RC_REW |
83 | at the same time, Rewind value is the one that is read. | 52 | #define BUTTON_RIGHT BUTTON_RC_FF |
84 | */ | 53 | #define POWEROFF_BUTTON BUTTON_POWER |
85 | 54 | #define POWEROFF_COUNT 40 | |
86 | |||
87 | |||
88 | |||
89 | #define BUTTON_MAIN (BUTTON_POWER|BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\ | ||
90 | |BUTTON_UP|BUTTON_DOWN|BUTTON_VOL_UP|BUTTON_VOL_DOWN\ | ||
91 | |BUTTON_SELECT|BUTTON_A) | ||
92 | 55 | ||
93 | #define BUTTON_REMOTE (BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN|BUTTON_RC_FF\ | 56 | #define BUTTON_MAIN BUTTON_POWER |
94 | |BUTTON_RC_REW|BUTTON_RC_PLAY|BUTTON_RC_DSP) | ||
95 | 57 | ||
96 | #define POWEROFF_BUTTON BUTTON_POWER | 58 | #define BUTTON_REMOTE (BUTTON_RC_HEART|BUTTON_RC_MODE| \ |
97 | #define POWEROFF_COUNT 10 | 59 | BUTTON_RC_VOL_DOWN|BUTTON_RC_VOL_UP| \ |
60 | BUTTON_RC_PLAY|BUTTON_RC_DOWN| \ | ||
61 | BUTTON_RC_REW|BUTTON_RC_FF) | ||
98 | 62 | ||
99 | #endif /* _BUTTON_TARGET_H_ */ | 63 | #endif /* _BUTTON_TARGET_H_ */ |