diff --git a/apps/bookmark.h b/apps/bookmark.h index 284c0ceffb..adb6613482 100644 --- a/apps/bookmark.h +++ b/apps/bookmark.h @@ -43,6 +43,11 @@ #define BOOKMARK_DELETE (BUTTON_PLAY | BUTTON_SELECT) #define BOOKMARK_DOWN BUTTON_DOWN +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define BOOKMARK_SELECT BUTTON_MENU +#define BOOKMARK_DELETE BUTTON_REC | BUTTON_REPEAT +#define BOOKMARK_DOWN BUTTON_DOWN + #else /* player, recorder, gmini */ #define BOOKMARK_SELECT BUTTON_PLAY #define BOOKMARK_DELETE (BUTTON_ON | BUTTON_PLAY) diff --git a/apps/gui/list.h b/apps/gui/list.h index 4f02693127..25fb07d7c4 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h @@ -78,6 +78,11 @@ #define LIST_PREV BUTTON_UP #define LIST_PGUP (BUTTON_ON | BUTTON_UP) #define LIST_PGDN (BUTTON_ON | BUTTON_DOWN) + +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define LIST_NEXT BUTTON_DOWN +#define LIST_PREV BUTTON_UP + #endif /* diff --git a/apps/gui/select.h b/apps/gui/select.h index 3f6dd1413b..00c05c8d58 100644 --- a/apps/gui/select.h +++ b/apps/gui/select.h @@ -85,6 +85,14 @@ #define SELECT_CANCEL BUTTON_OFF #define SELECT_CANCEL2 BUTTON_MENU +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define SELECT_INC BUTTON_UP +#define SELECT_DEC BUTTON_DOWN +#define SELECT_OK BUTTON_MENU +#define SELECT_OK2 BUTTON_LEFT +#define SELECT_CANCEL BUTTON_PLAY +#define SELECT_CANCEL2 BUTTON_POWER + #endif struct gui_select diff --git a/apps/menu.h b/apps/menu.h index 143933d833..cf942ea382 100644 --- a/apps/menu.h +++ b/apps/menu.h @@ -86,6 +86,14 @@ #define MENU_EXIT_MENU BUTTON_PLAY #define MENU_ENTER BUTTON_RIGHT +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD + +#define MENU_NEXT BUTTON_DOWN +#define MENU_PREV BUTTON_UP +#define MENU_EXIT BUTTON_LEFT +#define MENU_EXIT_MENU BUTTON_MENU +#define MENU_ENTER BUTTON_RIGHT + #endif struct menu_item { diff --git a/apps/plugins/battery_test.c b/apps/plugins/battery_test.c index c076ad74e8..31a2ac582c 100644 --- a/apps/plugins/battery_test.c +++ b/apps/plugins/battery_test.c @@ -45,6 +45,8 @@ PLUGIN_HEADER #define BATTERY_TEST_QUIT BUTTON_PLAY #elif (CONFIG_KEYPAD == IPOD_4G_PAD) #define BATTERY_TEST_QUIT BUTTON_MENU +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define BATTERY_TEST_QUIT BUTTON_POWER #endif static struct plugin_api* rb; diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c index ba18cc1c55..2584062fd7 100644 --- a/apps/plugins/calculator.c +++ b/apps/plugins/calculator.c @@ -143,6 +143,16 @@ PLUGIN_HEADER #define CALCULATOR_INPUT (BUTTON_SELECT | BUTTON_REL) #define CALCULATOR_CALC (BUTTON_PLAY | BUTTON_REPEAT) +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) + +#define CALCULATOR_UP BUTTON_UP +#define CALCULATOR_DOWN BUTTON_DOWN +#define CALCULATOR_QUIT BUTTON_POWER +#define CALCULATOR_INPUT_CALC_PRE BUTTON_MENU +#define CALCULATOR_INPUT (BUTTON_MENU | BUTTON_REL) +#define CALCULATOR_CALC BUTTON_PLAY +#define CALCULATOR_CLEAR BUTTON_REC + #endif static struct plugin_api* rb; diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index 73f53c9205..6f1837ca2b 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -86,6 +86,16 @@ PLUGIN_HEADER #define CHC_SETTINGS_OK BUTTON_SELECT #define CHC_SETTINGS_CANCEL BUTTON_PLAY +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define CHC_QUIT BUTTON_REC +#define CHC_STARTSTOP BUTTON_PLAY +#define CHC_RESET BUTTON_POWER +#define CHC_MENU BUTTON_MENU +#define CHC_SETTINGS_INC BUTTON_RIGHT +#define CHC_SETTINGS_DEC BUTTON_LEFT +#define CHC_SETTINGS_OK BUTTON_MENU +#define CHC_SETTINGS_CANCEL BUTTON_REC + #endif diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 50e32ed90b..66a2bfd70e 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c @@ -984,6 +984,14 @@ STATIC void chip8 (void) #define CHIP8_KEY6 BUTTON_RIGHT #define CHIP8_KEY8 BUTTON_SCROLL_FWD +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define CHIP8_OFF BUTTON_POWER +#define CHIP8_KEY2 BUTTON_UP +#define CHIP8_KEY4 BUTTON_LEFT +#define CHIP8_KEY5 BUTTON_MENU +#define CHIP8_KEY6 BUTTON_RIGHT +#define CHIP8_KEY8 BUTTON_DOWN + #endif static byte chip8_virtual_keys[16]; diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index a70e3322e0..378e39003c 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c @@ -106,6 +106,19 @@ PLUGIN_HEADER #define CUBE_PAUSE (BUTTON_SELECT | BUTTON_REL) #define CUBE_HIGHSPEED (BUTTON_MODE | BUTTON_EQ) /* TODO: this is impossible */ +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define CUBE_QUIT BUTTON_POWER +#define CUBE_X_INC BUTTON_LEFT +#define CUBE_X_DEC BUTTON_RIGHT +#define CUBE_Y_INC BUTTON_UP +#define CUBE_Y_DEC BUTTON_DOWN +#define CUBE_Z_INC (BUTTON_PLAY | BUTTON_UP) +#define CUBE_Z_DEC (BUTTON_PLAY | BUTTON_DOWN) +#define CUBE_MODE BUTTON_MENU +#define CUBE_PAUSE_PRE BUTTON_PLAY +#define CUBE_PAUSE (BUTTON_PLAY | BUTTON_REL) +#define CUBE_HIGHSPEED (BUTTON_REC | BUTTON_REL) + #endif #ifdef HAVE_LCD_BITMAP diff --git a/apps/plugins/databox/databox.c b/apps/plugins/databox/databox.c index 2cc78a0b01..996134d37d 100644 --- a/apps/plugins/databox/databox.c +++ b/apps/plugins/databox/databox.c @@ -40,6 +40,9 @@ PLUGIN_HEADER #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD #define DBX_SELECT BUTTON_SELECT #define DBX_STOP BUTTON_PLAY +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define DBX_SELECT BUTTON_MENU +#define DBX_STOP BUTTON_PLAY #endif #define MAX_TOKENS 70 diff --git a/apps/plugins/demystify.c b/apps/plugins/demystify.c index f4e54becb8..da7cd6eb96 100644 --- a/apps/plugins/demystify.c +++ b/apps/plugins/demystify.c @@ -32,6 +32,12 @@ PLUGIN_HEADER #define DEMYSTIFY_REMOVE_POLYGON BUTTON_LEFT #define DEMYSTIFY_INCREASE_SPEED BUTTON_SCROLL_FWD #define DEMYSTIFY_DECREASE_SPEED BUTTON_SCROLL_BACK +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define DEMYSTIFY_QUIT BUTTON_POWER +#define DEMYSTIFY_ADD_POLYGON BUTTON_RIGHT +#define DEMYSTIFY_REMOVE_POLYGON BUTTON_LEFT +#define DEMYSTIFY_INCREASE_SPEED BUTTON_UP +#define DEMYSTIFY_DECREASE_SPEED BUTTON_DOWN #else #define DEMYSTIFY_QUIT BUTTON_OFF #define DEMYSTIFY_ADD_POLYGON BUTTON_UP diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c index 7209240128..30ba2f442b 100644 --- a/apps/plugins/dict.c +++ b/apps/plugins/dict.c @@ -108,6 +108,8 @@ long reverse (long N) { #define LP_QUIT BUTTON_MENU #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD #define LP_QUIT BUTTON_PLAY +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define LP_QUIT BUTTON_POWER #else #define LP_QUIT BUTTON_OFF #endif diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index f1fba878e3..13efac18a1 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -63,6 +63,17 @@ PLUGIN_HEADER #define FLIPIT_TOGGLE_PRE BUTTON_SELECT #define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL) +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) + +#define FLIPIT_UP BUTTON_UP +#define FLIPIT_DOWN BUTTON_DOWN +#define FLIPIT_QUIT BUTTON_POWER +#define FLIPIT_SHUFFLE (BUTTON_PLAY | BUTTON_LEFT) +#define FLIPIT_SOLVE (BUTTON_PLAY | BUTTON_RIGHT) +#define FLIPIT_STEP_BY_STEP (BUTTON_PLAY | BUTTON_UP) +#define FLIPIT_TOGGLE_PRE BUTTON_MENU +#define FLIPIT_TOGGLE (BUTTON_MENU | BUTTON_REL) + #endif static struct plugin_api* rb; diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index a4ce1ae92a..265149f410 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -87,6 +87,16 @@ PLUGIN_HEADER #define BEJEWELED_SELECT BUTTON_SELECT #define BEJEWELED_RESUME BUTTON_EQ +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define BEJEWELED_UP BUTTON_UP +#define BEJEWELED_DOWN BUTTON_DOWN +#define BEJEWELED_LEFT BUTTON_LEFT +#define BEJEWELED_RIGHT BUTTON_RIGHT +#define BEJEWELED_QUIT BUTTON_POWER +#define BEJEWELED_START BUTTON_PLAY +#define BEJEWELED_SELECT BUTTON_MENU +#define BEJEWELED_RESUME BUTTON_REC + #else #error BEJEWELED: Unsupported keypad #endif diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 01678596f0..c94136d0df 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c @@ -195,6 +195,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/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 5baaea6812..b6a6172f51 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -80,6 +80,15 @@ PLUGIN_HEADER #define MINESWP_DISCOVER (BUTTON_SELECT | BUTTON_PLAY) #define MINESWP_INFO (BUTTON_SELECT | BUTTON_MENU) +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define MINESWP_UP BUTTON_UP +#define MINESWP_DOWN BUTTON_DOWN +#define MINESWP_QUIT BUTTON_POWER +#define MINESWP_START BUTTON_REC +#define MINESWP_TOGGLE BUTTON_PLAY +#define MINESWP_DISCOVER BUTTON_MENU +#define MINESWP_INFO (BUTTON_REC | BUTTON_PLAY) + #endif /* here is a global api struct pointer. while not strictly necessary, diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index bccc436cad..56c6a18921 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c @@ -63,6 +63,11 @@ PLUGIN_HEADER #define MOSAIQUE_SPEED BUTTON_MODE #define MOSAIQUE_RESTART BUTTON_SELECT +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define MOSAIQUE_QUIT BUTTON_POWER +#define MOSAIQUE_SPEED BUTTON_MENU +#define MOSAIQUE_RESTART BUTTON_PLAY + #endif enum plugin_status plugin_start(struct plugin_api* api, void* parameter) diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c index 2fce02c705..6e3a6e375e 100644 --- a/apps/plugins/mp3_encoder.c +++ b/apps/plugins/mp3_encoder.c @@ -1885,6 +1885,11 @@ char *get_mp3_filename(char *wav_name) #define MP3ENC_NEXT BUTTON_SCROLL_FWD #define MP3ENC_DONE BUTTON_MENU #define MP3ENC_SELECT BUTTON_SELECT +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define MP3ENC_PREV BUTTON_UP +#define MP3ENC_NEXT BUTTON_DOWN +#define MP3ENC_DONE BUTTON_POWER +#define MP3ENC_SELECT BUTTON_MENU #endif enum plugin_status plugin_start(struct plugin_api* api, void* parameter) diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index 4e9d99b8f0..b725c9305a 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c @@ -65,6 +65,13 @@ PLUGIN_HEADER #define PONG_RIGHT_UP BUTTON_RIGHT #define PONG_RIGHT_DOWN BUTTON_PLAY +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define PONG_QUIT BUTTON_POWER +#define PONG_LEFT_UP BUTTON_UP +#define PONG_LEFT_DOWN BUTTON_DOWN +#define PONG_RIGHT_UP BUTTON_REC +#define PONG_RIGHT_DOWN BUTTON_PLAY + #endif static struct plugin_api* rb; diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index f30a21aff8..0c976369cf 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -30,6 +30,12 @@ PLUGIN_HEADER #define ROCKBLOX_DOWN BUTTON_SCROLL_FWD #define ROCKBLOX_LEFT BUTTON_LEFT #define ROCKBLOX_RIGHT BUTTON_RIGHT +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define ROCKBLOX_OFF BUTTON_POWER +#define ROCKBLOX_UP BUTTON_UP +#define ROCKBLOX_DOWN BUTTON_DOWN +#define ROCKBLOX_LEFT BUTTON_LEFT +#define ROCKBLOX_RIGHT BUTTON_RIGHT #else #define ROCKBLOX_OFF BUTTON_OFF #define ROCKBLOX_UP BUTTON_UP diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index 060ab1866a..2e4a221930 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c @@ -52,6 +52,13 @@ PLUGIN_HEADER #define PUZZLE_SHUFFLE BUTTON_SELECT #define PUZZLE_PICTURE BUTTON_PLAY +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define PUZZLE_QUIT BUTTON_POWER +#define PUZZLE_UP BUTTON_UP +#define PUZZLE_DOWN BUTTON_DOWN +#define PUZZLE_SHUFFLE BUTTON_REC +#define PUZZLE_PICTURE BUTTON_PLAY + #endif static struct plugin_api* rb; diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index dc78f17820..04a4f3e0e2 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c @@ -61,6 +61,12 @@ PLUGIN_HEADER #define SNAKE_DOWN BUTTON_PLAY #define SNAKE_PLAYPAUSE BUTTON_SELECT +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define SNAKE_QUIT BUTTON_POWER +#define SNAKE_UP BUTTON_UP +#define SNAKE_DOWN BUTTON_DOWN +#define SNAKE_PLAYPAUSE BUTTON_PLAY + #else #error "lacks keymapping" #endif diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index 4008209578..dbb6bbc6dd 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -103,6 +103,16 @@ PLUGIN_HEADER #define SNAKE2_SELECT_TYPE BUTTON_RIGHT #define SNAKE2_PLAYPAUSE BUTTON_SELECT +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define SNAKE2_UP BUTTON_UP +#define SNAKE2_DOWN BUTTON_DOWN +#define SNAKE2_QUIT BUTTON_POWER +#define SNAKE2_LEVEL_UP BUTTON_REC +#define SNAKE2_LEVEL_DOWN BUTTON_PLAY +#define SNAKE2_SELECT_MAZE BUTTON_LEFT +#define SNAKE2_SELECT_TYPE BUTTON_RIGHT +#define SNAKE2_PLAYPAUSE BUTTON_MENU + #else #error "lacks keymapping" #endif diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index a1405a1863..c1487a8009 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c @@ -40,6 +40,8 @@ PLUGIN_HEADER #define SNOW_QUIT BUTTON_MENU #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD #define SNOW_QUIT BUTTON_PLAY +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define SNOW_QUIT BUTTON_POWER #else #define SNOW_QUIT BUTTON_OFF #endif diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 994a1172c8..e823518ddb 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -75,6 +75,16 @@ PLUGIN_HEADER #define SOKOBAN_LEVEL_DOWN (BUTTON_SELECT | BUTTON_LEFT) #define SOKOBAN_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY) +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define SOKOBAN_UP BUTTON_UP +#define SOKOBAN_DOWN BUTTON_DOWN +#define SOKOBAN_QUIT BUTTON_POWER +#define SOKOBAN_UNDO_PRE BUTTON_MENU +#define SOKOBAN_UNDO (BUTTON_MENU | BUTTON_REL) +#define SOKOBAN_LEVEL_UP (BUTTON_PLAY | BUTTON_UP) +#define SOKOBAN_LEVEL_DOWN (BUTTON_PLAY | BUTTON_DOWN) +#define SOKOBAN_LEVEL_REPEAT BUTTON_REC + #endif #if LCD_DEPTH > 1 diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 9a60635f45..33ac536267 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -109,19 +109,33 @@ static struct plugin_api* rb; #define SOL_OPT BUTTON_ON #define SOL_REM BUTTON_REC -#elif (CONFIG_KEYPAD == IPOD_4G_PAD) -#define SOL_QUIT (BUTTON_SELECT | BUTTON_MENU) -#define SOL_UP BUTTON_MENU -#define SOL_DOWN BUTTON_PLAY -#define SOL_LEFT BUTTON_LEFT -#define SOL_RIGHT BUTTON_RIGHT -#define SOL_MOVE BUTTON_SELECT -#define SOL_DRAW (BUTTON_SELECT | BUTTON_PLAY) -#define SOL_REM2CUR (BUTTON_SELECT | BUTTON_LEFT) -#define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_RIGHT) -#define SOL_REM2STACK (BUTTON_LEFT | BUTTON_RIGHT) -#define SOL_MENU_RUN BUTTON_SELECT -#define SOL_MENU_INFO (BUTTON_PLAY | BUTTON_MENU) +#elif (CONFIG_KEYPAD == IPOD_4G_PAD) +#define SOL_QUIT (BUTTON_SELECT | BUTTON_MENU) +#define SOL_UP BUTTON_MENU +#define SOL_DOWN BUTTON_PLAY +#define SOL_LEFT BUTTON_LEFT +#define SOL_RIGHT BUTTON_RIGHT +#define SOL_MOVE BUTTON_SELECT +#define SOL_DRAW (BUTTON_SELECT | BUTTON_PLAY) +#define SOL_REM2CUR (BUTTON_SELECT | BUTTON_LEFT) +#define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_RIGHT) +#define SOL_REM2STACK (BUTTON_LEFT | BUTTON_RIGHT) +#define SOL_MENU_RUN BUTTON_SELECT +#define SOL_MENU_INFO (BUTTON_PLAY | BUTTON_MENU) + +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define SOL_QUIT BUTTON_POWER +#define SOL_UP BUTTON_UP +#define SOL_DOWN BUTTON_DOWN +#define SOL_LEFT BUTTON_LEFT +#define SOL_RIGHT BUTTON_RIGHT +#define SOL_MOVE BUTTON_MENU +#define SOL_DRAW BUTTON_PLAY +#define SOL_REM2CUR (BUTTON_REC | BUTTON_LEFT) +#define SOL_CUR2STACK (BUTTON_REC | BUTTON_UP) +#define SOL_REM2STACK (BUTTON_REC | BUTTON_DOWN) +#define SOL_MENU_RUN BUTTON_MENU +#define SOL_MENU_INFO BUTTON_PLAY #endif @@ -160,6 +174,13 @@ static struct plugin_api* rb; #define HELP_SOL_REM2CUR "SELECT+LEFT: Put the card on top of the remains' stack on top of the cursor." #define HELP_SOL_CUR2STACK "SELECT+RIGHT..: Put the card under the cursor on one of the 4 final stacks." #define HELP_SOL_REM2STACK "LEFT+RIGHT: Put the card on top of the remains' stack on one of the 4 final stacks." + +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define HELP_SOL_MOVE "MENU: Select cards, Move cards, reveal hidden cards ..." +#define HELP_SOL_DRAW "PLAY: Un-select a card if it was selected. Else, draw 3 new cards out of the remains' stack." +#define HELP_SOL_REM2CUR "REC+LEFT: Put the card on top of the remains' stack on top of the cursor." +#define HELP_SOL_CUR2STACK "REC+UP..: Put the card under the cursor on one of the 4 final stacks." +#define HELP_SOL_REM2STACK "REC+DOWN: Put the card on top of the remains' stack on one of the 4 final stacks." #endif diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 03dac3482c..ddacfbcae2 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -110,6 +110,18 @@ PLUGIN_HEADER #define STAR_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY) #define STAR_MENU_RUN BUTTON_RIGHT +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) + +#define STAR_QUIT BUTTON_POWER +#define STAR_UP BUTTON_UP +#define STAR_DOWN BUTTON_DOWN +#define STAR_TOGGLE_CONTROL_PRE BUTTON_MENU +#define STAR_TOGGLE_CONTROL (BUTTON_MENU | BUTTON_REL) +#define STAR_LEVEL_UP (BUTTON_PLAY | BUTTON_UP) +#define STAR_LEVEL_DOWN (BUTTON_PLAY | BUTTON_DOWN) +#define STAR_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_RIGHT) +#define STAR_MENU_RUN BUTTON_REC + #endif /* function returns because of USB? */ diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c index 750c59fe41..f72c1ce5a9 100644 --- a/apps/plugins/starfield.c +++ b/apps/plugins/starfield.c @@ -32,6 +32,12 @@ static struct plugin_api* rb; /* global api struct pointer */ #define STARFIELD_DECREASE_ZMOVE BUTTON_SCROLL_BACK #define STARFIELD_INCREASE_NB_STARS BUTTON_RIGHT #define STARFIELD_DECREASE_NB_STARS BUTTON_LEFT +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define STARFIELD_QUIT BUTTON_POWER +#define STARFIELD_INCREASE_ZMOVE BUTTON_UP +#define STARFIELD_DECREASE_ZMOVE BUTTON_DOWN +#define STARFIELD_INCREASE_NB_STARS BUTTON_RIGHT +#define STARFIELD_DECREASE_NB_STARS BUTTON_LEFT #else #define STARFIELD_QUIT BUTTON_OFF #define STARFIELD_INCREASE_ZMOVE BUTTON_UP diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c index b54adb584b..718b3ec928 100644 --- a/apps/plugins/stats.c +++ b/apps/plugins/stats.c @@ -34,6 +34,8 @@ static int fontwidth, fontheight; #define STATS_STOP BUTTON_MENU #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD #define STATS_STOP BUTTON_PLAY +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define STATS_STOP BUTTON_POWER #else #define STATS_STOP BUTTON_OFF #endif diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index 3742a9a552..bccca7ea36 100644 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c @@ -77,6 +77,13 @@ PLUGIN_HEADER #define STOPWATCH_LAP_TIMER BUTTON_SELECT #define STOPWATCH_SCROLL_UP BUTTON_UP #define STOPWATCH_SCROLL_DOWN BUTTON_DOWN +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define STOPWATCH_QUIT BUTTON_POWER +#define STOPWATCH_START_STOP BUTTON_PLAY +#define STOPWATCH_RESET_TIMER BUTTON_REC +#define STOPWATCH_LAP_TIMER BUTTON_MENU +#define STOPWATCH_SCROLL_UP BUTTON_UP +#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN #endif static struct plugin_api* rb; diff --git a/apps/plugins/sudoku.c b/apps/plugins/sudoku.c index 94ff96d171..b6df4e1235 100644 --- a/apps/plugins/sudoku.c +++ b/apps/plugins/sudoku.c @@ -103,6 +103,13 @@ PLUGIN_HEADER #define SUDOKU_BUTTON_MENU BUTTON_MENU #define SUDOKU_BUTTON_POSSIBLE (BUTTON_SELECT | BUTTON_LEFT) +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define SUDOKU_BUTTON_QUIT BUTTON_POWER +#define SUDOKU_BUTTON_UP BUTTON_UP +#define SUDOKU_BUTTON_DOWN BUTTON_DOWN +#define SUDOKU_BUTTON_TOGGLE BUTTON_MENU +#define SUDOKU_BUTTON_MENU BUTTON_PLAY +#define SUDOKU_BUTTON_POSSIBLE BUTTON_REC #elif #error SUDOKU: Unsupported keypad diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index b98605af84..a1de3f9017 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c @@ -140,6 +140,17 @@ PLUGIN_HEADER #define VIEWER_MODE_LINE (BUTTON_EQ | BUTTON_REPEAT) #define VIEWER_MODE_WIDTH BUTTON_MODE +/* iAudio X5 keys */ +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define VIEWER_QUIT BUTTON_POWER +#define VIEWER_PAGE_UP BUTTON_UP +#define VIEWER_PAGE_DOWN BUTTON_DOWN +#define VIEWER_SCREEN_LEFT BUTTON_LEFT +#define VIEWER_SCREEN_RIGHT BUTTON_RIGHT +#define VIEWER_MODE_WRAP (BUTTON_PLAY | BUTTON_REL) +#define VIEWER_MODE_LINE (BUTTON_PLAY | BUTTON_REPEAT) +#define VIEWER_MODE_WIDTH BUTTON_MENU + #endif enum { diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index 3cff78bbc5..88037ac5d5 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c @@ -128,6 +128,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/apps/settings.h b/apps/settings.h index 2490635620..4d7d4fb707 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -107,6 +107,15 @@ #define SETTINGS_OK BUTTON_SELECT #define SETTINGS_CANCEL BUTTON_PLAY +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD +#define SETTINGS_INC BUTTON_UP +#define SETTINGS_DEC BUTTON_DOWN +#define SETTINGS_OK BUTTON_MENU +#define SETTINGS_CANCEL BUTTON_REC +#define SETTINGS_PREV BUTTON_LEFT +#define SETTINGS_NEXT BUTTON_RIGHT +#define SETTINGS_ACCEPT BUTTON_PLAY + #endif /* data structures */ diff --git a/apps/tree.h b/apps/tree.h index ad4a4a91aa..7a9958ca0d 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -164,6 +164,21 @@ #define TREE_WPS_PRE BUTTON_SELECT #define TREE_CONTEXT (BUTTON_RIGHT | BUTTON_REPEAT) #define TREE_POWER_BTN (BUTTON_PLAY | BUTTON_REPEAT) + +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD + +#define TREE_NEXT BUTTON_DOWN +#define TREE_PREV BUTTON_UP +#define TREE_EXIT BUTTON_LEFT +#define TREE_ABORT BUTTON_PLAY +#define TREE_RUN (BUTTON_RIGHT | BUTTON_REL) +#define TREE_RUN_PRE BUTTON_RIGHT +#define TREE_MENU (BUTTON_MENU | BUTTON_REPEAT) +#define TREE_MENU_PRE BUTTON_MENU +#define TREE_WPS (BUTTON_MENU | BUTTON_REL) +#define TREE_WPS_PRE BUTTON_MENU +#define TREE_CONTEXT (BUTTON_RIGHT | BUTTON_REPEAT) +#define TREE_POWER_BTN (BUTTON_PLAY | BUTTON_REPEAT) #endif struct entry { diff --git a/docs/CREDITS b/docs/CREDITS index 78be75b1a6..b6deab6e3a 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -159,3 +159,4 @@ Martin Scarratt Karl Kurbjun Tomasz Malesinski Andrew Pilley +Matt v.d. Westhuizen diff --git a/firmware/export/button.h b/firmware/export/button.h index 7f50b1013c..c251f11890 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h @@ -172,6 +172,17 @@ bool button_hold(void); #define BUTTON_DOWN 0x0020 #define BUTTON_SELECT 0x0100 +#elif CONFIG_KEYPAD == IAUDIO_X5_PAD + +/* TODO: These codes should relate to the hardware */ + +#define BUTTON_PLAY 0x0001 +#define BUTTON_REC 0x0002 +#define BUTTON_POWER 0x0004 +#define BUTTON_UP 0x0008 +#define BUTTON_DOWN 0x0010 +#define BUTTON_MENU 0x0020 + #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ #endif /* _BUTTON_H_ */ diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h index ac3073428b..fd9a8874a7 100644 --- a/firmware/export/config-iaudiox5.h +++ b/firmware/export/config-iaudiox5.h @@ -31,6 +31,9 @@ #define CONFIG_LCD LCD_X5 +/* Define this for LCD backlight available */ +#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled */ + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF @@ -59,9 +62,6 @@ /* The start address index for ROM builds */ #define ROM_START 0x11010 -/* Define this for LCD backlight available */ -#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled */ - /* Define this to the CPU frequency */ #define CPU_FREQ 11289600 diff --git a/uisimulator/sdl/screenhack.c b/uisimulator/sdl/screenhack.c index c77cb575e4..ad138c282e 100644 --- a/uisimulator/sdl/screenhack.c +++ b/uisimulator/sdl/screenhack.c @@ -114,6 +114,10 @@ #define KEYBOARD_SPECIFIC \ "[not written yet]" +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define KEYBOARD_SPECIFIC \ + "[not written yet]" + #endif