diff options
author | Mark Arigo <markarigo@gmail.com> | 2009-07-07 03:26:57 +0000 |
---|---|---|
committer | Mark Arigo <markarigo@gmail.com> | 2009-07-07 03:26:57 +0000 |
commit | fb224bd0f93389a30960102e40280f8901b9d834 (patch) | |
tree | 742761cdba8225f9c9a5b02c56cf6f793e4d257d | |
parent | a9edc8440d5e0574f2f05c378ca5f0fac7202734 (diff) |
Philips SA9200: fix the buttons to work with flip screen mode (does anyone use this?). Change to conventional BUTTON_LEFT/BUTTON_RIGHT names and flip the remaining directional buttons.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21698 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/keymaps/keymap-sa9200.c | 122 | ||||
-rw-r--r-- | firmware/drivers/button.c | 14 | ||||
-rwxr-xr-x | firmware/target/arm/philips/sa9200/button-sa9200.c | 8 | ||||
-rwxr-xr-x | firmware/target/arm/philips/sa9200/button-target.h | 8 |
4 files changed, 83 insertions, 69 deletions
diff --git a/apps/keymaps/keymap-sa9200.c b/apps/keymaps/keymap-sa9200.c index bf693600c8..098e216a42 100644 --- a/apps/keymaps/keymap-sa9200.c +++ b/apps/keymaps/keymap-sa9200.c @@ -52,11 +52,11 @@ static const struct button_mapping button_context_standard[] = { { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_REW, BUTTON_NONE }, { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_STD_CANCEL, BUTTON_PREV, BUTTON_NONE }, { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_FFWD, BUTTON_NONE }, + { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, @@ -71,17 +71,17 @@ static const struct button_mapping button_context_wps[] = { { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, { ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, - { ACTION_WPS_SKIPNEXT, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD }, - { ACTION_WPS_SKIPPREV, BUTTON_REW|BUTTON_REL, BUTTON_REW }, + { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, + { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, - { ACTION_WPS_SEEKBACK, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_SEEKFWD, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_STOPSEEK, BUTTON_REW|BUTTON_REL, BUTTON_REW|BUTTON_REPEAT }, - { ACTION_WPS_STOPSEEK, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD|BUTTON_REPEAT }, + { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, + { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, - { ACTION_WPS_ABSETB_NEXTDIR,BUTTON_POWER|BUTTON_RIGHT, BUTTON_POWER }, - { ACTION_WPS_ABSETA_PREVDIR,BUTTON_POWER|BUTTON_LEFT, BUTTON_POWER }, + { ACTION_WPS_ABSETB_NEXTDIR,BUTTON_POWER|BUTTON_NEXT, BUTTON_POWER }, + { ACTION_WPS_ABSETA_PREVDIR,BUTTON_POWER|BUTTON_PREV, BUTTON_POWER }, { ACTION_WPS_ABRESET, BUTTON_POWER|BUTTON_UP, BUTTON_POWER }, { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, @@ -95,12 +95,12 @@ static const struct button_mapping button_context_wps[] = { { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, - { ACTION_WPS_BROWSE, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, + { ACTION_WPS_BROWSE, BUTTON_PREV|BUTTON_REL, BUTTON_PREV }, { ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, { ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, - { ACTION_WPS_PITCHSCREEN, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_ID3SCREEN, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_WPS_PITCHSCREEN, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_WPS_ID3SCREEN, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST }; /* button_context_wps */ @@ -121,37 +121,37 @@ static const struct button_mapping button_context_list[] = { }; /* button_context_list */ static const struct button_mapping button_context_tree[] = { - { ACTION_TREE_WPS, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_TREE_STOP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_WPS, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_STOP, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) }; /* button_context_tree */ static const struct button_mapping button_context_listtree_scroll_with_combo[] = { - { ACTION_TREE_ROOT_INIT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_TREE_PGLEFT, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_PGLEFT, BUTTON_PREV, BUTTON_NONE }, + { ACTION_TREE_PGLEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_TREE_PGRIGHT, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_PGRIGHT, BUTTON_NEXT, BUTTON_NONE }, + { ACTION_TREE_PGRIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), }; static const struct button_mapping button_context_listtree_scroll_without_combo[] = { - { ACTION_NONE, BUTTON_REW, BUTTON_NONE }, - { ACTION_NONE, BUTTON_FFWD, BUTTON_NONE }, + { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD }, - { ACTION_STD_CANCEL, BUTTON_REW|BUTTON_REL, BUTTON_REW }, + { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, + { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, { ACTION_TREE_ROOT_INIT, BUTTON_MENU, BUTTON_NONE }, - { ACTION_TREE_PGLEFT, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, + { ACTION_TREE_PGLEFT, BUTTON_PREV, BUTTON_NONE }, + { ACTION_TREE_PGLEFT, BUTTON_PREV|BUTTON_REL, BUTTON_PREV|BUTTON_REPEAT }, - { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, + { ACTION_TREE_PGRIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_TREE_PGRIGHT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT|BUTTON_REPEAT }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), }; @@ -166,21 +166,21 @@ static const struct button_mapping button_context_settings[] = { { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE }, { ACTION_SETTINGS_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_PREV, BUTTON_REW, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_FFWD, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_settings */ static const struct button_mapping button_context_settings_right_is_inc[] = { - { ACTION_SETTINGS_INC, BUTTON_FFWD, BUTTON_NONE }, - { ACTION_SETTINGS_INCREPEAT,BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_SETTINGS_INCREPEAT,BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_SETTINGS_DEC, BUTTON_REW, BUTTON_NONE }, - { ACTION_SETTINGS_DECREPEAT,BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_SETTINGS_DECREPEAT,BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_settingsgraphical */ @@ -193,13 +193,13 @@ static const struct button_mapping button_context_yesno[] = { /** Bookmark Screen **/ static const struct button_mapping button_context_bmark[] = { - { ACTION_BMS_DELETE, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_BMS_DELETE, BUTTON_NEXT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), }; /* button_context_bmark */ static const struct button_mapping button_context_quickscreen[] = { - { ACTION_NONE, BUTTON_REW, BUTTON_NONE }, + { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE }, { ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REL, BUTTON_NONE }, @@ -208,11 +208,11 @@ static const struct button_mapping button_context_quickscreen[] = { { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE }, { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_QS_LEFT, BUTTON_REW|BUTTON_REL, BUTTON_NONE }, - { ACTION_QS_LEFT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, + { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_QS_RIGHT, BUTTON_FFWD|BUTTON_REL, BUTTON_NONE }, - { ACTION_QS_RIGHT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, + { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), }; /* button_context_quickscreen */ @@ -220,7 +220,7 @@ static const struct button_mapping button_context_quickscreen[] = { static const struct button_mapping button_context_pitchscreen[] = { { ACTION_PS_RESET, BUTTON_PLAY, BUTTON_NONE }, { ACTION_PS_EXIT, BUTTON_MENU, BUTTON_NONE }, - { ACTION_PS_EXIT, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_PS_EXIT, BUTTON_PREV, BUTTON_NONE }, { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE }, @@ -229,14 +229,14 @@ static const struct button_mapping button_context_pitchscreen[] = { { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE }, { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_PS_NUDGE_LEFT, BUTTON_REW, BUTTON_NONE }, - { ACTION_PS_NUDGE_LEFTOFF, BUTTON_REW|BUTTON_REL, 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_FFWD, BUTTON_NONE }, - { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_FFWD|BUTTON_REL, BUTTON_NONE }, + { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, - { ACTION_PS_SLOWER, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_PS_FASTER, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), }; /* button_context_pitchcreen */ @@ -246,11 +246,11 @@ static const struct button_mapping button_context_keyboard[] = { { ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_KBD_ABORT, BUTTON_POWER, BUTTON_NONE }, - { ACTION_KBD_LEFT, BUTTON_REW, BUTTON_NONE }, - { ACTION_KBD_LEFT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_RIGHT, BUTTON_FFWD, BUTTON_NONE }, - { ACTION_KBD_RIGHT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE }, { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, @@ -258,11 +258,11 @@ static const struct button_mapping button_context_keyboard[] = { { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE }, { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_LEFT, BUTTON_PREV, BUTTON_NONE }, + { ACTION_KBD_CURSOR_LEFT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_RIGHT, BUTTON_NEXT, BUTTON_NONE }, + { ACTION_KBD_CURSOR_RIGHT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE }, { ACTION_KBD_BACKSPACE, BUTTON_VOL_UP, BUTTON_NONE }, { ACTION_KBD_BACKSPACE, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, @@ -278,11 +278,11 @@ static const struct button_mapping button_context_keyboard[] = { #ifdef HAVE_USBSTACK static const struct button_mapping button_context_usb_hid[] = { { ACTION_USB_HID_PLAY, BUTTON_PLAY, BUTTON_NONE }, - { ACTION_USB_HID_STOP, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_USB_HID_STOP, BUTTON_PREV, BUTTON_NONE }, { ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE }, - { ACTION_USB_HID_SKIPPREV, BUTTON_REW, BUTTON_NONE }, - { ACTION_USB_HID_SKIPNEXT, BUTTON_FFWD, BUTTON_NONE }, + { ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE }, + { ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE }, { ACTION_USB_HID_VOLUP, BUTTON_UP, BUTTON_NONE }, { ACTION_USB_HID_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, @@ -294,7 +294,7 @@ static const struct button_mapping button_context_usb_hid[] = { { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, { ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_USB_HID_MUTE, BUTTON_RIGHT, BUTTON_NONE }, + { ACTION_USB_HID_MUTE, BUTTON_NEXT, BUTTON_NONE }, { ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE }, LAST_ITEM_IN_LIST diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 6fbe5de229..6f6eb8f222 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -445,6 +445,10 @@ static int button_flip(int button) #if CONFIG_KEYPAD == SANSA_C200_PAD | BUTTON_VOL_UP | BUTTON_VOL_DOWN #endif +#if CONFIG_KEYPAD == PHILIPS_SA9200_PAD + | BUTTON_VOL_UP | BUTTON_VOL_DOWN + | BUTTON_NEXT | BUTTON_PREV +#endif ); if (button & BUTTON_LEFT) @@ -475,6 +479,16 @@ static int button_flip(int button) if (button & BUTTON_VOL_DOWN) newbutton |= BUTTON_VOL_UP; #endif +#if CONFIG_KEYPAD == PHILIPS_SA9200_PAD + if (button & BUTTON_VOL_UP) + newbutton |= BUTTON_VOL_DOWN; + if (button & BUTTON_VOL_DOWN) + newbutton |= BUTTON_VOL_UP; + if (button & BUTTON_NEXT) + newbutton |= BUTTON_PREV; + if (button & BUTTON_PREV) + newbutton |= BUTTON_NEXT; +#endif return newbutton; } diff --git a/firmware/target/arm/philips/sa9200/button-sa9200.c b/firmware/target/arm/philips/sa9200/button-sa9200.c index be37111ecb..0be77c66c9 100755 --- a/firmware/target/arm/philips/sa9200/button-sa9200.c +++ b/firmware/target/arm/philips/sa9200/button-sa9200.c @@ -51,10 +51,10 @@ void button_int(void) if (val == MEP_BUTTON_HEADER) { /* Buttons packet */ - if (data[1] & 0x1) int_btn |= BUTTON_FFWD; - if (data[1] & 0x2) int_btn |= BUTTON_RIGHT; - if (data[1] & 0x4) int_btn |= BUTTON_LEFT; - if (data[1] & 0x8) int_btn |= BUTTON_REW; + if (data[1] & 0x1) int_btn |= BUTTON_RIGHT; + if (data[1] & 0x2) int_btn |= BUTTON_NEXT; + if (data[1] & 0x4) int_btn |= BUTTON_PREV; + if (data[1] & 0x8) int_btn |= BUTTON_LEFT; if (data[2] & 0x1) int_btn |= BUTTON_MENU; } else if (val == MEP_ABSOLUTE_HEADER) diff --git a/firmware/target/arm/philips/sa9200/button-target.h b/firmware/target/arm/philips/sa9200/button-target.h index 6259aa0737..faed943208 100755 --- a/firmware/target/arm/philips/sa9200/button-target.h +++ b/firmware/target/arm/philips/sa9200/button-target.h @@ -43,10 +43,10 @@ void button_int(void); #define BUTTON_POWER 0x00000001 #define BUTTON_PLAY 0x00000002 #define BUTTON_MENU 0x00000004 -#define BUTTON_LEFT 0x00000008 -#define BUTTON_RIGHT 0x00000010 -#define BUTTON_REW 0x00000020 -#define BUTTON_FFWD 0x00000040 +#define BUTTON_PREV 0x00000008 +#define BUTTON_NEXT 0x00000010 +#define BUTTON_LEFT 0x00000020 +#define BUTTON_RIGHT 0x00000040 #define BUTTON_UP 0x00000080 #define BUTTON_DOWN 0x00000100 #define BUTTON_VOL_UP 0x00000200 |