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
This commit is contained in:
Andrew Ryabinin 2012-03-23 21:49:57 +04:00
parent a92a0fecca
commit 8361c1d901
3 changed files with 9 additions and 7 deletions

View file

@ -37,17 +37,17 @@ 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_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
{ ACTION_STD_MENU, BUTTON_RIGHT, BUTTON_NONE },
LAST_ITEM_IN_LIST
}; /* button_context_standard */
static const struct button_mapping button_context_wps[] = {
{ ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_WPS_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_WPS_PLAY, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
{ ACTION_WPS_STOP, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },

View file

@ -22,12 +22,13 @@
#define _BUTTON_TARGET_H_
#define BUTTON_UP 0x00000001
#define BUTTON_POWER 0x00000002
#define BUTTON_DOWN 0x00000004
#define BUTTON_LEFT 0x00000008
#define BUTTON_RIGHT 0x00000010
#define BUTTON_PLAY 0x00000020
#define BUTTON_SELECT 0x00000020
#define POWEROFF_BUTTON 0x02
#define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 30
#endif /* _BUTTON_TARGET_H_ */

View file

@ -22,6 +22,7 @@
#define _BUTTON_TARGET_H_
#define BUTTON_UP 0x00000001
#define BUTTON_POWER 0x00000002
#define BUTTON_DOWN 0x00000004
#define BUTTON_LEFT 0x00000008
#define BUTTON_RIGHT 0x00000010
@ -30,7 +31,7 @@
#define BUTTON_PREV 0x00000080
#define BUTTON_PLAY 0x00000100
#define POWEROFF_BUTTON 0x02
#define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 30
#endif /* _BUTTON_TARGET_H_ */