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 /firmware | |
parent | a9edc8440d5e0574f2f05c378ca5f0fac7202734 (diff) | |
download | rockbox-fb224bd0f93389a30960102e40280f8901b9d834.tar.gz 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.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 |
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) | |||
445 | #if CONFIG_KEYPAD == SANSA_C200_PAD | 445 | #if CONFIG_KEYPAD == SANSA_C200_PAD |
446 | | BUTTON_VOL_UP | BUTTON_VOL_DOWN | 446 | | BUTTON_VOL_UP | BUTTON_VOL_DOWN |
447 | #endif | 447 | #endif |
448 | #if CONFIG_KEYPAD == PHILIPS_SA9200_PAD | ||
449 | | BUTTON_VOL_UP | BUTTON_VOL_DOWN | ||
450 | | BUTTON_NEXT | BUTTON_PREV | ||
451 | #endif | ||
448 | ); | 452 | ); |
449 | 453 | ||
450 | if (button & BUTTON_LEFT) | 454 | if (button & BUTTON_LEFT) |
@@ -475,6 +479,16 @@ static int button_flip(int button) | |||
475 | if (button & BUTTON_VOL_DOWN) | 479 | if (button & BUTTON_VOL_DOWN) |
476 | newbutton |= BUTTON_VOL_UP; | 480 | newbutton |= BUTTON_VOL_UP; |
477 | #endif | 481 | #endif |
482 | #if CONFIG_KEYPAD == PHILIPS_SA9200_PAD | ||
483 | if (button & BUTTON_VOL_UP) | ||
484 | newbutton |= BUTTON_VOL_DOWN; | ||
485 | if (button & BUTTON_VOL_DOWN) | ||
486 | newbutton |= BUTTON_VOL_UP; | ||
487 | if (button & BUTTON_NEXT) | ||
488 | newbutton |= BUTTON_PREV; | ||
489 | if (button & BUTTON_PREV) | ||
490 | newbutton |= BUTTON_NEXT; | ||
491 | #endif | ||
478 | 492 | ||
479 | return newbutton; | 493 | return newbutton; |
480 | } | 494 | } |
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) | |||
51 | if (val == MEP_BUTTON_HEADER) | 51 | if (val == MEP_BUTTON_HEADER) |
52 | { | 52 | { |
53 | /* Buttons packet */ | 53 | /* Buttons packet */ |
54 | if (data[1] & 0x1) int_btn |= BUTTON_FFWD; | 54 | if (data[1] & 0x1) int_btn |= BUTTON_RIGHT; |
55 | if (data[1] & 0x2) int_btn |= BUTTON_RIGHT; | 55 | if (data[1] & 0x2) int_btn |= BUTTON_NEXT; |
56 | if (data[1] & 0x4) int_btn |= BUTTON_LEFT; | 56 | if (data[1] & 0x4) int_btn |= BUTTON_PREV; |
57 | if (data[1] & 0x8) int_btn |= BUTTON_REW; | 57 | if (data[1] & 0x8) int_btn |= BUTTON_LEFT; |
58 | if (data[2] & 0x1) int_btn |= BUTTON_MENU; | 58 | if (data[2] & 0x1) int_btn |= BUTTON_MENU; |
59 | } | 59 | } |
60 | else if (val == MEP_ABSOLUTE_HEADER) | 60 | 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); | |||
43 | #define BUTTON_POWER 0x00000001 | 43 | #define BUTTON_POWER 0x00000001 |
44 | #define BUTTON_PLAY 0x00000002 | 44 | #define BUTTON_PLAY 0x00000002 |
45 | #define BUTTON_MENU 0x00000004 | 45 | #define BUTTON_MENU 0x00000004 |
46 | #define BUTTON_LEFT 0x00000008 | 46 | #define BUTTON_PREV 0x00000008 |
47 | #define BUTTON_RIGHT 0x00000010 | 47 | #define BUTTON_NEXT 0x00000010 |
48 | #define BUTTON_REW 0x00000020 | 48 | #define BUTTON_LEFT 0x00000020 |
49 | #define BUTTON_FFWD 0x00000040 | 49 | #define BUTTON_RIGHT 0x00000040 |
50 | #define BUTTON_UP 0x00000080 | 50 | #define BUTTON_UP 0x00000080 |
51 | #define BUTTON_DOWN 0x00000100 | 51 | #define BUTTON_DOWN 0x00000100 |
52 | #define BUTTON_VOL_UP 0x00000200 | 52 | #define BUTTON_VOL_UP 0x00000200 |