From 05577e48a876bc3e6304c0b2c8459786738fc425 Mon Sep 17 00:00:00 2001 From: Szymon Dziok Date: Thu, 11 Feb 2010 22:40:17 +0000 Subject: [PATCH] Packard Bell Vibe 500: Start committing plugin keymaps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24610 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/battery_bench.c | 7 +++++++ apps/plugins/chessclock.c | 10 ++++++++++ apps/plugins/cube.c | 9 +++++++++ apps/plugins/dict.c | 2 ++ apps/plugins/flipit.c | 11 +++++++++++ apps/plugins/lamp.c | 4 ++++ apps/plugins/lib/pluginlib_actions.c | 29 +++++++++++++++++++++++++++- apps/plugins/logo.c | 7 +++++++ apps/plugins/mosaique.c | 5 +++++ apps/plugins/rockblox.c | 11 +++++++++++ apps/plugins/snow.c | 3 +++ apps/plugins/stats.c | 3 +++ apps/plugins/stopwatch.c | 8 ++++++++ apps/plugins/viewer.c | 12 ++++++++++++ tools/configure | 2 +- 15 files changed, 121 insertions(+), 2 deletions(-) diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 57545c2106..e4e399ff7b 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -203,6 +203,13 @@ PLUGIN_HEADER #define BATTERY_ON_TXT "LEFT" #define BATTERY_OFF_TXT "RIGHT" +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + +#define BATTERY_ON BUTTON_PLAY +#define BATTERY_OFF BUTTON_REC +#define BATTERY_ON_TXT "PLAY - start" +#define BATTERY_OFF_TXT "REC" + #else #error No keymap defined! #endif diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index ff33bda470..f0a63f63dc 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -266,6 +266,16 @@ PLUGIN_HEADER #define CHC_SETTINGS_OK BUTTON_PLAY #define CHC_SETTINGS_CANCEL BUTTON_REW +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define CHC_QUIT BUTTON_REC +#define CHC_STARTSTOP BUTTON_PLAY +#define CHC_RESET BUTTON_PREV +#define CHC_MENU BUTTON_MENU +#define CHC_SETTINGS_INC BUTTON_UP +#define CHC_SETTINGS_DEC BUTTON_DOWN +#define CHC_SETTINGS_OK BUTTON_OK +#define CHC_SETTINGS_CANCEL BUTTON_CANCEL + #else #error No keymap defined! #endif diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 13db09d5e6..014bcfcb79 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c @@ -264,6 +264,15 @@ PLUGIN_HEADER #define CUBE_PAUSE BUTTON_PLAY #define CUBE_HIGHSPEED BUTTON_FFWD +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define CUBE_QUIT BUTTON_REC +#define CUBE_NEXT BUTTON_NEXT +#define CUBE_PREV BUTTON_PREV +#define CUBE_INC BUTTON_UP +#define CUBE_DEC BUTTON_DOWN +#define CUBE_MODE BUTTON_MENU +#define CUBE_PAUSE BUTTON_PLAY +#define CUBE_HIGHSPEED BUTTON_OK #else #error No keymap defined! diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c index 2127186e72..bb98df7501 100644 --- a/apps/plugins/dict.c +++ b/apps/plugins/dict.c @@ -148,6 +148,8 @@ long reverse (long N) { #define LP_QUIT BUTTON_POWER #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD #define LP_QUIT BUTTON_LEFT +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define LP_QUIT BUTTON_CANCEL #else #define LP_QUIT BUTTON_OFF #endif diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index da4acd70b6..b706b63f94 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -308,6 +308,17 @@ PLUGIN_HEADER #define FLIPIT_STEP_BY_STEP (BUTTON_PLAY|BUTTON_UP) #define FLIPIT_TOGGLE (BUTTON_PLAY|BUTTON_DOWN) +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + +#define FLIPIT_LEFT BUTTON_PREV +#define FLIPIT_RIGHT BUTTON_NEXT +#define FLIPIT_UP BUTTON_UP +#define FLIPIT_DOWN BUTTON_DOWN +#define FLIPIT_QUIT BUTTON_REC +#define FLIPIT_SHUFFLE BUTTON_PLAY +#define FLIPIT_SOLVE BUTTON_MENU +#define FLIPIT_STEP_BY_STEP BUTTON_CANCEL +#define FLIPIT_TOGGLE BUTTON_OK #else #error No keymap defined! diff --git a/apps/plugins/lamp.c b/apps/plugins/lamp.c index 690676e054..53815b3abd 100644 --- a/apps/plugins/lamp.c +++ b/apps/plugins/lamp.c @@ -96,6 +96,10 @@ PLUGIN_HEADER # define LAMP_LEFT BUTTON_LEFT # define LAMP_RIGHT BUTTON_RIGHT +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +# define LAMP_LEFT BUTTON_PREV +# define LAMP_RIGHT BUTTON_NEXT + #else # error Missing key definitions for this keypad #endif diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c index d587f80ba4..20e7bd7ea3 100644 --- a/apps/plugins/lib/pluginlib_actions.c +++ b/apps/plugins/lib/pluginlib_actions.c @@ -190,6 +190,15 @@ const struct button_mapping generic_directions[] = { PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REW, BUTTON_NONE}, { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REW, BUTTON_NONE}, { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REW, BUTTON_NONE}, +#elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) + { PLA_UP, BUTTON_UP, BUTTON_NONE}, + { PLA_DOWN, BUTTON_DOWN, BUTTON_NONE}, + { PLA_LEFT, BUTTON_PREV, BUTTON_NONE}, + { PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE}, + { PLA_UP_REPEAT, BUTTON_UP, BUTTON_NONE}, + { PLA_DOWN_REPEAT, BUTTON_DOWN, BUTTON_NONE}, + { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE}, + { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE}, #else #error pluginlib_actions: Unsupported keypad #endif @@ -326,6 +335,13 @@ const struct button_mapping generic_left_right_fire[] = { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REW, BUTTON_NONE}, { PLA_FIRE, BUTTON_UP, BUTTON_NONE}, { PLA_FIRE_REPEAT, BUTTON_UP|BUTTON_REW, BUTTON_NONE}, +#elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) + { PLA_LEFT, BUTTON_PREV, BUTTON_NONE}, + { PLA_RIGHT, BUTTON_NEXT, BUTTON_NONE}, + { PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE}, + { PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE}, + { PLA_FIRE, BUTTON_OK, BUTTON_NONE}, + { PLA_FIRE_REPEAT, BUTTON_OK|BUTTON_REPEAT, BUTTON_NONE}, #else #error pluginlib_actions: Unsupported keypad #endif @@ -499,6 +515,12 @@ const struct button_mapping generic_actions[] = {PLA_MENU, BUTTON_PLAY, BUTTON_NONE}, {PLA_FIRE, BUTTON_UP, BUTTON_NONE}, {PLA_FIRE_REPEAT, BUTTON_UP|BUTTON_REW, BUTTON_NONE}, +#elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) + {PLA_QUIT, BUTTON_REC, BUTTON_NONE}, + {PLA_START, BUTTON_PLAY, BUTTON_NONE}, + {PLA_MENU, BUTTON_MENU, BUTTON_NONE}, + {PLA_FIRE, BUTTON_OK, BUTTON_NONE}, + {PLA_FIRE_REPEAT, BUTTON_OK|BUTTON_REPEAT, BUTTON_NONE}, #else #error pluginlib_actions: Unsupported keypad #endif @@ -589,8 +611,13 @@ const struct button_mapping generic_increase_decrease[] = {PLA_DEC, BUTTON_DOWN, BUTTON_NONE}, {PLA_INC_REPEAT, BUTTON_UP|BUTTON_REW, BUTTON_NONE}, {PLA_DEC_REPEAT, BUTTON_DOWN|BUTTON_REW, BUTTON_NONE}, +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + {PLA_INC, BUTTON_UP, BUTTON_NONE}, + {PLA_DEC, BUTTON_DOWN, BUTTON_NONE}, + {PLA_INC_REPEAT, BUTTON_UP, BUTTON_NONE}, + {PLA_DEC_REPEAT, BUTTON_DOWN, BUTTON_NONE}, #else -#error pluginlib_actions: Unsupported keypad + #error pluginlib_actions: Unsupported keypad #endif {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE} }; diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 04c8aa015b..b2320237f9 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c @@ -186,6 +186,13 @@ const unsigned char rockbox16x7[] = { #define LP_DEC_Y BUTTON_DOWN #define LP_INC_Y BUTTON_UP +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define LP_QUIT BUTTON_REC +#define LP_DEC_X BUTTON_PREV +#define LP_INC_X BUTTON_NEXT +#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/mosaique.c b/apps/plugins/mosaique.c index 0f3e9ffc08..d6fc11d131 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c @@ -164,6 +164,11 @@ PLUGIN_HEADER #define MOSAIQUE_SPEED BUTTON_UP #define MOSAIQUE_RESTART BUTTON_DOWN +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define MOSAIQUE_QUIT BUTTON_REC +#define MOSAIQUE_SPEED BUTTON_PLAY +#define MOSAIQUE_RESTART BUTTON_MENU + #else #error No keymap defined! #endif diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 95a793fb8c..a3d644e583 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -314,6 +314,17 @@ PLUGIN_HEADER #define ROCKBLOX_DROP BUTTON_FFWD #define ROCKBLOX_RESTART (BUTTON_REC|BUTTON_REW) +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + +#define ROCKBLOX_OFF BUTTON_REC +#define ROCKBLOX_ROTATE_RIGHT BUTTON_PLAY +#define ROCKBLOX_ROTATE_LEFT BUTTON_MENU +#define ROCKBLOX_DOWN BUTTON_DOWN +#define ROCKBLOX_LEFT BUTTON_PREV +#define ROCKBLOX_RIGHT BUTTON_NEXT +#define ROCKBLOX_DROP BUTTON_OK +#define ROCKBLOX_RESTART BUTTON_CANCEL + #else #error No keymap defined! #endif diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index c64dfd0a5c..a81e12be96 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c @@ -79,6 +79,9 @@ PLUGIN_HEADER #define SNOW_QUIT BUTTON_REC #define SNOW_RC_QUIT BUTTON_RC_REC +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define SNOW_QUIT BUTTON_REC + #else #define SNOW_QUIT BUTTON_OFF #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c index b928c0c4db..22ad5c13e3 100644 --- a/apps/plugins/stats.c +++ b/apps/plugins/stats.c @@ -102,6 +102,9 @@ static bool abort; #elif CONFIG_KEYPAD == ONDAVX777_PAD #define STATS_STOP BUTTON_POWER +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define STATS_STOP BUTTON_REC + #else #error No keymap defined! #endif diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index b7ed592fdf..ad3b285d2f 100644 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c @@ -215,6 +215,14 @@ PLUGIN_HEADER #define STOPWATCH_SCROLL_UP BUTTON_UP #define STOPWATCH_SCROLL_DOWN BUTTON_DOWN +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define STOPWATCH_QUIT BUTTON_REC +#define STOPWATCH_START_STOP BUTTON_PLAY +#define STOPWATCH_RESET_TIMER BUTTON_OK +#define STOPWATCH_LAP_TIMER BUTTON_MENU +#define STOPWATCH_SCROLL_UP BUTTON_UP +#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN + #else #error No keymap defined! #endif diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 88b43c30b3..299c392177 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c @@ -352,6 +352,18 @@ PLUGIN_HEADER #define VIEWER_MENU BUTTON_PLAY #define VIEWER_AUTOSCROLL BUTTON_REW +/* Packard Bell Vibe 500 keys */ +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define VIEWER_QUIT BUTTON_REC +#define VIEWER_PAGE_UP BUTTON_OK +#define VIEWER_PAGE_DOWN BUTTON_CANCEL +#define VIEWER_LINE_UP BUTTON_UP +#define VIEWER_LINE_DOWN BUTTON_DOWN +#define VIEWER_SCREEN_LEFT BUTTON_PREV +#define VIEWER_SCREEN_RIGHT BUTTON_NEXT +#define VIEWER_MENU BUTTON_MENU +#define VIEWER_AUTOSCROLL BUTTON_PLAY + #else #error No keymap defined! #endif diff --git a/tools/configure b/tools/configure index 20a7029a9b..7a04cecc9c 100755 --- a/tools/configure +++ b/tools/configure @@ -2467,7 +2467,7 @@ fi bmp2rb_native="$rootdir/tools/bmp2rb -f 5" output="jukebox.mi4" appextra="recorder:gui" - plugins="no" + plugins="yes" swcodec="yes" boottool="$rootdir/tools/scramble -mi4v3 -model=v500 -type=RBBL" bootoutput="rockbox.mi4"