summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-01-19 12:44:46 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-01-19 12:44:46 +0000
commitacf7d5e89e356cfe9e137e7e9eff74ddbbc9bc09 (patch)
treefa95f67ee95b3535a9f7bcf82a385921503c3a9f
parent457b51dfa7dd496c6988aae05150dc4825425245 (diff)
downloadrockbox-acf7d5e89e356cfe9e137e7e9eff74ddbbc9bc09.tar.gz
rockbox-acf7d5e89e356cfe9e137e7e9eff74ddbbc9bc09.tar.bz2
rockbox-acf7d5e89e356cfe9e137e7e9eff74ddbbc9bc09.zip
more iAudio x5 adjustments by Matt v.d. Westhuizen (#1408980)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8386 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps.h19
-rw-r--r--apps/gui/yesno.h4
-rw-r--r--apps/plugins/bounce.c6
-rw-r--r--apps/plugins/logo.c6
-rw-r--r--apps/recorder/keyboard.c14
-rw-r--r--uisimulator/sdl/button-x11.c6
6 files changed, 55 insertions, 0 deletions
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 04375661a3..1017181a21 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -208,6 +208,25 @@
#define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT)
#define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+
+/* TODO: Check WPS button assignments */
+
+#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
+#define WPS_NEXT_PRE BUTTON_RIGHT
+#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
+#define WPS_PREV_PRE BUTTON_LEFT
+#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
+#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
+#define WPS_INCVOL BUTTON_UP
+#define WPS_DECVOL BUTTON_DOWN
+#define WPS_PAUSE BUTTON_PLAY
+/* #define WPS_MENU iAudioX5 can't have both main menu and context menu in wps (unless we use BUTTON_REC?) */
+#define WPS_BROWSE (BUTTON_MENU | BUTTON_REL)
+#define WPS_BROWSE_PRE BUTTON_MENU
+#define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT)
+#define WPS_CONTEXT (BUTTON_MENU | BUTTON_REPEAT)
+
#endif
/* constants used in line_type and as refresh_mode for wps_refresh */
diff --git a/apps/gui/yesno.h b/apps/gui/yesno.h
index 98bf84f504..a39a2cbc69 100644
--- a/apps/gui/yesno.h
+++ b/apps/gui/yesno.h
@@ -28,6 +28,10 @@
#elif (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD)
#define YESNO_OK BUTTON_RIGHT
+
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define YESNO_OK BUTTON_RIGHT
+
#endif
enum yesno_res
{
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c
index 7b59841055..cad0379b50 100644
--- a/apps/plugins/bounce.c
+++ b/apps/plugins/bounce.c
@@ -58,6 +58,12 @@ PLUGIN_HEADER
#define BOUNCE_QUIT (BUTTON_MENU | BUTTON_REL)
#define BOUNCE_MODE (BUTTON_SELECT | BUTTON_REL)
+#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD)
+#define BOUNCE_UP BUTTON_UP
+#define BOUNCE_DOWN BUTTON_DOWN
+#define BOUNCE_QUIT BUTTON_POWER
+#define BOUNCE_MODE BUTTON_PLAY
+
#endif
static struct plugin_api* rb;
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index c94136d0df..7fa00ee3b8 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -201,6 +201,12 @@ const unsigned char rockbox16x7[] = {
#define LP_INC_X BUTTON_RIGHT
#define LP_DEC_Y BUTTON_DOWN
#define LP_INC_Y BUTTON_UP
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+#define LP_QUIT BUTTON_MENU
+#define LP_DEC_X BUTTON_LEFT
+#define LP_INC_X BUTTON_RIGHT
+#define LP_DEC_Y BUTTON_DOWN
+#define LP_INC_Y BUTTON_UP
#else
#define LP_QUIT BUTTON_OFF
#define LP_DEC_X BUTTON_LEFT
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 88037ac5d5..5bbc2140cb 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -142,6 +142,20 @@
#define KBD_UP BUTTON_UP
#define KBD_DOWN BUTTON_DOWN
+#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
+
+/* TODO: Check keyboard mappings */
+
+#define KBD_MODES /* iAudio X5 uses 2 modes, picker and line edit */
+#define KBD_SELECT (BUTTON_MENU | BUTTON_REL) /* backspace in line edit */
+#define KBD_SELECT_PRE BUTTON_MENU
+#define KBD_DONE BUTTON_PLAY
+#define KBD_ABORT BUTTON_REC
+#define KBD_LEFT BUTTON_LEFT
+#define KBD_RIGHT BUTTON_RIGHT
+#define KBD_UP BUTTON_UP
+#define KBD_DOWN BUTTON_DOWN
+
#endif
#if KEYBOARD_PAGES == 1
diff --git a/uisimulator/sdl/button-x11.c b/uisimulator/sdl/button-x11.c
index 7c41f24cc8..b0ab81a86a 100644
--- a/uisimulator/sdl/button-x11.c
+++ b/uisimulator/sdl/button-x11.c
@@ -199,6 +199,12 @@ void button_read (void)
break;
#endif
+#ifdef BUTTON_POWER
+ case SDLK_KP_MINUS:
+ case SDLK_p:
+ k = BUTTON_POWER;
+#endif
+
#ifdef BUTTON_F1
case SDLK_KP_DIVIDE:
case SDLK_F1: