diff options
Diffstat (limited to 'firmware/export/button.h')
-rw-r--r-- | firmware/export/button.h | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/firmware/export/button.h b/firmware/export/button.h index 93e6443645..92c9415372 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h | |||
@@ -23,8 +23,7 @@ | |||
23 | #include <stdbool.h> | 23 | #include <stdbool.h> |
24 | #include "config.h" | 24 | #include "config.h" |
25 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ | 25 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ |
26 | (CONFIG_KEYPAD == IRIVER_H300_PAD) || \ | 26 | (CONFIG_KEYPAD == IRIVER_H300_PAD) |
27 | (CONFIG_KEYPAD == IAUDIO_X5_PAD) | ||
28 | #define HAS_BUTTON_HOLD | 27 | #define HAS_BUTTON_HOLD |
29 | #define HAS_REMOTE_BUTTON_HOLD | 28 | #define HAS_REMOTE_BUTTON_HOLD |
30 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ | 29 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ |
@@ -64,6 +63,10 @@ bool remote_button_hold(void); | |||
64 | #define BUTTON_REPEAT 0x04000000 | 63 | #define BUTTON_REPEAT 0x04000000 |
65 | 64 | ||
66 | 65 | ||
66 | #ifdef TARGET_TREE | ||
67 | #include "button-target.h" | ||
68 | #else | ||
69 | |||
67 | /* Target specific button codes */ | 70 | /* Target specific button codes */ |
68 | 71 | ||
69 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD)\ | 72 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD)\ |
@@ -258,44 +261,6 @@ bool remote_button_hold(void); | |||
258 | 261 | ||
259 | #define BUTTON_REMOTE 0 | 262 | #define BUTTON_REMOTE 0 |
260 | 263 | ||
261 | #elif CONFIG_KEYPAD == IAUDIO_X5_PAD | ||
262 | |||
263 | /* iaudio X5 specific button codes */ | ||
264 | |||
265 | /* Main unit's buttons */ | ||
266 | #define BUTTON_POWER 0x00000001 | ||
267 | #define BUTTON_REC 0x00000002 | ||
268 | |||
269 | #define BUTTON_LEFT 0x00000004 | ||
270 | #define BUTTON_RIGHT 0x00000008 | ||
271 | #define BUTTON_UP 0x00000010 | ||
272 | #define BUTTON_DOWN 0x00000020 | ||
273 | |||
274 | #define BUTTON_PLAY 0x00000040 | ||
275 | #define BUTTON_SELECT 0x00000080 | ||
276 | |||
277 | #define BUTTON_MAIN (BUTTON_POWER|BUTTON_PLAY|BUTTON_LEFT|BUTTON_RIGHT\ | ||
278 | |BUTTON_UP|BUTTON_DOWN|BUTTON_REC|BUTTON_SELECT) | ||
279 | |||
280 | /* Remote control's buttons */ | ||
281 | #define BUTTON_RC_PLAY 0x00100000 | ||
282 | |||
283 | #define BUTTON_RC_REW 0x00080000 | ||
284 | #define BUTTON_RC_FF 0x00040000 | ||
285 | #define BUTTON_RC_VOL_UP 0x00020000 | ||
286 | #define BUTTON_RC_VOL_DOWN 0x00010000 | ||
287 | |||
288 | #define BUTTON_RC_REC 0x00008000 | ||
289 | #define BUTTON_RC_MENU 0x00004000 | ||
290 | |||
291 | #define BUTTON_RC_MODE 0x00002000 | ||
292 | |||
293 | #define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN\ | ||
294 | |BUTTON_RC_REW|BUTTON_RC_FF\ | ||
295 | |BUTTON_RC_REC|BUTTON_RC_MENU|BUTTON_RC_MODE) | ||
296 | |||
297 | |||
298 | |||
299 | #elif CONFIG_KEYPAD == GIGABEAT_PAD | 264 | #elif CONFIG_KEYPAD == GIGABEAT_PAD |
300 | /* Toshiba Gigabeat specific button codes */ | 265 | /* Toshiba Gigabeat specific button codes */ |
301 | 266 | ||
@@ -337,5 +302,7 @@ bool remote_button_hold(void); | |||
337 | 302 | ||
338 | #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ | 303 | #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ |
339 | 304 | ||
305 | #endif /* TARGET_TREE */ | ||
306 | |||
340 | #endif /* _BUTTON_H_ */ | 307 | #endif /* _BUTTON_H_ */ |
341 | 308 | ||