summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMark Arigo <markarigo@gmail.com>2009-07-07 03:26:57 +0000
committerMark Arigo <markarigo@gmail.com>2009-07-07 03:26:57 +0000
commitfb224bd0f93389a30960102e40280f8901b9d834 (patch)
tree742761cdba8225f9c9a5b02c56cf6f793e4d257d /firmware
parenta9edc8440d5e0574f2f05c378ca5f0fac7202734 (diff)
downloadrockbox-fb224bd0f93389a30960102e40280f8901b9d834.tar.gz
rockbox-fb224bd0f93389a30960102e40280f8901b9d834.tar.bz2
rockbox-fb224bd0f93389a30960102e40280f8901b9d834.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/button.c14
-rwxr-xr-xfirmware/target/arm/philips/sa9200/button-sa9200.c8
-rwxr-xr-xfirmware/target/arm/philips/sa9200/button-target.h8
3 files changed, 22 insertions, 8 deletions
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