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
This commit is contained in:
Daniel Stenberg 2006-01-19 12:44:46 +00:00
parent 457b51dfa7
commit acf7d5e89e
6 changed files with 55 additions and 0 deletions

View file

@ -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 */

View file

@ -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
{

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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: