From 90bcf9be5ec65894fa75bfc546c6d2a8365ec899 Mon Sep 17 00:00:00 2001 From: Dominik Wenger Date: Fri, 12 Dec 2008 19:50:49 +0000 Subject: [PATCH] m200v4: rename Keys, so they match better other targets with similar key-layout. Enable plugins, add keymaps for plugins. More keymap improvements needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19405 a1c6a512-1295-4272-9138-f99709370657 --- apps/keymaps/keymap-m200.c | 113 ++++++++++-------- apps/plugins/SOURCES | 2 +- apps/plugins/battery_bench.c | 3 +- apps/plugins/blackjack.c | 15 +++ apps/plugins/bounce.c | 4 +- apps/plugins/brickmania.c | 4 +- apps/plugins/calculator.c | 11 ++ apps/plugins/calendar.c | 4 +- apps/plugins/chessbox/chessbox_pgn.h | 15 +++ apps/plugins/chessclock.c | 3 +- apps/plugins/chip8.c | 4 +- apps/plugins/chopper.c | 4 +- apps/plugins/cube.c | 4 +- apps/plugins/dict.c | 3 +- apps/plugins/flipit.c | 12 ++ apps/plugins/jewels.c | 8 +- apps/plugins/jpeg/jpeg.h | 15 +++ apps/plugins/lib/pluginlib_actions.c | 13 +- apps/plugins/logo.c | 4 +- apps/plugins/mandelbrot.c | 12 ++ apps/plugins/midi/midiplay.c | 4 +- apps/plugins/minesweeper.c | 4 +- apps/plugins/mosaique.c | 4 +- apps/plugins/mp3_encoder.c | 4 +- apps/plugins/mpegplayer/mpeg_settings.c | 4 +- apps/plugins/mpegplayer/mpegplayer.c | 4 +- apps/plugins/oscilloscope.c | 11 ++ apps/plugins/pegbox.c | 18 +++ apps/plugins/plasma.c | 4 +- apps/plugins/pong.c | 4 +- apps/plugins/reversi/reversi-gui.h | 4 +- apps/plugins/rockblox.c | 12 ++ apps/plugins/rockblox1d.c | 3 +- apps/plugins/sliding_puzzle.c | 11 +- apps/plugins/snake.c | 3 +- apps/plugins/snake2.c | 3 +- apps/plugins/snow.c | 4 +- apps/plugins/sokoban.c | 16 +++ apps/plugins/solitaire.c | 19 +++ apps/plugins/spacerocks.c | 13 ++ apps/plugins/star.c | 4 +- apps/plugins/starfield.c | 3 +- apps/plugins/stats.c | 4 +- apps/plugins/stopwatch.c | 6 +- apps/plugins/sudoku/sudoku.h | 14 +++ apps/plugins/viewer.c | 12 ++ apps/plugins/vu_meter.c | 13 ++ apps/plugins/wormlet.c | 12 ++ apps/plugins/xobox.c | 8 ++ apps/plugins/zxbox/keymaps.h | 4 +- apps/plugins/zxbox/zxbox_keyb.c | 1 + .../arm/as3525/sansa-m200v4/button-m200v4.c | 10 +- .../arm/as3525/sansa-m200v4/button-target.h | 16 +-- tools/configure | 2 +- 54 files changed, 408 insertions(+), 103 deletions(-) diff --git a/apps/keymaps/keymap-m200.c b/apps/keymaps/keymap-m200.c index 20c2fb931f..86144c0b0c 100644 --- a/apps/keymaps/keymap-m200.c +++ b/apps/keymaps/keymap-m200.c @@ -34,18 +34,19 @@ * Insert LAST_ITEM_IN_LIST at the end of each mapping */ static const struct button_mapping button_context_standard[] = { - { ACTION_STD_PREV, BUTTON_PLAYPAUSE, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, + { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_REPEATAB, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_REPEATAB|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, + { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, + { ACTION_STD_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, +// { ACTION_STD_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE }, // { ACTION_STD_QUICKSCREEN, BUTTON_REC|BUTTON_SELECT, BUTTON_NONE }, LAST_ITEM_IN_LIST @@ -53,8 +54,8 @@ static const struct button_mapping button_context_standard[] = { static const struct button_mapping button_context_wps[] = { - { ACTION_WPS_PLAY, BUTTON_PLAYPAUSE|BUTTON_REL, BUTTON_PLAYPAUSE }, - { ACTION_WPS_STOP, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_PLAYPAUSE }, + { ACTION_WPS_PLAY, BUTTON_UP|BUTTON_REL, BUTTON_UP }, + { ACTION_WPS_STOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP }, { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, @@ -64,35 +65,36 @@ static const struct button_mapping button_context_wps[] = { { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, - { ACTION_WPS_ABSETB_NEXTDIR,BUTTON_MENU|BUTTON_RIGHT, BUTTON_MENU }, - { ACTION_WPS_ABSETA_PREVDIR,BUTTON_MENU|BUTTON_LEFT, BUTTON_MENU }, - { ACTION_WPS_ABRESET, BUTTON_MENU|BUTTON_PLAYPAUSE, BUTTON_MENU }, + { ACTION_WPS_ABSETB_NEXTDIR,BUTTON_POWER|BUTTON_RIGHT, BUTTON_POWER }, + { ACTION_WPS_ABSETA_PREVDIR,BUTTON_POWER|BUTTON_LEFT, BUTTON_POWER }, + { ACTION_WPS_ABRESET, BUTTON_POWER|BUTTON_UP, BUTTON_POWER }, - { ACTION_WPS_VOLUP, BUTTON_VOLUP, BUTTON_NONE }, - { ACTION_WPS_VOLUP, BUTTON_VOLUP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, + { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_VOLDOWN, BUTTON_VOLDOWN, BUTTON_NONE }, - { ACTION_WPS_VOLDOWN, BUTTON_VOLDOWN|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, + { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, + { ACTION_WPS_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, - { ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_PLAYPAUSE, BUTTON_SELECT }, - { ACTION_WPS_ID3SCREEN, BUTTON_SELECT|BUTTON_REPEATAB, BUTTON_SELECT }, - { ACTION_WPS_CONTEXT, BUTTON_REPEATAB|BUTTON_REL, BUTTON_REPEATAB }, - { ACTION_WPS_QUICKSCREEN, BUTTON_REPEATAB|BUTTON_REPEAT, BUTTON_REPEATAB }, + { ACTION_WPS_PITCHSCREEN, BUTTON_SELECT|BUTTON_UP, BUTTON_SELECT }, + { ACTION_WPS_ID3SCREEN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_SELECT }, + { ACTION_WPS_CONTEXT, BUTTON_DOWN|BUTTON_REL, BUTTON_DOWN }, + { ACTION_WPS_QUICKSCREEN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN }, +// { ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST }; /* button_context_wps */ static const struct button_mapping button_context_settings[] = { - { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, { ACTION_SETTINGS_RESET, BUTTON_SELECT, BUTTON_NONE }, - { ACTION_SETTINGS_INC, BUTTON_PLAYPAUSE, BUTTON_NONE }, - { ACTION_SETTINGS_INCREPEAT,BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE }, + { ACTION_SETTINGS_INCREPEAT,BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_SETTINGS_DEC, BUTTON_REPEATAB, BUTTON_NONE }, - { ACTION_SETTINGS_DECREPEAT,BUTTON_REPEATAB|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE }, + { ACTION_SETTINGS_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, @@ -104,6 +106,9 @@ static const struct button_mapping button_context_settings[] = { }; /* button_context_settings */ static const struct button_mapping button_context_list[] = { +// { ACTION_LISTTREE_PGUP, BUTTON_REC|BUTTON_UP, BUTTON_REC }, +// { ACTION_LISTTREE_PGDOWN, BUTTON_REC|BUTTON_DOWN, BUTTON_REC }, + #ifdef HAVE_VOLUME_IN_LIST { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, @@ -138,7 +143,7 @@ static const struct button_mapping button_context_listtree_scroll_without_combo[ }; /* button_context_listtree_scroll_without_combo */ static const struct button_mapping button_context_listtree_scroll_with_combo[] = { - // { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, // { ACTION_TREE_PGLEFT, BUTTON_REC|BUTTON_LEFT, BUTTON_REC }, // { ACTION_TREE_PGLEFT, BUTTON_REC|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, @@ -157,13 +162,13 @@ static const struct button_mapping button_context_yesno[] = { static const struct button_mapping button_context_quickscreen[] = { { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_MENU|BUTTON_REL, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_NONE }, - { ACTION_QS_DOWNINV, BUTTON_PLAYPAUSE|BUTTON_REL, BUTTON_NONE }, - { ACTION_QS_DOWNINV, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REL, BUTTON_NONE }, + { ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_QS_DOWN, BUTTON_REPEATAB|BUTTON_REL, BUTTON_NONE }, - { ACTION_QS_DOWN, BUTTON_REPEATAB|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE }, + { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, @@ -181,17 +186,17 @@ static const struct button_mapping button_context_settings_right_is_inc[] = { { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, { ACTION_SETTINGS_DECREPEAT,BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), }; /* button_context_settings_right_is_inc */ static const struct button_mapping button_context_pitchscreen[] = { - { ACTION_PS_INC_SMALL, BUTTON_PLAYPAUSE, BUTTON_NONE }, - { ACTION_PS_INC_BIG, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE }, + { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_PS_DEC_SMALL, BUTTON_REPEATAB, BUTTON_NONE }, - { ACTION_PS_DEC_BIG, BUTTON_REPEATAB|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE }, + { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, @@ -200,7 +205,7 @@ static const struct button_mapping button_context_pitchscreen[] = { { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, { ACTION_PS_RESET, BUTTON_SELECT, BUTTON_NONE }, - { ACTION_PS_EXIT, BUTTON_MENU, BUTTON_NONE }, + { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), }; /* button_context_pitchscreen */ @@ -208,10 +213,10 @@ static const struct button_mapping button_context_pitchscreen[] = { /** Recording Screen **/ #ifdef HAVE_RECORDING static const struct button_mapping button_context_recscreen[] = { - { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, + { ACTION_STD_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, { ACTION_REC_PAUSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, - { ACTION_STD_CANCEL, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_REC_NEWFILE, BUTTON_REC|BUTTON_REL, BUTTON_REC }, + { ACTION_STD_CANCEL, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, +// { ACTION_REC_NEWFILE, BUTTON_REC|BUTTON_REL, BUTTON_REC }, { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, { ACTION_SETTINGS_INCREPEAT,BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, @@ -225,13 +230,13 @@ static const struct button_mapping button_context_recscreen[] = { /** FM Radio Screen **/ #if CONFIG_TUNER static const struct button_mapping button_context_radio[] = { - { ACTION_NONE, BUTTON_PLAYPAUSE, BUTTON_NONE }, - { ACTION_FM_MENU, BUTTON_REPEATAB, BUTTON_NONE }, + { ACTION_NONE, BUTTON_UP, BUTTON_NONE }, + { ACTION_FM_MENU, BUTTON_DOWN, BUTTON_NONE }, { ACTION_FM_PRESET, BUTTON_SELECT, BUTTON_NONE }, - { ACTION_FM_STOP, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_PLAYPAUSE }, - { ACTION_FM_MODE, BUTTON_REC, BUTTON_NONE }, - { ACTION_FM_EXIT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, - { ACTION_FM_PLAY, BUTTON_PLAYPAUSE|BUTTON_REL, BUTTON_PLAYPAUSE }, + { ACTION_FM_STOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP }, +// { ACTION_FM_MODE, BUTTON_REC, BUTTON_NONE }, + { ACTION_FM_EXIT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, + { ACTION_FM_PLAY, BUTTON_UP|BUTTON_REL, BUTTON_UP }, { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, { ACTION_SETTINGS_INCREPEAT,BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, @@ -247,15 +252,15 @@ static const struct button_mapping button_context_keyboard[] = { { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, -// { ACTION_KBD_CURSOR_LEFT, BUTTON_REC|BUTTON_LEFT, BUTTON_NONE }, -// { ACTION_KBD_CURSOR_LEFT, BUTTON_REC|BUTTON_LEFT|BUTTON_REPEAT,BUTTON_NONE }, + // { ACTION_KBD_CURSOR_LEFT, BUTTON_REC|BUTTON_LEFT, BUTTON_NONE }, +// { ACTION_KBD_CURSOR_LEFT, BUTTON_REC|BUTTON_LEFT|BUTTON_REPEAT,BUTTON_NONE }, // { ACTION_KBD_CURSOR_RIGHT, BUTTON_REC|BUTTON_RIGHT, BUTTON_NONE }, // { ACTION_KBD_CURSOR_RIGHT, BUTTON_REC|BUTTON_RIGHT|BUTTON_REPEAT,BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_PLAYPAUSE, BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_PLAYPAUSE|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_REPEATAB, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_REPEATAB|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE }, + { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE }, + { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, // { ACTION_KBD_BACKSPACE, BUTTON_REC|BUTTON_VOLDOWN, BUTTON_NONE }, // { ACTION_KBD_BACKSPACE, BUTTON_REC|BUTTON_VOLDOWN|BUTTON_REPEAT,BUTTON_NONE }, @@ -263,8 +268,9 @@ static const struct button_mapping button_context_keyboard[] = { // { ACTION_KBD_PAGE_FLIP, BUTTON_REC|BUTTON_SELECT, BUTTON_REC }, { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, - { ACTION_KBD_DONE, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, - { ACTION_KBD_ABORT, BUTTON_MENU, BUTTON_NONE }, + { ACTION_KBD_DONE, BUTTON_VOL_UP, BUTTON_NONE }, + { ACTION_KBD_DONE, BUTTON_VOL_DOWN, BUTTON_NONE }, + { ACTION_KBD_ABORT, BUTTON_POWER, BUTTON_NONE }, LAST_ITEM_IN_LIST }; /* button_context_keyboard */ @@ -303,6 +309,7 @@ const struct button_mapping* get_context_mapping(int context) case CONTEXT_CUSTOM|CONTEXT_SETTINGS: case CONTEXT_SETTINGS_COLOURCHOOSER: case CONTEXT_SETTINGS_EQ: + case CONTEXT_SETTINGS_RECTRIGGER: return button_context_settings_right_is_inc; case CONTEXT_YESNOSCREEN: diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index a4ddbacfd0..5577d632ea 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -80,7 +80,7 @@ solitaire.c sokoban.c star.c starfield.c -#if CONFIG_LCD == LCD_SSD1815 +#if (CONFIG_LCD == LCD_SSD1815) && (CONFIG_CODEC != SWCODEC) video.c #endif vu_meter.c diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 0c30ebabc3..7c67cca937 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -99,7 +99,8 @@ PLUGIN_HEADER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ -(CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define BATTERY_ON BUTTON_SELECT #define BATTERY_OFF BUTTON_POWER #define BATTERY_ON_TXT "SELECT - start" diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index bf5a9b0b27..237bd31abd 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c @@ -205,6 +205,21 @@ PLUGIN_HEADER #define BJACK_RIGHT BUTTON_RIGHT #define BJACK_LEFT BUTTON_LEFT +#elif CONFIG_KEYPAD == SANSA_M200_PAD +#define BJACK_START (BUTTON_SELECT | BUTTON_REL) +#define BJACK_QUIT BUTTON_POWER +#define BJACK_MAX BUTTON_VOL_UP +#define BJACK_MIN BUTTON_VOL_DOWN +#define BJACK_HIT (BUTTON_SELECT | BUTTON_REL) +#define BJACK_STAY BUTTON_RIGHT +#define BJACK_DOUBLEDOWN BUTTON_LEFT +#define BJACK_SCORES (BUTTON_SELECT | BUTTON_UP) +#define BJACK_RESUME BUTTON_DOWN +#define BJACK_UP BUTTON_UP +#define BJACK_DOWN BUTTON_DOWN +#define BJACK_RIGHT BUTTON_RIGHT +#define BJACK_LEFT BUTTON_LEFT + #elif CONFIG_KEYPAD == ELIO_TPJ1022_PAD #define BJACK_START BUTTON_MAIN #define BJACK_QUIT BUTTON_POWER diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index 2164636b7d..54b6714990 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c @@ -100,7 +100,9 @@ PLUGIN_HEADER #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_SELECT -#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD #define BOUNCE_LEFT BUTTON_LEFT #define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 1a9db8acbb..5a198d47eb 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -116,7 +116,9 @@ PLUGIN_HEADER #define SCROLL_BACK(x) ((x) & BUTTON_SCROLL_BACK) -#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD #define QUIT BUTTON_POWER #define LEFT BUTTON_LEFT diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c index c7722e3777..214932e0a9 100644 --- a/apps/plugins/calculator.c +++ b/apps/plugins/calculator.c @@ -220,6 +220,17 @@ PLUGIN_HEADER #define CALCULATOR_CALC (BUTTON_SELECT|BUTTON_REPEAT) #define CALCULATOR_CLEAR BUTTON_HOME +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) +#define CALCULATOR_LEFT BUTTON_LEFT +#define CALCULATOR_RIGHT BUTTON_RIGHT +#define CALCULATOR_UP BUTTON_UP +#define CALCULATOR_DOWN BUTTON_DOWN +#define CALCULATOR_QUIT BUTTON_POWER +#define CALCULATOR_INPUT_CALC_PRE BUTTON_SELECT +#define CALCULATOR_INPUT (BUTTON_SELECT|BUTTON_REL) +#define CALCULATOR_CALC (BUTTON_SELECT|BUTTON_REPEAT) +#define CALCULATOR_CLEAR (BUTTON_SELECT|BUTTON_UP) + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define CALCULATOR_LEFT BUTTON_LEFT diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 794e9f86da..17b98c7f56 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c @@ -100,7 +100,9 @@ PLUGIN_HEADER #define CALENDAR_NEXT_MONTH BUTTON_DOWN #define CALENDAR_PREV_MONTH BUTTON_UP -#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD #define CALENDAR_QUIT BUTTON_POWER #define CALENDAR_SELECT BUTTON_SELECT #define CALENDAR_NEXT_WEEK BUTTON_DOWN diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h index c454058fe2..970bcc466a 100644 --- a/apps/plugins/chessbox/chessbox_pgn.h +++ b/apps/plugins/chessbox/chessbox_pgn.h @@ -216,6 +216,21 @@ #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) +#elif CONFIG_KEYPAD == SANSA_M200_PAD +#define CB_SELECT (BUTTON_SELECT | BUTTON_REPEAT) +#define CB_UP BUTTON_UP +#define CB_DOWN BUTTON_DOWN +#define CB_LEFT BUTTON_LEFT +#define CB_RIGHT BUTTON_RIGHT +#define CB_PLAY BUTTON_VOL_UP +#define CB_LEVEL (BUTTON_SELECT | BUTTON_UP) +#define CB_MENU BUTTON_POWER + +#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT) +#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT) +#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) +#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) + #elif CONFIG_KEYPAD == SANSA_C200_PAD #define CB_SELECT BUTTON_SELECT #define CB_UP BUTTON_UP diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index a839954d8a..725a5cd037 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -123,7 +123,8 @@ PLUGIN_HEADER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ -(CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define CHC_QUIT BUTTON_POWER #define CHC_STARTSTOP BUTTON_SELECT #define CHC_RESET BUTTON_DOWN diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 83bd7262c8..29262e481a 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c @@ -1030,7 +1030,9 @@ STATIC void chip8 (void) #define CHIP8_KEY6 BUTTON_RIGHT #define CHIP8_KEY8 BUTTON_SCROLL_FWD -#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD #define CHIP8_OFF BUTTON_POWER #define CHIP8_KEY2 BUTTON_VOL_UP #define CHIP8_KEY4 BUTTON_LEFT diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index b827c7125a..f30aed4aa5 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -67,7 +67,9 @@ Still To do: #define ACTIONTEXT "RIGHT" #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define QUIT BUTTON_POWER #define ACTION BUTTON_SELECT #define ACTIONTEXT "SELECT" diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 3e27cbb053..7c651fca8c 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c @@ -140,7 +140,9 @@ PLUGIN_HEADER #define CUBE_PAUSE BUTTON_UP #define CUBE_HIGHSPEED BUTTON_SELECT -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define CUBE_QUIT BUTTON_POWER #define CUBE_NEXT BUTTON_RIGHT #define CUBE_PREV BUTTON_LEFT diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c index 3004218f23..e263afebb2 100644 --- a/apps/plugins/dict.c +++ b/apps/plugins/dict.c @@ -119,7 +119,8 @@ long reverse (long N) { #define LP_QUIT BUTTON_POWER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ -(CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define LP_QUIT BUTTON_POWER #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define LP_QUIT BUTTON_POWER diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index 9bc5659710..e5863bd4b1 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -167,6 +167,18 @@ PLUGIN_HEADER #define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_SELECT) #define FLIPIT_TOGGLE BUTTON_SELECT +#elif CONFIG_KEYPAD == SANSA_M200_PAD + +#define FLIPIT_LEFT BUTTON_LEFT +#define FLIPIT_RIGHT BUTTON_RIGHT +#define FLIPIT_UP BUTTON_UP +#define FLIPIT_DOWN BUTTON_DOWN +#define FLIPIT_QUIT BUTTON_POWER +#define FLIPIT_SHUFFLE (BUTTON_SELECT | BUTTON_LEFT) +#define FLIPIT_SOLVE (BUTTON_SELECT | BUTTON_RIGHT) +#define FLIPIT_STEP_BY_STEP (BUTTON_SELECT | BUTTON_UP) +#define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL) + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define FLIPIT_LEFT BUTTON_LEFT diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index e453750fa5..1c3fc84d96 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -108,7 +108,9 @@ PLUGIN_HEADER #define JEWELS_SELECT BUTTON_SELECT #define JEWELS_CANCEL BUTTON_POWER -#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD #define JEWELS_UP BUTTON_UP #define JEWELS_DOWN BUTTON_DOWN #define JEWELS_LEFT BUTTON_LEFT @@ -1578,7 +1580,9 @@ static int jewels_main(struct game_context* bj) { rb->lcd_puts(0, 10, "Long SELECT to show menu"); rb->lcd_puts(0, 11, "POWER to cancel"); #elif CONFIG_KEYPAD == SANSA_E200_PAD \ - || CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD + || CONFIG_KEYPAD == SANSA_C200_PAD \ + || CONFIG_KEYPAD == SANSA_CLIP_PAD \ + || CONFIG_KEYPAD == SANSA_M200_PAD rb->lcd_puts(0, 2, "Swap pairs of jewels to"); rb->lcd_puts(0, 3, "form connected segments"); rb->lcd_puts(0, 4, "of three or more of the"); diff --git a/apps/plugins/jpeg/jpeg.h b/apps/plugins/jpeg/jpeg.h index 178ff2dae5..23347b9e2a 100644 --- a/apps/plugins/jpeg/jpeg.h +++ b/apps/plugins/jpeg/jpeg.h @@ -163,6 +163,21 @@ #define JPEG_PREVIOUS BUTTON_VOL_DOWN #define JPEG_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT) +#elif CONFIG_KEYPAD == SANSA_M200_PAD +#define JPEG_ZOOM_PRE BUTTON_SELECT +#define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL) +#define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT) +#define JPEG_UP BUTTON_UP +#define JPEG_DOWN BUTTON_DOWN +#define JPEG_LEFT BUTTON_LEFT +#define JPEG_RIGHT BUTTON_RIGHT +#define JPEG_MENU BUTTON_POWER +#define JPEG_SLIDE_SHOW (BUTTON_SELECT | BUTTON_UP) +#define JPEG_NEXT BUTTON_VOL_UP +#define JPEG_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT) +#define JPEG_PREVIOUS BUTTON_VOL_DOWN +#define JPEG_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT) + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define JPEG_ZOOM_PRE BUTTON_PLAY #define JPEG_ZOOM_IN (BUTTON_PLAY | BUTTON_REL) diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c index dd111d67d5..af6dc55f80 100644 --- a/apps/plugins/lib/pluginlib_actions.c +++ b/apps/plugins/lib/pluginlib_actions.c @@ -89,7 +89,8 @@ const struct button_mapping generic_directions[] = || (CONFIG_KEYPAD == MROBE100_PAD) \ || (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) \ || (CONFIG_KEYPAD == SANSA_CLIP_PAD) \ - || (CONFIG_KEYPAD == CREATIVEZVM_PAD) + || (CONFIG_KEYPAD == CREATIVEZVM_PAD) \ + || (CONFIG_KEYPAD == SANSA_M200_PAD) { PLA_UP, BUTTON_UP, BUTTON_NONE}, { PLA_DOWN, BUTTON_DOWN, BUTTON_NONE}, { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE}, @@ -189,7 +190,8 @@ const struct button_mapping generic_left_right_fire[] = || (CONFIG_KEYPAD == GIGABEAT_S_PAD) \ || (CONFIG_KEYPAD == MROBE100_PAD) \ || (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) \ - || (CONFIG_KEYPAD == SANSA_CLIP_PAD) + || (CONFIG_KEYPAD == SANSA_CLIP_PAD) \ + || (CONFIG_KEYPAD == SANSA_M200_PAD) { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE}, { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE}, { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE}, @@ -369,7 +371,9 @@ const struct button_mapping generic_actions[] = {PLA_MENU, BUTTON_DOWN, BUTTON_NONE}, {PLA_FIRE, BUTTON_SELECT, BUTTON_NONE}, {PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE}, -#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD {PLA_QUIT, BUTTON_POWER, BUTTON_NONE}, {PLA_START, BUTTON_UP, BUTTON_NONE}, {PLA_MENU, BUTTON_DOWN, BUTTON_NONE}, @@ -455,7 +459,8 @@ const struct button_mapping generic_increase_decrease[] = || (CONFIG_KEYPAD == MROBE100_PAD) \ || (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) \ || (CONFIG_KEYPAD == SANSA_CLIP_PAD) \ - || (CONFIG_KEYPAD == CREATIVEZVM_PAD) + || (CONFIG_KEYPAD == CREATIVEZVM_PAD) \ + || (CONFIG_KEYPAD == SANSA_M200_PAD) {PLA_INC, BUTTON_UP, BUTTON_NONE}, {PLA_DEC, BUTTON_DOWN, BUTTON_NONE}, {PLA_INC_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE}, diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 846d3214df..5fd87a6bb7 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c @@ -96,7 +96,9 @@ const unsigned char rockbox16x7[] = { #define LP_INC_Y BUTTON_UP #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define LP_QUIT BUTTON_POWER #define LP_DEC_X BUTTON_LEFT #define LP_INC_X BUTTON_RIGHT diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index 39ecd5b7d1..536ef09e60 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c @@ -162,6 +162,18 @@ PLUGIN_HEADER #define MANDELBROT_MAXITER_DEC (BUTTON_SELECT | BUTTON_LEFT) #define MANDELBROT_RESET BUTTON_HOME +#elif CONFIG_KEYPAD == SANSA_M200_PAD +#define MANDELBROT_QUIT BUTTON_POWER +#define MANDELBROT_UP BUTTON_UP +#define MANDELBROT_DOWN BUTTON_DOWN +#define MANDELBROT_LEFT BUTTON_LEFT +#define MANDELBROT_RIGHT BUTTON_RIGHT +#define MANDELBROT_ZOOM_IN BUTTON_VOL_UP +#define MANDELBROT_ZOOM_OUT BUTTON_VOL_DOWN +#define MANDELBROT_MAXITER_INC (BUTTON_SELECT | BUTTON_RIGHT) +#define MANDELBROT_MAXITER_DEC (BUTTON_SELECT | BUTTON_LEFT) +#define MANDELBROT_RESET (BUTTON_SELECT | BUTTON_UP) + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define MANDELBROT_QUIT BUTTON_POWER #define MANDELBROT_UP BUTTON_SCROLL_UP diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c index 9380e14c80..40141f496e 100644 --- a/apps/plugins/midi/midiplay.c +++ b/apps/plugins/midi/midiplay.c @@ -92,7 +92,9 @@ PLUGIN_IRAM_DECLARE #define BTN_PLAY BUTTON_UP -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define BTN_QUIT BUTTON_POWER #define BTN_RIGHT BUTTON_RIGHT #define BTN_LEFT BUTTON_LEFT diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 7d361a2db2..071c5d786c 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -132,7 +132,9 @@ enum minesweeper_status { # define MINESWP_DISCOVER BUTTON_SELECT # define MINESWP_INFO (BUTTON_REC|BUTTON_REPEAT) -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) # define MINESWP_LEFT BUTTON_LEFT # define MINESWP_RIGHT BUTTON_RIGHT # define MINESWP_UP BUTTON_UP diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index 5560ef35d1..4d543e1d36 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c @@ -94,7 +94,9 @@ PLUGIN_HEADER #define MOSAIQUE_RESTART BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define MOSAIQUE_QUIT BUTTON_POWER #define MOSAIQUE_SPEED BUTTON_DOWN #define MOSAIQUE_RESTART BUTTON_SELECT diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c index 3141c8d95e..8c060799d7 100644 --- a/apps/plugins/mp3_encoder.c +++ b/apps/plugins/mp3_encoder.c @@ -2430,7 +2430,9 @@ void get_mp3_filename(const char *wav_name) #define MP3ENC_DONE BUTTON_POWER #define MP3ENC_SELECT BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define MP3ENC_PREV BUTTON_UP #define MP3ENC_NEXT BUTTON_DOWN #define MP3ENC_DONE BUTTON_POWER diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 3672abbfb3..2b423d28e9 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -83,7 +83,9 @@ struct mpeg_settings settings; #define MPEG_START_TIME_DOWN BUTTON_DOWN #define MPEG_START_TIME_EXIT BUTTON_POWER -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define MPEG_START_TIME_SELECT BUTTON_SELECT #define MPEG_START_TIME_SCROLL_UP BUTTON_VOL_UP #define MPEG_START_TIME_SCROLL_DOWN BUTTON_VOL_DOWN diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 42c1426468..02eb0863ff 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -189,7 +189,9 @@ PLUGIN_IRAM_DECLARE #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT -#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD #define MPEG_MENU BUTTON_SELECT #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_UP diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c index dd148216a1..d197272e9a 100644 --- a/apps/plugins/oscilloscope.c +++ b/apps/plugins/oscilloscope.c @@ -133,6 +133,17 @@ PLUGIN_HEADER #define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP #define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) +#define OSCILLOSCOPE_QUIT BUTTON_POWER +#define OSCILLOSCOPE_DRAWMODE (BUTTON_SELECT | BUTTON_REL) +#define OSCILLOSCOPE_ADVMODE BUTTON_DOWN +#define OSCILLOSCOPE_ORIENTATION BUTTON_UP +#define OSCILLOSCOPE_PAUSE (BUTTON_SELECT | BUTTON_UP) +#define OSCILLOSCOPE_SPEED_UP BUTTON_RIGHT +#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT +#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP +#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN + #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD #define OSCILLOSCOPE_QUIT BUTTON_POWER #define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_SELECT diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index c2b54eba70..bf40032cf8 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c @@ -279,6 +279,24 @@ PLUGIN_HEADER #define LVL_UP_TEXT "VOL+" #define LVL_DOWN_TEXT "VOL-" +#elif CONFIG_KEYPAD == SANSA_M200_PAD +#define PEGBOX_SAVE (BUTTON_SELECT | BUTTON_REL) +#define PEGBOX_QUIT BUTTON_POWER +#define PEGBOX_RESTART (BUTTON_SELECT | BUTTON_UP) +#define PEGBOX_LVL_UP BUTTON_VOL_UP +#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN +#define PEGBOX_UP BUTTON_UP +#define PEGBOX_DOWN BUTTON_DOWN +#define PEGBOX_RIGHT BUTTON_RIGHT +#define PEGBOX_LEFT BUTTON_LEFT + +#define SAVE_TEXT "SELECT" +#define QUIT_TEXT "POWER" +#define RESTART_TEXT "SELECT+UP" +#define LVL_UP_TEXT "VOL+" +#define LVL_DOWN_TEXT "VOL-" + + #elif CONFIG_KEYPAD == IAUDIO_M3_PAD #define PEGBOX_SAVE BUTTON_RC_PLAY #define PEGBOX_QUIT BUTTON_RC_REC diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index a821718f46..7c74a86917 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c @@ -68,7 +68,9 @@ static int plasma_frequency; #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define PLASMA_QUIT BUTTON_POWER #define PLASMA_INCREASE_FREQUENCY BUTTON_UP #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index fc672c9851..eeda405ae4 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c @@ -102,7 +102,9 @@ PLUGIN_HEADER #define PONG_RIGHT_UP BUTTON_VOL_UP #define PONG_RIGHT_DOWN BUTTON_VOL_DOWN -#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define PONG_QUIT BUTTON_POWER #define PONG_PAUSE BUTTON_SELECT #define PONG_LEFT_UP BUTTON_LEFT diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index 826e9b12bb..2db10fed6a 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h @@ -107,7 +107,9 @@ #define REVERSI_BUTTON_MENU BUTTON_PLAY #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define REVERSI_BUTTON_QUIT BUTTON_POWER #define REVERSI_BUTTON_UP BUTTON_UP #define REVERSI_BUTTON_DOWN BUTTON_DOWN diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 38d919a258..6c403e76ed 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -147,6 +147,18 @@ PLUGIN_HEADER #define ROCKBLOX_DROP BUTTON_SELECT #define ROCKBLOX_RESTART BUTTON_HOME +#elif CONFIG_KEYPAD == SANSA_M200_PAD + +#define ROCKBLOX_OFF BUTTON_POWER +#define ROCKBLOX_ROTATE_RIGHT BUTTON_UP +#define ROCKBLOX_ROTATE_RIGHT2 BUTTON_VOL_DOWN +#define ROCKBLOX_ROTATE_LEFT BUTTON_VOL_UP +#define ROCKBLOX_DOWN BUTTON_DOWN +#define ROCKBLOX_LEFT BUTTON_LEFT +#define ROCKBLOX_RIGHT BUTTON_RIGHT +#define ROCKBLOX_RESTART (BUTTON_SELECT | BUTTON_UP) +#define ROCKBLOX_DROP (BUTTON_SELECT | BUTTON_REL) + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define ROCKBLOX_OFF BUTTON_POWER diff --git a/apps/plugins/rockblox1d.c b/apps/plugins/rockblox1d.c index 295bd225b9..12f939a319 100644 --- a/apps/plugins/rockblox1d.c +++ b/apps/plugins/rockblox1d.c @@ -58,7 +58,8 @@ PLUGIN_HEADER #define ONEDROCKBLOX_QUIT BUTTON_POWER #elif CONFIG_KEYPAD == SANSA_E200_PAD || CONFIG_KEYPAD == SANSA_C200_PAD || \ -CONFIG_KEYPAD == SANSA_CLIP_PAD +CONFIG_KEYPAD == SANSA_CLIP_PAD || \ +CONFIG_KEYPAD == SANSA_M200_PAD #define ONEDROCKBLOX_DOWN BUTTON_SELECT #define ONEDROCKBLOX_QUIT BUTTON_POWER diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index fddb6bebc2..85f4d32f68 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c @@ -95,7 +95,7 @@ PLUGIN_HEADER #define PUZZLE_PICTURE BUTTON_A #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) #define PUZZLE_QUIT BUTTON_POWER #define PUZZLE_LEFT BUTTON_LEFT #define PUZZLE_RIGHT BUTTON_RIGHT @@ -113,6 +113,15 @@ PLUGIN_HEADER #define PUZZLE_SHUFFLE BUTTON_HOME #define PUZZLE_PICTURE BUTTON_SELECT +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) +#define PUZZLE_QUIT BUTTON_POWER +#define PUZZLE_LEFT BUTTON_LEFT +#define PUZZLE_RIGHT BUTTON_RIGHT +#define PUZZLE_UP BUTTON_UP +#define PUZZLE_DOWN BUTTON_DOWN +#define PUZZLE_SHUFFLE (BUTTON_SELECT | BUTTON_UP) +#define PUZZLE_PICTURE (BUTTON_SELECT | BUTTON_REL) + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define PUZZLE_QUIT BUTTON_POWER #define PUZZLE_LEFT BUTTON_LEFT diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index e6cbcc84dc..b2a592883c 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c @@ -101,7 +101,8 @@ PLUGIN_HEADER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ -(CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define SNAKE_QUIT BUTTON_POWER #define SNAKE_LEFT BUTTON_LEFT #define SNAKE_RIGHT BUTTON_RIGHT diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index b17a47b44c..061fdb2a5d 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -234,7 +234,8 @@ PLUGIN_HEADER #define SNAKE2_PLAYPAUSE BUTTON_SELECT #define SNAKE2_PLAYPAUSE_TEXT "Select" -#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define SNAKE2_LEFT BUTTON_LEFT #define SNAKE2_RIGHT BUTTON_RIGHT #define SNAKE2_UP BUTTON_UP diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index 4f8c3dce12..c73fd2e58b 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c @@ -49,7 +49,9 @@ PLUGIN_HEADER #elif CONFIG_KEYPAD == GIGABEAT_PAD #define SNOW_QUIT BUTTON_POWER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define SNOW_QUIT BUTTON_POWER #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define SNOW_QUIT BUTTON_POWER diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 4940ac24ab..4d2de8aedb 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -252,6 +252,22 @@ PLUGIN_HEADER #define BUTTON_SAVE BUTTON_SELECT #define BUTTON_SAVE_NAME "SELECT" +#elif CONFIG_KEYPAD == SANSA_M200_PAD +#define SOKOBAN_LEFT BUTTON_LEFT +#define SOKOBAN_RIGHT BUTTON_RIGHT +#define SOKOBAN_UP BUTTON_UP +#define SOKOBAN_DOWN BUTTON_DOWN +#define SOKOBAN_MENU BUTTON_POWER +#define SOKOBAN_UNDO_PRE BUTTON_SELECT +#define SOKOBAN_UNDO (BUTTON_SELECT | BUTTON_REL) +#define SOKOBAN_REDO (BUTTON_SELECT | BUTTON_UP) +#define SOKOBAN_LEVEL_DOWN BUTTON_VOL_DOWN +#define SOKOBAN_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_RIGHT) +#define SOKOBAN_LEVEL_UP BUTTON_VOL_UP +#define SOKOBAN_PAUSE BUTTON_SELECT +#define BUTTON_SAVE BUTTON_SELECT +#define BUTTON_SAVE_NAME "SELECT" + #elif CONFIG_KEYPAD == GIGABEAT_S_PAD #define SOKOBAN_LEFT BUTTON_LEFT #define SOKOBAN_RIGHT BUTTON_RIGHT diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index ea2246c442..e29e0b55cc 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -239,6 +239,25 @@ static const struct plugin_api* rb; # define HK_CUR2STACK "DOUBLE SELECT" # define HK_REM2STACK "RIGHT" +#elif CONFIG_KEYPAD == SANSA_M200_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_PRE BUTTON_SELECT +# define SOL_MOVE (BUTTON_SELECT | BUTTON_REL) +# define SOL_DRAW (BUTTON_SELECT | BUTTON_UP) +# define SOL_REM2CUR BUTTON_VOL_DOWN +# define SOL_CUR2STACK_PRE BUTTON_SELECT +# define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_REPEAT) +# define SOL_REM2STACK BUTTON_VOL_UP +# define HK_MOVE "SELECT" +# define HK_DRAW "SELECT + UP" +# define HK_REM2CUR "LEFT" +# define HK_CUR2STACK "DOUBLE SELECT" +# define HK_REM2STACK "RIGHT" + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) # define SOL_QUIT BUTTON_POWER # define SOL_UP BUTTON_SCROLL_UP diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index 1926c9bf04..2b22bb491e 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c @@ -161,6 +161,19 @@ static const struct plugin_api* rb; /* global api struct pointer */ #define AST_FIRE BUTTON_SELECT #define AST_FIRE_REP (BUTTON_SELECT | BUTTON_REPEAT) +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) +#define AST_PAUSE (BUTTON_SELECT | BUTTON_UP) +#define AST_QUIT BUTTON_POWER +#define AST_THRUST_REP (BUTTON_UP | BUTTON_REPEAT) +#define AST_THRUST BUTTON_UP +#define AST_HYPERSPACE BUTTON_DOWN +#define AST_LEFT BUTTON_LEFT +#define AST_LEFT_REP (BUTTON_LEFT | BUTTON_REPEAT) +#define AST_RIGHT BUTTON_RIGHT +#define AST_RIGHT_REP (BUTTON_RIGHT | BUTTON_REPEAT) +#define AST_FIRE (BUTTON_SELECT | BUTTON_REL) +#define AST_FIRE_REP (BUTTON_SELECT | BUTTON_REPEAT) + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define AST_PAUSE BUTTON_PLAY #define AST_QUIT BUTTON_POWER diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 0ba6f73f8b..f358755e2a 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -161,7 +161,9 @@ PLUGIN_HEADER #define STAR_MENU_RUN BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define STAR_QUIT BUTTON_POWER #define STAR_LEFT BUTTON_LEFT diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c index b0555f722f..6fe01d5509 100644 --- a/apps/plugins/starfield.c +++ b/apps/plugins/starfield.c @@ -61,7 +61,8 @@ static const struct plugin_api* rb; /* global api struct pointer */ #define STARFIELD_TOGGLE_COLOR BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ -(CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define STARFIELD_QUIT BUTTON_POWER #define STARFIELD_INCREASE_ZMOVE BUTTON_UP #define STARFIELD_DECREASE_ZMOVE BUTTON_DOWN diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c index 9dfd3ec96c..18cd30465e 100644 --- a/apps/plugins/stats.c +++ b/apps/plugins/stats.c @@ -56,7 +56,9 @@ static bool abort; #define STATS_STOP BUTTON_POWER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define STATS_STOP BUTTON_POWER #elif CONFIG_KEYPAD == IRIVER_H10_PAD diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index 5090305511..debdd5b8b2 100644 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c @@ -104,14 +104,18 @@ PLUGIN_HEADER #define STOPWATCH_LAP_TIMER BUTTON_MENU #define STOPWATCH_SCROLL_UP BUTTON_UP #define STOPWATCH_SCROLL_DOWN BUTTON_DOWN + #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define STOPWATCH_QUIT BUTTON_POWER #define STOPWATCH_START_STOP BUTTON_RIGHT #define STOPWATCH_RESET_TIMER BUTTON_LEFT #define STOPWATCH_LAP_TIMER BUTTON_SELECT #define STOPWATCH_SCROLL_UP BUTTON_UP #define STOPWATCH_SCROLL_DOWN BUTTON_DOWN + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define STOPWATCH_QUIT BUTTON_POWER #define STOPWATCH_START_STOP BUTTON_PLAY diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h index 83da2e85c7..1cc996d172 100644 --- a/apps/plugins/sudoku/sudoku.h +++ b/apps/plugins/sudoku/sudoku.h @@ -162,6 +162,20 @@ #define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) #define SUDOKU_BUTTON_POSSIBLE BUTTON_HOME +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) +#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER +#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) +#define SUDOKU_BUTTON_UP BUTTON_UP +#define SUDOKU_BUTTON_DOWN BUTTON_DOWN +#define SUDOKU_BUTTON_LEFT BUTTON_LEFT +#define SUDOKU_BUTTON_RIGHT BUTTON_RIGHT +#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN +#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP +#define SUDOKU_BUTTON_ALTTOGGLE (BUTTON_SELECT | BUTTON_REL) +#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER +#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) +#define SUDOKU_BUTTON_POSSIBLE (BUTTON_SELECT | BUTTON_UP) + #elif CONFIG_KEYPAD == MROBE500_PAD #define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER #define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 4cef7c5879..625ab93cc4 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c @@ -209,6 +209,18 @@ PLUGIN_HEADER #define VIEWER_LINE_UP BUTTON_UP #define VIEWER_LINE_DOWN BUTTON_DOWN +/* Sansa M200 keys */ +#elif CONFIG_KEYPAD == SANSA_M200_PAD +#define VIEWER_QUIT BUTTON_POWER +#define VIEWER_PAGE_UP BUTTON_VOL_UP +#define VIEWER_PAGE_DOWN BUTTON_VOL_DOWN +#define VIEWER_SCREEN_LEFT BUTTON_LEFT +#define VIEWER_SCREEN_RIGHT BUTTON_RIGHT +#define VIEWER_MENU (BUTTON_SELECT | BUTTON_UP) +#define VIEWER_AUTOSCROLL (BUTTON_SELECT | BUTTON_REL) +#define VIEWER_LINE_UP BUTTON_UP +#define VIEWER_LINE_DOWN BUTTON_DOWN + /* iriver H10 keys */ #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define VIEWER_QUIT BUTTON_POWER diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 77f7a707b1..7b29589428 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c @@ -150,6 +150,19 @@ PLUGIN_HEADER #define LABEL_MENU "SELECT" #define LABEL_VOLUME "VOL UP/DN" +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) +#define VUMETER_QUIT BUTTON_POWER +#define VUMETER_HELP (BUTTON_SELECT | BUTTON_UP) +#define VUMETER_MENU (BUTTON_SELECT | BUTTON_REL) +#define VUMETER_MENU_EXIT (BUTTON_SELECT | BUTTON_REL) +#define VUMETER_MENU_EXIT2 BUTTON_POWER +#define VUMETER_UP BUTTON_VOL_UP +#define VUMETER_DOWN BUTTON_VOL_DOWN +#define LABEL_HELP "SELECT + UP" +#define LABEL_QUIT "POWER" +#define LABEL_MENU "SELECT" +#define LABEL_VOLUME "VOL UP/DN" + #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD #define VUMETER_QUIT BUTTON_POWER #define VUMETER_HELP BUTTON_PLAY diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 5e912e90a2..6c44bb486d 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -178,6 +178,18 @@ PLUGIN_HEADER #define PLAYERS_TEXT "Up/Down" #define WORMS_TEXT "Left/Right" +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) + +#define BTN_DIR_UP BUTTON_UP +#define BTN_DIR_DOWN BUTTON_DOWN +#define BTN_DIR_LEFT BUTTON_LEFT +#define BTN_DIR_RIGHT BUTTON_RIGHT +#define BTN_STARTPAUSE (BUTTON_SELECT | BUTTON_REL) +#define BTN_QUIT BUTTON_POWER +#define BTN_STOPRESET (BUTTON_SELECT | BUTTON_UP) + +#define PLAYERS_TEXT "Up/Down" +#define WORMS_TEXT "Left/Right" #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index b6bed51163..dc102b61f5 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -96,6 +96,14 @@ PLUGIN_HEADER #define DOWN BUTTON_DOWN #define PAUSE BUTTON_HOME +#elif (CONFIG_KEYPAD == SANSA_M200_PAD) + +#define QUIT BUTTON_POWER +#define LEFT BUTTON_LEFT +#define RIGHT BUTTON_RIGHT +#define UP BUTTON_UP +#define DOWN BUTTON_DOWN +#define PAUSE BUTTON_SELECT #elif CONFIG_KEYPAD == IRIVER_H10_PAD diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h index 2145c69565..4d2b4a9384 100644 --- a/apps/plugins/zxbox/keymaps.h +++ b/apps/plugins/zxbox/keymaps.h @@ -87,7 +87,9 @@ #define ZX_DOWN BUTTON_SCROLL_DOWN #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) #define ZX_SELECT BUTTON_SELECT #define ZX_MENU BUTTON_POWER #define ZX_LEFT BUTTON_LEFT diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c index 6673258bdd..7ae3862fc2 100644 --- a/apps/plugins/zxbox/zxbox_keyb.c +++ b/apps/plugins/zxbox/zxbox_keyb.c @@ -113,6 +113,7 @@ #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ +(CONFIG_KEYPAD == SANSA_M200_PAD) || \ (CONFIG_KEYPAD == MROBE100_PAD) /* TODO: Check keyboard mappings */ diff --git a/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c b/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c index a10956657f..d6bf0acf9b 100644 --- a/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c +++ b/firmware/target/arm/as3525/sansa-m200v4/button-m200v4.c @@ -41,7 +41,7 @@ int button_read_device(void) /* direct GPIO connections */ if (GPIOA_PIN(3)) - result |= BUTTON_MENU; + result |= BUTTON_POWER; /* This is a keypad using A4-A6 as columns and A0-A2 as rows */ GPIOA_PIN(4) = (1<<4); @@ -50,10 +50,10 @@ int button_read_device(void) /* A4A0 is unused */ if (GPIOA_PIN(1)) - result |= BUTTON_VOLDOWN; + result |= BUTTON_VOL_DOWN; if (GPIOA_PIN(2)) - result |= BUTTON_PLAYPAUSE; + result |= BUTTON_UP; GPIOA_PIN(4) = 0x00; @@ -76,10 +76,10 @@ int button_read_device(void) btn_delay(); if (GPIOA_PIN(0)) - result |= BUTTON_REPEATAB; + result |= BUTTON_DOWN; if (GPIOA_PIN(1)) - result |= BUTTON_VOLUP; + result |= BUTTON_VOL_UP; /* hold button is read in button_hold() */ diff --git a/firmware/target/arm/as3525/sansa-m200v4/button-target.h b/firmware/target/arm/as3525/sansa-m200v4/button-target.h index 779f7400bb..49a7409a6b 100644 --- a/firmware/target/arm/as3525/sansa-m200v4/button-target.h +++ b/firmware/target/arm/as3525/sansa-m200v4/button-target.h @@ -32,24 +32,24 @@ int button_read_device(void); bool button_hold(void); /* Main unit's buttons */ -#define BUTTON_MENU 0x00000001 -#define BUTTON_VOLUP 0x00000002 -#define BUTTON_VOLDOWN 0x00000004 -#define BUTTON_PLAYPAUSE 0x00000008 -#define BUTTON_REPEATAB 0x00000010 +#define BUTTON_POWER 0x00000001 +#define BUTTON_VOL_UP 0x00000002 +#define BUTTON_VOL_DOWN 0x00000004 +#define BUTTON_UP 0x00000008 +#define BUTTON_DOWN 0x00000010 #define BUTTON_LEFT 0x00000020 #define BUTTON_RIGHT 0x00000040 #define BUTTON_SELECT 0x00000080 #define BUTTON_HOLD 0x00000100 -#define BUTTON_MAIN (BUTTON_MENU|BUTTON_VOLUP|BUTTON_VOLDOWN\ - |BUTTON_PLAYPAUSE|BUTTON_REPEATAB|BUTTON_LEFT\ +#define BUTTON_MAIN (BUTTON_POWER|BUTTON_VOL_UP|BUTTON_VOL_DOWN\ + |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT\ |BUTTON_RIGHT|BUTTON_SELECT|BUTTON_HOLD) #define BUTTON_REMOTE 0 /* Software power-off */ -#define POWEROFF_BUTTON BUTTON_MENU +#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 40 #endif /* _BUTTON_TARGET_H_ */ diff --git a/tools/configure b/tools/configure index 10035409b7..1d98ca8a6c 100755 --- a/tools/configure +++ b/tools/configure @@ -1727,7 +1727,7 @@ fi output="rockbox.sansa" bootoutput="bootloader-m200v4.sansa" appextra="recorder:gui" - plugins="" + plugins="yes" swcodec="yes" toolset=$scramblebitmaptools t_cpu="arm"