diff options
author | Andrew Ryabinin <ryabinin.a.a@gmail.com> | 2012-03-23 21:49:57 +0400 |
---|---|---|
committer | Andrew Ryabinin <ryabinin.a.a@gmail.com> | 2012-04-19 17:31:13 +0400 |
commit | 8361c1d901a86a16f3bfe22593f0314f8cf37249 (patch) | |
tree | f07c499f0ec68cb4ab827f6653851ccb5adfc3fa | |
parent | a92a0fecca5ddd2d1500b35218b4891bc13be9b6 (diff) | |
download | rockbox-8361c1d901a86a16f3bfe22593f0314f8cf37249.tar.gz rockbox-8361c1d901a86a16f3bfe22593f0314f8cf37249.zip |
hm60x/hm801: Buttons rework.
- Add BUTTON_POWER.
- hm60x: Rename BUTTON_PLAY to more proper BUTTON_SELECT, which will make it
possible to unify hm60x and hm801 keymaps in some plugins.
Change-Id: I84715cdbc79d00c1bc2e8e6bd492159ad3c3422b
-rw-r--r-- | apps/keymaps/keymap-hm60x.c | 8 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/hm60x/button-target.h | 5 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/hm801/button-target.h | 3 |
3 files changed, 9 insertions, 7 deletions
diff --git a/apps/keymaps/keymap-hm60x.c b/apps/keymaps/keymap-hm60x.c index 3f75ac82d4..735b5bd8f5 100644 --- a/apps/keymaps/keymap-hm60x.c +++ b/apps/keymaps/keymap-hm60x.c | |||
@@ -37,17 +37,17 @@ static const struct button_mapping button_context_standard[] = { | |||
37 | { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, | 37 | { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, |
38 | { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 38 | { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, |
39 | 39 | ||
40 | { ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | 40 | { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, |
41 | { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, | 41 | { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, |
42 | { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | 42 | { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
43 | { ACTION_STD_MENU, BUTTON_RIGHT, BUTTON_NONE }, | 43 | { ACTION_STD_MENU, BUTTON_RIGHT, BUTTON_NONE }, |
44 | 44 | ||
45 | LAST_ITEM_IN_LIST | 45 | LAST_ITEM_IN_LIST |
46 | }; /* button_context_standard */ | 46 | }; /* button_context_standard */ |
47 | 47 | ||
48 | static const struct button_mapping button_context_wps[] = { | 48 | static const struct button_mapping button_context_wps[] = { |
49 | { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | 49 | { ACTION_WPS_PLAY, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, |
50 | { ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY }, | 50 | { ACTION_WPS_STOP, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, |
51 | { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, | 51 | { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, |
52 | { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 52 | { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, |
53 | { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, | 53 | { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, |
diff --git a/firmware/target/arm/rk27xx/hm60x/button-target.h b/firmware/target/arm/rk27xx/hm60x/button-target.h index 9165a99f75..e52db87bb9 100644 --- a/firmware/target/arm/rk27xx/hm60x/button-target.h +++ b/firmware/target/arm/rk27xx/hm60x/button-target.h | |||
@@ -22,12 +22,13 @@ | |||
22 | #define _BUTTON_TARGET_H_ | 22 | #define _BUTTON_TARGET_H_ |
23 | 23 | ||
24 | #define BUTTON_UP 0x00000001 | 24 | #define BUTTON_UP 0x00000001 |
25 | #define BUTTON_POWER 0x00000002 | ||
25 | #define BUTTON_DOWN 0x00000004 | 26 | #define BUTTON_DOWN 0x00000004 |
26 | #define BUTTON_LEFT 0x00000008 | 27 | #define BUTTON_LEFT 0x00000008 |
27 | #define BUTTON_RIGHT 0x00000010 | 28 | #define BUTTON_RIGHT 0x00000010 |
28 | #define BUTTON_PLAY 0x00000020 | 29 | #define BUTTON_SELECT 0x00000020 |
29 | 30 | ||
30 | #define POWEROFF_BUTTON 0x02 | 31 | #define POWEROFF_BUTTON BUTTON_POWER |
31 | #define POWEROFF_COUNT 30 | 32 | #define POWEROFF_COUNT 30 |
32 | 33 | ||
33 | #endif /* _BUTTON_TARGET_H_ */ | 34 | #endif /* _BUTTON_TARGET_H_ */ |
diff --git a/firmware/target/arm/rk27xx/hm801/button-target.h b/firmware/target/arm/rk27xx/hm801/button-target.h index 4449266217..736efb01c3 100644 --- a/firmware/target/arm/rk27xx/hm801/button-target.h +++ b/firmware/target/arm/rk27xx/hm801/button-target.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define _BUTTON_TARGET_H_ | 22 | #define _BUTTON_TARGET_H_ |
23 | 23 | ||
24 | #define BUTTON_UP 0x00000001 | 24 | #define BUTTON_UP 0x00000001 |
25 | #define BUTTON_POWER 0x00000002 | ||
25 | #define BUTTON_DOWN 0x00000004 | 26 | #define BUTTON_DOWN 0x00000004 |
26 | #define BUTTON_LEFT 0x00000008 | 27 | #define BUTTON_LEFT 0x00000008 |
27 | #define BUTTON_RIGHT 0x00000010 | 28 | #define BUTTON_RIGHT 0x00000010 |
@@ -30,7 +31,7 @@ | |||
30 | #define BUTTON_PREV 0x00000080 | 31 | #define BUTTON_PREV 0x00000080 |
31 | #define BUTTON_PLAY 0x00000100 | 32 | #define BUTTON_PLAY 0x00000100 |
32 | 33 | ||
33 | #define POWEROFF_BUTTON 0x02 | 34 | #define POWEROFF_BUTTON BUTTON_POWER |
34 | #define POWEROFF_COUNT 30 | 35 | #define POWEROFF_COUNT 30 |
35 | 36 | ||
36 | #endif /* _BUTTON_TARGET_H_ */ | 37 | #endif /* _BUTTON_TARGET_H_ */ |