From 6e0e0f9b72cba07513ff44cc2707628e2dc8c064 Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Sun, 20 Aug 2006 01:05:57 +0000 Subject: [PATCH] Add keymaps for pitchscreen and graphical equalizer on H10 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10662 a1c6a512-1295-4272-9138-f99709370657 --- apps/keymaps/keymap-h10.c | 41 ++++++++++++++++++++++++++++++-- firmware/export/config-h10.h | 3 +++ firmware/export/config-h10_5gb.h | 4 ++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/apps/keymaps/keymap-h10.c b/apps/keymaps/keymap-h10.c index 413683518c..029615faa5 100644 --- a/apps/keymaps/keymap-h10.c +++ b/apps/keymaps/keymap-h10.c @@ -66,11 +66,12 @@ const struct button_mapping button_context_wps[] = { { ACTION_WPS_QUICKSCREEN, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, { ACTION_WPS_CONTEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, { ACTION_WPS_MENU, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, + { ACTION_WPS_PITCHSCREEN, BUTTON_PLAY|BUTTON_LEFT, BUTTON_PLAY }, + { ACTION_WPS_ID3SCREEN, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_PLAY }, LAST_ITEM_IN_LIST }; /* button_context_wps */ - const struct button_mapping button_context_settings[] = { { ACTION_SETTINGS_INC, BUTTON_SCROLL_UP, BUTTON_NONE }, { ACTION_SETTINGS_INCREPEAT,BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE }, @@ -121,6 +122,38 @@ const struct button_mapping button_context_quickscreen[] = { LAST_ITEM_IN_LIST }; /* button_context_quickscreen */ +const struct button_mapping button_context_settingsgraphical[] = { + { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_PREV, BUTTON_SCROLL_UP, BUTTON_NONE }, + { ACTION_STD_PREVREPEAT, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_NEXT, BUTTON_SCROLL_DOWN, BUTTON_NONE }, + { ACTION_STD_NEXTREPEAT, BUTTON_SCROLL_DOWN|BUTTON_REPEAT,BUTTON_NONE }, + { ACTION_STD_OK, BUTTON_PLAY, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, + + LAST_ITEM_IN_LIST +}; /* button_context_settingsgraphical */ + +const struct button_mapping button_context_pitchscreen[] = { + { ACTION_PS_INC_SMALL, BUTTON_SCROLL_UP, BUTTON_NONE }, + { ACTION_PS_INC_BIG, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_PS_DEC_SMALL, BUTTON_SCROLL_DOWN, BUTTON_NONE }, + { ACTION_PS_DEC_BIG, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, + { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, + { ACTION_PS_RESET, BUTTON_PLAY, BUTTON_NONE }, + { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, + + LAST_ITEM_IN_LIST +}; /* button_context_pitchscreen */ + + + /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */ const struct button_mapping* get_context_mapping(int context) { @@ -132,7 +165,9 @@ const struct button_mapping* get_context_mapping(int context) case CONTEXT_WPS: return button_context_wps; - case CONTEXT_SETTINGS: + case CONTEXT_SETTINGSGRAPHICAL: + return button_context_settingsgraphical; + case CONTEXT_SETTINGS: return button_context_settings; case CONTEXT_YESNOSCREEN: @@ -146,6 +181,8 @@ const struct button_mapping* get_context_mapping(int context) return button_context_tree; case CONTEXT_QUICKSCREEN: return button_context_quickscreen; + case CONTEXT_PITCHSCREEN: + return button_context_pitchscreen; case CONTEXT_LIST: case CONTEXT_MAINMENU: default: diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index cae37fcce4..39f8a85a35 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h @@ -19,6 +19,9 @@ /* define this if you have access to the quickscreen */ #define HAVE_QUICKSCREEN +/* define this if you have access to the pitchscreen */ +#define HAVE_PITCHSCREEN + /* LCD dimensions */ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h index 09b9132525..c5aaceb573 100644 --- a/firmware/export/config-h10_5gb.h +++ b/firmware/export/config-h10_5gb.h @@ -19,6 +19,10 @@ /* define this if you have access to the quickscreen */ #define HAVE_QUICKSCREEN +/* define this if you have access to the pitchscreen */ +#define HAVE_PITCHSCREEN + + /* LCD dimensions */ #define LCD_WIDTH 128 #define LCD_HEIGHT 128