From 7074a64d8aa7030543832ab2e59885fd16e34adb Mon Sep 17 00:00:00 2001 From: Szymon Dziok Date: Sun, 14 Feb 2010 21:56:53 +0000 Subject: [PATCH] Packard Bell Vibe 500: Finish plugin keymaps. Rockbox compiles clean now for the target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24658 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/beatbox/beatbox.c | 6 ++++++ apps/plugins/chessbox/chessbox_pgn.h | 10 ++++++++++ apps/plugins/doom/i_video.c | 10 ++++++++++ apps/plugins/fft/fft.c | 8 ++++++++ apps/plugins/fractals/fractal.h | 12 ++++++++++++ apps/plugins/goban/goban.h | 12 ++++++++++++ apps/plugins/imageviewer/imageviewer.h | 11 +++++++++++ apps/plugins/midi/midiplay.c | 8 ++++++++ apps/plugins/mpegplayer/mpeg_settings.c | 10 ++++++++++ apps/plugins/mpegplayer/mpegplayer.c | 9 +++++++++ apps/plugins/pacbox/pacbox.h | 11 +++++++++++ apps/plugins/pictureflow/pictureflow.c | 2 ++ apps/plugins/reversi/reversi-gui.h | 9 +++++++++ apps/plugins/sudoku/sudoku.h | 10 ++++++++++ apps/plugins/test_codec.c | 2 ++ apps/plugins/zxbox/keymaps.h | 9 +++++++++ apps/plugins/zxbox/zxbox_keyb.c | 9 +++++++++ 17 files changed, 148 insertions(+) diff --git a/apps/plugins/beatbox/beatbox.c b/apps/plugins/beatbox/beatbox.c index b8e46bcd0c..1a940e1047 100644 --- a/apps/plugins/beatbox/beatbox.c +++ b/apps/plugins/beatbox/beatbox.c @@ -89,6 +89,12 @@ PLUGIN_IRAM_DECLARE #define BTN_UP BUTTON_UP #define BTN_DOWN BUTTON_DOWN +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define BTN_QUIT BUTTON_REC +#define BTN_RIGHT BUTTON_NEXT +#define BTN_UP BUTTON_UP +#define BTN_DOWN BUTTON_DOWN + #endif diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h index 0d3574447a..64cf3a5383 100644 --- a/apps/plugins/chessbox/chessbox_pgn.h +++ b/apps/plugins/chessbox/chessbox_pgn.h @@ -356,6 +356,16 @@ #define CB_LEVEL (BUTTON_FFWD|BUTTON_UP) #define CB_MENU (BUTTON_FFWD|BUTTON_LEFT) +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define CB_SELECT BUTTON_OK +#define CB_UP BUTTON_UP +#define CB_DOWN BUTTON_DOWN +#define CB_LEFT BUTTON_PREV +#define CB_RIGHT BUTTON_NEXT +#define CB_PLAY BUTTON_PLAY +#define CB_LEVEL BUTTON_CANCEL +#define CB_MENU BUTTON_MENU + #else #error No keymap defined! #endif diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 5f9d3041a2..fbe8369100 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c @@ -350,6 +350,16 @@ void I_ShutdownGraphics(void) #define DOOMBUTTON_ENTER (BUTTON_PLAY|BUTTON_RIGHT) #define DOOMBUTTON_WEAPON (BUTTON_PLAY|BUTTON_UP) #define DOOMBUTTON_MAP (BUTTON_PLAY|BUTTON_DOWN) +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define DOOMBUTTON_UP BUTTON_OK +#define DOOMBUTTON_DOWN BUTTON_CANCEL +#define DOOMBUTTON_LEFT BUTTON_PREV +#define DOOMBUTTON_RIGHT BUTTON_NEXT +#define DOOMBUTTON_SHOOT BUTTON_MENU +#define DOOMBUTTON_OPEN BUTTON_OK +#define DOOMBUTTON_ESC BUTTON_REC +#define DOOMBUTTON_ENTER BUTTON_POWER +#define DOOMBUTTON_WEAPON BUTTON_PLAY #else #error Keymap not defined! #endif diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c index d84484c1c1..93568ab156 100644 --- a/apps/plugins/fft/fft.c +++ b/apps/plugins/fft/fft.c @@ -187,6 +187,14 @@ GREY_INFO_STRUCT #elif (CONFIG_KEYPAD == ONDAVX777_PAD) # define FFT_QUIT BUTTON_POWER +#elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) +# define FFT_PREV_GRAPH BUTTON_PREV +# define FFT_NEXT_GRAPH BUTTON_NEXT +# define FFT_ORIENTATION BUTTON_MENU +# define FFT_WINDOW BUTTON_OK +# define FFT_SCALE BUTTON_PLAY +# define FFT_QUIT BUTTON_REC + #else #error No keymap defined! #endif diff --git a/apps/plugins/fractals/fractal.h b/apps/plugins/fractals/fractal.h index cac0df48c4..2bcee1da57 100644 --- a/apps/plugins/fractals/fractal.h +++ b/apps/plugins/fractals/fractal.h @@ -306,6 +306,18 @@ #define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_DOWN) #define FRACTAL_RESET (BUTTON_PLAY | BUTTON_RIGHT) +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define FRACTAL_QUIT BUTTON_REC +#define FRACTAL_UP BUTTON_UP +#define FRACTAL_DOWN BUTTON_DOWN +#define FRACTAL_LEFT BUTTON_PREV +#define FRACTAL_RIGHT BUTTON_NEXT +#define FRACTAL_ZOOM_IN BUTTON_PLAY +#define FRACTAL_ZOOM_OUT BUTTON_MENU +#define FRACTAL_PRECISION_INC BUTTON_OK +#define FRACTAL_PRECISION_DEC BUTTON_CANCEL +#define FRACTAL_RESET (BUTTON_CANCEL | BUTTON_REPEAT) + #else #error No keymap defined! #endif diff --git a/apps/plugins/goban/goban.h b/apps/plugins/goban/goban.h index b7c083ed0d..6bc1e83ea9 100644 --- a/apps/plugins/goban/goban.h +++ b/apps/plugins/goban/goban.h @@ -297,6 +297,18 @@ /* No advance/retreat */ /* no next var */ +#elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) +#define GBN_BUTTON_UP BUTTON_UP +#define GBN_BUTTON_DOWN BUTTON_DOWN +#define GBN_BUTTON_LEFT BUTTON_PREV +#define GBN_BUTTON_RIGHT BUTTON_NEXT +#define GBN_BUTTON_RETREAT (BUTTON_OK | BUTTON_PREV) +#define GBN_BUTTON_ADVANCE (BUTTON_OK | BUTTON_NEXT) +#define GBN_BUTTON_MENU BUTTON_MENU +#define GBN_BUTTON_PLAY BUTTON_PLAY +#define GBN_BUTTON_CONTEXT BUTTON_OK +#define GBN_BUTTON_NEXT_VAR BUTTON_CANCEL + #else #error Unsupported keypad #endif diff --git a/apps/plugins/imageviewer/imageviewer.h b/apps/plugins/imageviewer/imageviewer.h index e1009ec32f..694056ed8a 100644 --- a/apps/plugins/imageviewer/imageviewer.h +++ b/apps/plugins/imageviewer/imageviewer.h @@ -296,6 +296,17 @@ #define IMGVIEW_PREVIOUS BUTTON_REW #define IMGVIEW_MENU BUTTON_PLAY +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define IMGVIEW_ZOOM_IN (BUTTON_REC | BUTTON_UP) +#define IMGVIEW_ZOOM_OUT (BUTTON_REC | BUTTON_DOWN) +#define IMGVIEW_UP BUTTON_UP +#define IMGVIEW_DOWN BUTTON_DOWN +#define IMGVIEW_LEFT BUTTON_PREV +#define IMGVIEW_RIGHT BUTTON_NEXT +#define IMGVIEW_NEXT (BUTTON_REC | BUTTON_NEXT) +#define IMGVIEW_PREVIOUS (BUTTON_REC | BUTTON_PREV) +#define IMGVIEW_MENU BUTTON_MENU + #else #error No keymap defined! #endif diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c index c8ae070cd0..69c137e268 100644 --- a/apps/plugins/midi/midiplay.c +++ b/apps/plugins/midi/midiplay.c @@ -187,6 +187,14 @@ PLUGIN_IRAM_DECLARE #define BTN_DOWN BUTTON_DOWN #define BTN_PLAY BUTTON_PLAY +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define BTN_QUIT BUTTON_REC +#define BTN_RIGHT BUTTON_NEXT +#define BTN_LEFT BUTTON_PREV +#define BTN_UP BUTTON_UP +#define BTN_DOWN BUTTON_DOWN +#define BTN_PLAY BUTTON_PLAY + #else #error No keymap defined! #endif diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index a6eb96c52c..49d7f8b38d 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -196,6 +196,16 @@ struct mpeg_settings settings; #define MPEG_START_TIME_RIGHT2 BUTTON_FFWD #define MPEG_START_TIME_EXIT BUTTON_REC +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define MPEG_START_TIME_SELECT BUTTON_PLAY +#define MPEG_START_TIME_LEFT BUTTON_PREV +#define MPEG_START_TIME_RIGHT BUTTON_NEXT +#define MPEG_START_TIME_UP BUTTON_UP +#define MPEG_START_TIME_DOWN BUTTON_DOWN +#define MPEG_START_TIME_LEFT2 BUTTON_OK +#define MPEG_START_TIME_RIGHT2 BUTTON_CANCEL +#define MPEG_START_TIME_EXIT BUTTON_REC + #else #error No keymap defined! #endif diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 31d4ef971e..015aae4ad0 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -308,6 +308,15 @@ CONFIG_KEYPAD == SANSA_M200_PAD #define MPEG_RW BUTTON_REW #define MPEG_FF BUTTON_FFWD +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define MPEG_MENU BUTTON_MENU +#define MPEG_STOP BUTTON_REC +#define MPEG_PAUSE BUTTON_PLAY +#define MPEG_VOLDOWN BUTTON_DOWN +#define MPEG_VOLUP BUTTON_UP +#define MPEG_RW BUTTON_PREV +#define MPEG_FF BUTTON_NEXT + #else #error No keymap defined! #endif diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h index 203c0f5836..993848b9aa 100644 --- a/apps/plugins/pacbox/pacbox.h +++ b/apps/plugins/pacbox/pacbox.h @@ -221,6 +221,17 @@ #define PACMAN_COIN BUTTON_FFWD #define PACMAN_MENU BUTTON_PLAY +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + +#define PACMAN_UP BUTTON_UP +#define PACMAN_DOWN BUTTON_DOWN +#define PACMAN_LEFT BUTTON_PREV +#define PACMAN_RIGHT BUTTON_NEXT +#define PACMAN_1UP BUTTON_PLAY +#define PACMAN_2UP BUTTON_REC +#define PACMAN_COIN BUTTON_OK +#define PACMAN_MENU BUTTON_MENU + #else #error Keymap not defined! diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index b3f81444bb..b12c8e8e04 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -145,6 +145,8 @@ const struct button_mapping pf_context_buttons[] = #elif CONFIG_KEYPAD == IRIVER_H100_PAD || CONFIG_KEYPAD == IRIVER_H300_PAD || \ CONFIG_KEYPAD == RECORDER_PAD || CONFIG_KEYPAD == ONDIO_PAD {PF_QUIT, BUTTON_OFF, BUTTON_NONE}, +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + {PF_QUIT, BUTTON_REC, BUTTON_NONE}, #endif #if CONFIG_KEYPAD == IAUDIO_M3_PAD LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD|CONTEXT_REMOTE) diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index a62f1fc3ba..145335ce76 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h @@ -207,6 +207,15 @@ #define REVERSI_BUTTON_MAKE_MOVE BUTTON_FFWD #define REVERSI_BUTTON_MENU BUTTON_PLAY +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define REVERSI_BUTTON_QUIT BUTTON_REC +#define REVERSI_BUTTON_UP BUTTON_UP +#define REVERSI_BUTTON_DOWN BUTTON_DOWN +#define REVERSI_BUTTON_LEFT BUTTON_PREV +#define REVERSI_BUTTON_RIGHT BUTTON_NEXT +#define REVERSI_BUTTON_MAKE_MOVE BUTTON_OK +#define REVERSI_BUTTON_MENU BUTTON_MENU + #else #error No keymap defined! #endif diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h index 57fd8c9a56..63e0718c70 100644 --- a/apps/plugins/sudoku/sudoku.h +++ b/apps/plugins/sudoku/sudoku.h @@ -271,6 +271,16 @@ #define SUDOKU_BUTTON_MENU BUTTON_PLAY #define SUDOKU_BUTTON_POSSIBLE BUTTON_REW +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define SUDOKU_BUTTON_QUIT BUTTON_REC +#define SUDOKU_BUTTON_UP BUTTON_UP +#define SUDOKU_BUTTON_DOWN BUTTON_DOWN +#define SUDOKU_BUTTON_LEFT BUTTON_PREV +#define SUDOKU_BUTTON_RIGHT BUTTON_NEXT +#define SUDOKU_BUTTON_TOGGLE BUTTON_OK +#define SUDOKU_BUTTON_MENU BUTTON_MENU +#define SUDOKU_BUTTON_POSSIBLE BUTTON_PLAY + #else #error No keymap defined! #endif diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index e57af8cc0a..e556453464 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c @@ -32,6 +32,8 @@ PLUGIN_HEADER #define TESTCODEC_EXITBUTTON BUTTON_PLAY #elif CONFIG_KEYPAD == COWON_D2_PAD || CONFIG_KEYPAD == ONDAVX747_PAD #define TESTCODEC_EXITBUTTON BUTTON_POWER +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD +#define TESTCODEC_EXITBUTTON BUTTON_REC #elif defined(HAVE_TOUCHSCREEN) #define TESTCODEC_EXITBUTTON BUTTON_TOPLEFT #else diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h index ed22c7225f..3ca5451fdb 100644 --- a/apps/plugins/zxbox/keymaps.h +++ b/apps/plugins/zxbox/keymaps.h @@ -180,6 +180,15 @@ #define ZX_SELECT BUTTON_PLAY #define ZX_MENU BUTTON_FFWD +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + +#define ZX_UP BUTTON_UP +#define ZX_DOWN BUTTON_DOWN +#define ZX_LEFT BUTTON_PREV +#define ZX_RIGHT BUTTON_NEXT +#define ZX_SELECT BUTTON_OK +#define ZX_MENU BUTTON_MENU + #else #error Keymap not defined! diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c index c3085e3714..b48c5ec4ac 100644 --- a/apps/plugins/zxbox/zxbox_keyb.c +++ b/apps/plugins/zxbox/zxbox_keyb.c @@ -175,6 +175,15 @@ #define KBD_UP BUTTON_UP #define KBD_DOWN BUTTON_DOWN +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + +#define KBD_SELECT BUTTON_OK +#define KBD_ABORT BUTTON_CANCEL +#define KBD_LEFT BUTTON_PREV +#define KBD_RIGHT BUTTON_NEXT +#define KBD_UP BUTTON_UP +#define KBD_DOWN BUTTON_DOWN + #endif #ifdef HAVE_TOUCHSCREEN