Philips SA9200: Working touchpad and button lights! Also, improvements to the keymap (still needs work).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21346 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6a0d931f38
commit
a61196fd3a
11 changed files with 330 additions and 185 deletions
|
@ -53,22 +53,22 @@ static const struct button_mapping button_context_standard[] = {
|
||||||
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_STD_CANCEL, BUTTON_REW, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_REW, BUTTON_NONE },
|
||||||
|
{ ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
|
|
||||||
|
|
||||||
{ ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
|
||||||
{ ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
|
||||||
|
|
||||||
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
|
||||||
{ ACTION_STD_OK, BUTTON_FFWD, BUTTON_NONE },
|
{ ACTION_STD_OK, BUTTON_FFWD, BUTTON_NONE },
|
||||||
|
{ ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||||
|
|
||||||
|
{ ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
||||||
|
{ ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
||||||
|
{ ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_standard */
|
}; /* button_context_standard */
|
||||||
|
|
||||||
|
|
||||||
static const struct button_mapping button_context_wps[] = {
|
static const struct button_mapping button_context_wps[] = {
|
||||||
{ ACTION_WPS_PLAY, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
{ ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||||
{ ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
{ ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||||
|
|
||||||
{ ACTION_WPS_SKIPNEXT, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD },
|
{ ACTION_WPS_SKIPNEXT, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD },
|
||||||
|
@ -76,45 +76,43 @@ static const struct button_mapping button_context_wps[] = {
|
||||||
|
|
||||||
{ ACTION_WPS_SEEKBACK, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_SEEKBACK, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_WPS_SEEKFWD, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_SEEKFWD, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_WPS_STOPSEEK, BUTTON_REW|BUTTON_REL, BUTTON_REW|BUTTON_REPEAT },
|
{ 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_FFWD|BUTTON_REL, BUTTON_FFWD|BUTTON_REPEAT },
|
||||||
|
|
||||||
{ ACTION_WPS_ABSETB_NEXTDIR, BUTTON_RIGHT|BUTTON_FFWD, BUTTON_NONE },
|
{ ACTION_WPS_ABSETB_NEXTDIR,BUTTON_POWER|BUTTON_RIGHT, BUTTON_POWER },
|
||||||
{ ACTION_WPS_ABSETA_PREVDIR, BUTTON_RIGHT|BUTTON_REW, BUTTON_NONE },
|
{ ACTION_WPS_ABSETA_PREVDIR,BUTTON_POWER|BUTTON_LEFT, BUTTON_POWER },
|
||||||
{ ACTION_WPS_ABRESET, BUTTON_RIGHT|BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_WPS_ABRESET, BUTTON_POWER|BUTTON_UP, BUTTON_POWER },
|
||||||
|
|
||||||
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_WPS_PITCHSCREEN, BUTTON_RIGHT|BUTTON_UP, BUTTON_RIGHT },
|
|
||||||
{ ACTION_WPS_PITCHSCREEN, BUTTON_RIGHT|BUTTON_DOWN, BUTTON_RIGHT },
|
|
||||||
|
|
||||||
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
|
||||||
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
||||||
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
|
{ ACTION_WPS_BROWSE, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
||||||
|
|
||||||
{ ACTION_WPS_ID3SCREEN, BUTTON_RIGHT|BUTTON_MENU, BUTTON_NONE },
|
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
|
||||||
{ ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
{ 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 },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_wps */
|
}; /* button_context_wps */
|
||||||
|
|
||||||
static const struct button_mapping button_context_list[] = {
|
static const struct button_mapping button_context_list[] = {
|
||||||
{ ACTION_LISTTREE_PGUP, BUTTON_RIGHT|BUTTON_UP, BUTTON_RIGHT },
|
{ ACTION_LISTTREE_PGUP, BUTTON_VOL_UP|BUTTON_UP, BUTTON_VOL_UP },
|
||||||
{ ACTION_LISTTREE_PGUP, BUTTON_UP|BUTTON_REL, BUTTON_RIGHT|BUTTON_UP },
|
{ ACTION_LISTTREE_PGDOWN, BUTTON_VOL_DOWN|BUTTON_DOWN, BUTTON_VOL_DOWN },
|
||||||
{ ACTION_LISTTREE_PGUP, BUTTON_RIGHT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_LISTTREE_PGDOWN, BUTTON_RIGHT|BUTTON_DOWN, BUTTON_RIGHT },
|
|
||||||
{ ACTION_LISTTREE_PGDOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_RIGHT|BUTTON_DOWN },
|
|
||||||
{ ACTION_LISTTREE_PGDOWN, BUTTON_RIGHT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
#ifdef HAVE_VOLUME_IN_LIST
|
#ifdef HAVE_VOLUME_IN_LIST
|
||||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,170 +121,181 @@ static const struct button_mapping button_context_list[] = {
|
||||||
}; /* button_context_list */
|
}; /* button_context_list */
|
||||||
|
|
||||||
static const struct button_mapping button_context_tree[] = {
|
static const struct button_mapping button_context_tree[] = {
|
||||||
{ ACTION_TREE_WPS, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
{ ACTION_TREE_WPS, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_TREE_STOP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
|
||||||
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
|
||||||
}; /* button_context_tree */
|
}; /* button_context_tree */
|
||||||
|
|
||||||
static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
|
static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
|
||||||
{ ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_TREE_ROOT_INIT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_TREE_PGLEFT, BUTTON_RIGHT|BUTTON_REW, BUTTON_RIGHT },
|
|
||||||
{ ACTION_TREE_PGLEFT, BUTTON_REW|BUTTON_REL, BUTTON_RIGHT|BUTTON_REW },
|
{ ACTION_TREE_PGLEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_TREE_PGLEFT, BUTTON_RIGHT|BUTTON_REW, BUTTON_REW|BUTTON_REL },
|
{ ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_TREE_ROOT_INIT, BUTTON_RIGHT|BUTTON_REW|BUTTON_REPEAT, BUTTON_RIGHT|BUTTON_REW },
|
|
||||||
{ ACTION_TREE_PGLEFT, BUTTON_RIGHT|BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||||
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_FFWD, BUTTON_RIGHT },
|
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_TREE_PGRIGHT, BUTTON_FFWD|BUTTON_REL, BUTTON_RIGHT|BUTTON_FFWD },
|
|
||||||
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_FFWD, BUTTON_FFWD|BUTTON_REL },
|
|
||||||
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
|
static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
|
||||||
{ ACTION_NONE, BUTTON_REW, BUTTON_NONE },
|
{ ACTION_NONE, BUTTON_REW, BUTTON_NONE },
|
||||||
{ ACTION_STD_CANCEL, BUTTON_REW|BUTTON_REL, BUTTON_REW },
|
|
||||||
{ ACTION_TREE_ROOT_INIT, BUTTON_REW|BUTTON_REPEAT, BUTTON_REW },
|
|
||||||
{ ACTION_TREE_PGLEFT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_TREE_PGLEFT, BUTTON_REW|BUTTON_REL, BUTTON_REW|BUTTON_REPEAT },
|
|
||||||
{ ACTION_NONE, BUTTON_FFWD, BUTTON_NONE },
|
{ ACTION_NONE, BUTTON_FFWD, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_STD_OK, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD },
|
{ ACTION_STD_OK, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD },
|
||||||
{ ACTION_TREE_PGRIGHT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_REW|BUTTON_REL, BUTTON_REW },
|
||||||
{ ACTION_TREE_PGRIGHT, BUTTON_FFWD|BUTTON_REL, BUTTON_FFWD|BUTTON_REPEAT },
|
{ 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_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct button_mapping button_context_settings[] = {
|
static const struct button_mapping button_context_settings[] = {
|
||||||
{ ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_RESET, BUTTON_PLAY, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
|
|
||||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREV, BUTTON_REW, BUTTON_NONE },
|
{ ACTION_SETTINGS_INCREPEAT,BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREVREPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_STD_NEXT, BUTTON_FFWD, BUTTON_NONE },
|
{ ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_STD_NEXTREPEAT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_RESET, BUTTON_RIGHT, BUTTON_NONE },
|
|
||||||
|
{ ACTION_STD_PREV, BUTTON_REW, BUTTON_NONE },
|
||||||
|
{ ACTION_STD_PREVREPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ ACTION_STD_NEXT, BUTTON_FFWD, BUTTON_NONE },
|
||||||
|
{ ACTION_STD_NEXTREPEAT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||||
}; /* button_context_settings */
|
}; /* button_context_settings */
|
||||||
|
|
||||||
static const struct button_mapping button_context_settings_right_is_inc[] = {
|
static const struct button_mapping button_context_settings_right_is_inc[] = {
|
||||||
{ ACTION_SETTINGS_INC, BUTTON_FFWD, BUTTON_NONE },
|
{ ACTION_SETTINGS_INC, BUTTON_FFWD, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_INCREPEAT,BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_DEC, BUTTON_REW, BUTTON_NONE },
|
|
||||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_DEC, BUTTON_REW, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_SETTINGS_DECREPEAT,BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
|
|
||||||
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_SETTINGS_RESET, BUTTON_RIGHT, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||||
}; /* button_context_settingsgraphical */
|
}; /* button_context_settingsgraphical */
|
||||||
|
|
||||||
static const struct button_mapping button_context_yesno[] = {
|
static const struct button_mapping button_context_yesno[] = {
|
||||||
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||||
}; /* button_context_settings_yesno */
|
}; /* button_context_settings_yesno */
|
||||||
|
|
||||||
static const struct button_mapping button_context_colorchooser[] = {
|
|
||||||
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
|
||||||
}; /* button_context_colorchooser */
|
|
||||||
|
|
||||||
static const struct button_mapping button_context_eq[] = {
|
|
||||||
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
|
||||||
}; /* button_context_eq */
|
|
||||||
|
|
||||||
/** Bookmark Screen **/
|
/** Bookmark Screen **/
|
||||||
static const struct button_mapping button_context_bmark[] = {
|
static const struct button_mapping button_context_bmark[] = {
|
||||||
{ ACTION_BMS_DELETE, BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_BMS_DELETE, BUTTON_RIGHT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_bmark */
|
}; /* button_context_bmark */
|
||||||
|
|
||||||
static const struct button_mapping button_context_time[] = {
|
|
||||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
|
||||||
{ ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
|
||||||
}; /* button_context_time */
|
|
||||||
|
|
||||||
static const struct button_mapping button_context_quickscreen[] = {
|
static const struct button_mapping button_context_quickscreen[] = {
|
||||||
{ ACTION_QS_DOWNINV, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_NONE, BUTTON_REW, BUTTON_NONE },
|
||||||
{ ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
|
||||||
{ ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
|
||||||
{ ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_QS_LEFT, BUTTON_REW, BUTTON_NONE },
|
|
||||||
{ ACTION_QS_LEFT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_QS_RIGHT, BUTTON_FFWD, BUTTON_NONE },
|
|
||||||
{ ACTION_QS_RIGHT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
{ ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REL, BUTTON_NONE },
|
||||||
|
{ ACTION_QS_DOWNINV, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ 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_RIGHT, BUTTON_FFWD|BUTTON_REL, BUTTON_NONE },
|
||||||
|
{ ACTION_QS_RIGHT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||||
}; /* button_context_quickscreen */
|
}; /* button_context_quickscreen */
|
||||||
|
|
||||||
static const struct button_mapping button_context_pitchscreen[] = {
|
static const struct button_mapping button_context_pitchscreen[] = {
|
||||||
{ ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_PS_RESET, BUTTON_PLAY, BUTTON_NONE },
|
||||||
{ ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_PS_EXIT, BUTTON_MENU, BUTTON_NONE },
|
||||||
{ ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_PS_EXIT, BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_PS_NUDGE_LEFT, BUTTON_REW, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_NUDGE_LEFTOFF, BUTTON_REW|BUTTON_REL, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_NUDGE_RIGHT, BUTTON_FFWD, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_NUDGE_RIGHTOFF, BUTTON_FFWD|BUTTON_REL, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_TOGGLE_MODE, BUTTON_MENU, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_RESET, BUTTON_RIGHT, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_SLOWER, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_PS_FASTER, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
{ ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ 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_RIGHT, BUTTON_FFWD, BUTTON_NONE },
|
||||||
|
{ ACTION_PS_NUDGE_RIGHTOFF, BUTTON_FFWD|BUTTON_REL, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ ACTION_PS_SLOWER, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_PS_FASTER, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||||
}; /* button_context_pitchcreen */
|
}; /* button_context_pitchcreen */
|
||||||
|
|
||||||
static const struct button_mapping button_context_keyboard[] = {
|
static const struct button_mapping button_context_keyboard[] = {
|
||||||
{ ACTION_KBD_LEFT, BUTTON_REW, BUTTON_NONE },
|
{ ACTION_KBD_SELECT, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
|
||||||
{ ACTION_KBD_LEFT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_KBD_DONE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_RIGHT, BUTTON_FFWD, BUTTON_NONE },
|
{ ACTION_KBD_ABORT, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_KBD_RIGHT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_RIGHT|BUTTON_REW, BUTTON_NONE },
|
{ ACTION_KBD_LEFT, BUTTON_REW, BUTTON_NONE },
|
||||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_RIGHT|BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_KBD_LEFT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT|BUTTON_FFWD, BUTTON_NONE },
|
|
||||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT|BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_KBD_RIGHT, BUTTON_FFWD, BUTTON_NONE },
|
||||||
{ ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_KBD_RIGHT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_PAGE_FLIP, BUTTON_RIGHT|BUTTON_MENU, BUTTON_NONE },
|
|
||||||
{ ACTION_KBD_DONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
{ ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_KBD_ABORT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
{ ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_BACKSPACE, BUTTON_MENU, BUTTON_NONE },
|
|
||||||
{ ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_KBD_CURSOR_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_KBD_MORSE_INPUT, BUTTON_RIGHT|BUTTON_POWER, BUTTON_NONE },
|
|
||||||
{ ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||||
|
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ ACTION_KBD_BACKSPACE, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_KBD_BACKSPACE, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ ACTION_KBD_PAGE_FLIP, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ ACTION_KBD_MORSE_INPUT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_KBD_MORSE_SELECT, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_keyboard */
|
}; /* button_context_keyboard */
|
||||||
|
|
||||||
#ifdef HAVE_USBSTACK
|
#ifdef HAVE_USBSTACK
|
||||||
static const struct button_mapping button_context_usb_hid[] = {
|
static const struct button_mapping button_context_usb_hid[] = {
|
||||||
{ ACTION_USB_HID_PLAY, BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_USB_HID_PLAY, BUTTON_PLAY, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_USB_HID_STOP, BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_SKIPPREV, BUTTON_REW, BUTTON_NONE },
|
{ ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_SKIPNEXT, BUTTON_FFWD, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_VOLUP, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_USB_HID_SKIPPREV, BUTTON_REW, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_SKIPNEXT, BUTTON_FFWD, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_VOLUP, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_USB_HID_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
{ ACTION_USB_HID_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_USB_HID_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE },
|
{ ACTION_USB_HID_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ 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_MENU, BUTTON_MENU, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_usb_hid */
|
}; /* button_context_usb_hid */
|
||||||
|
@ -298,43 +307,47 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
{
|
{
|
||||||
case CONTEXT_STD:
|
case CONTEXT_STD:
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
|
|
||||||
case CONTEXT_WPS:
|
case CONTEXT_WPS:
|
||||||
return button_context_wps;
|
return button_context_wps;
|
||||||
|
|
||||||
case CONTEXT_LIST:
|
case CONTEXT_LIST:
|
||||||
return button_context_list;
|
return button_context_list;
|
||||||
|
|
||||||
case CONTEXT_MAINMENU:
|
case CONTEXT_MAINMENU:
|
||||||
case CONTEXT_TREE:
|
case CONTEXT_TREE:
|
||||||
if (global_settings.hold_lr_for_scroll_in_list)
|
if (global_settings.hold_lr_for_scroll_in_list)
|
||||||
return button_context_listtree_scroll_without_combo;
|
return button_context_listtree_scroll_without_combo;
|
||||||
else
|
else
|
||||||
return button_context_listtree_scroll_with_combo;
|
return button_context_listtree_scroll_with_combo;
|
||||||
|
|
||||||
case CONTEXT_CUSTOM|CONTEXT_TREE:
|
case CONTEXT_CUSTOM|CONTEXT_TREE:
|
||||||
return button_context_tree;
|
return button_context_tree;
|
||||||
|
|
||||||
|
case CONTEXT_SETTINGS_TIME:
|
||||||
case CONTEXT_SETTINGS:
|
case CONTEXT_SETTINGS:
|
||||||
return button_context_settings;
|
return button_context_settings;
|
||||||
|
|
||||||
case CONTEXT_CUSTOM|CONTEXT_SETTINGS:
|
case CONTEXT_CUSTOM|CONTEXT_SETTINGS:
|
||||||
return button_context_settings_right_is_inc;
|
|
||||||
|
|
||||||
case CONTEXT_SETTINGS_COLOURCHOOSER:
|
case CONTEXT_SETTINGS_COLOURCHOOSER:
|
||||||
return button_context_colorchooser;
|
|
||||||
case CONTEXT_SETTINGS_EQ:
|
case CONTEXT_SETTINGS_EQ:
|
||||||
return button_context_eq;
|
return button_context_settings_right_is_inc;
|
||||||
|
|
||||||
case CONTEXT_SETTINGS_TIME:
|
|
||||||
return button_context_time;
|
|
||||||
|
|
||||||
case CONTEXT_YESNOSCREEN:
|
case CONTEXT_YESNOSCREEN:
|
||||||
return button_context_yesno;
|
return button_context_yesno;
|
||||||
|
|
||||||
case CONTEXT_BOOKMARKSCREEN:
|
case CONTEXT_BOOKMARKSCREEN:
|
||||||
return button_context_bmark;
|
return button_context_bmark;
|
||||||
|
|
||||||
case CONTEXT_QUICKSCREEN:
|
case CONTEXT_QUICKSCREEN:
|
||||||
return button_context_quickscreen;
|
return button_context_quickscreen;
|
||||||
|
|
||||||
case CONTEXT_PITCHSCREEN:
|
case CONTEXT_PITCHSCREEN:
|
||||||
return button_context_pitchscreen;
|
return button_context_pitchscreen;
|
||||||
|
|
||||||
case CONTEXT_KEYBOARD:
|
case CONTEXT_KEYBOARD:
|
||||||
return button_context_keyboard;
|
return button_context_keyboard;
|
||||||
|
|
||||||
#ifdef HAVE_USBSTACK
|
#ifdef HAVE_USBSTACK
|
||||||
case CONTEXT_USB_HID:
|
case CONTEXT_USB_HID:
|
||||||
return button_context_usb_hid;
|
return button_context_usb_hid;
|
||||||
|
|
|
@ -334,13 +334,13 @@
|
||||||
<source>
|
<source>
|
||||||
*: "PLAY = Yes"
|
*: "PLAY = Yes"
|
||||||
h100,h120,h300: "NAVI = Yes"
|
h100,h120,h300: "NAVI = Yes"
|
||||||
yh*,ipod*,x5,m5,gigabeat*,e200*,c200,h10,h10_5gb,mrobe100,sa9200: "SELECT = Yes"
|
yh*,ipod*,x5,m5,gigabeat*,e200*,c200,h10,h10_5gb,mrobe100: "SELECT = Yes"
|
||||||
player: "(PLAY/STOP)"
|
player: "(PLAY/STOP)"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "PLAY = Yes"
|
*: "PLAY = Yes"
|
||||||
h100,h120,h300: "NAVI = Yes"
|
h100,h120,h300: "NAVI = Yes"
|
||||||
yh*,ipod*,x5,m5,gigabeat*,e200*,c200,h10,h10_5gb,mrobe100,sa9200: "SELECT = Yes"
|
yh*,ipod*,x5,m5,gigabeat*,e200*,c200,h10,h10_5gb,mrobe100: "SELECT = Yes"
|
||||||
player: "(PLAY/STOP)"
|
player: "(PLAY/STOP)"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
|
@ -2457,14 +2457,16 @@
|
||||||
h100,h120,h300: "Building database... %d found (STOP to return)"
|
h100,h120,h300: "Building database... %d found (STOP to return)"
|
||||||
ipod*: "Building database... %d found (PREV to return)"
|
ipod*: "Building database... %d found (PREV to return)"
|
||||||
x5,m5,gigabeat*,mrobe100: "Building database... %d found (LEFT to return)"
|
x5,m5,gigabeat*,mrobe100: "Building database... %d found (LEFT to return)"
|
||||||
h10,h10_5gb,e200*,c200,sa9200: "Building database... %d found (PREV to return)"
|
h10,h10_5gb,e200*,c200: "Building database... %d found (PREV to return)"
|
||||||
|
sa9200: "Building database... %d found (REW to return)"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Building database... %d found (OFF to return)"
|
*: "Building database... %d found (OFF to return)"
|
||||||
h100,h120,h300: "Building database... %d found (STOP to return)"
|
h100,h120,h300: "Building database... %d found (STOP to return)"
|
||||||
ipod*: "Building database... %d found (PREV to return)"
|
ipod*: "Building database... %d found (PREV to return)"
|
||||||
x5,m5,gigabeat*,mrobe100: "Building database... %d found (LEFT to return)"
|
x5,m5,gigabeat*,mrobe100: "Building database... %d found (LEFT to return)"
|
||||||
h10,h10_5gb,e200*,c200,sa9200: "Building database... %d found (PREV to return)"
|
h10,h10_5gb,e200*,c200: "Building database... %d found (PREV to return)"
|
||||||
|
sa9200: "Building database... %d found (REW to return)"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: "entries found for database"
|
*: "entries found for database"
|
||||||
|
@ -4216,13 +4218,15 @@
|
||||||
*: none
|
*: none
|
||||||
rtc: "ON = Set"
|
rtc: "ON = Set"
|
||||||
h100,h120,h300: "NAVI = Set"
|
h100,h120,h300: "NAVI = Set"
|
||||||
ipod*,x5,m5,h10,h10_5gb,e200*,c200,gigabeat*,mrobe100,sa9200: "SELECT = Set"
|
ipod*,x5,m5,h10,h10_5gb,e200*,c200,gigabeat*,mrobe100: "SELECT = Set"
|
||||||
|
sa9200: "PLAY = Set"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: none
|
*: none
|
||||||
rtc: "ON = Set"
|
rtc: "ON = Set"
|
||||||
h100,h120,h300: "NAVI = Set"
|
h100,h120,h300: "NAVI = Set"
|
||||||
ipod*,x5,m5,h10,h10_5gb,e200*,c200,gigabeat*,mrobe100,sa9200: "SELECT = Set"
|
ipod*,x5,m5,h10,h10_5gb,e200*,c200,gigabeat*,mrobe100: "SELECT = Set"
|
||||||
|
sa9200: "PLAY = Set"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: none
|
*: none
|
||||||
|
@ -4237,23 +4241,25 @@
|
||||||
*: none
|
*: none
|
||||||
rtc: "OFF = Revert"
|
rtc: "OFF = Revert"
|
||||||
h100,h120,h300: "STOP = Revert"
|
h100,h120,h300: "STOP = Revert"
|
||||||
ipod*,c200,sa9200: "MENU = Revert"
|
ipod*,c200: "MENU = Revert"
|
||||||
x5,m5: "RECORD = Revert"
|
x5,m5: "RECORD = Revert"
|
||||||
h10,h10_5gb,e200*: "PREV = Revert"
|
h10,h10_5gb,e200*: "PREV = Revert"
|
||||||
gigabeatf: "POWER = Revert"
|
gigabeatf: "POWER = Revert"
|
||||||
mrobe100: "DISPLAY = Revert"
|
mrobe100: "DISPLAY = Revert"
|
||||||
gigabeats: "BACK = Revert"
|
gigabeats: "BACK = Revert"
|
||||||
|
sa9200: "LEFT = Revert"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: none
|
*: none
|
||||||
rtc: "OFF = Revert"
|
rtc: "OFF = Revert"
|
||||||
h100,h120,h300: "STOP = Revert"
|
h100,h120,h300: "STOP = Revert"
|
||||||
ipod*,c200,sa9200: "MENU = Revert"
|
ipod*,c200: "MENU = Revert"
|
||||||
x5,m5: "RECORD = Revert"
|
x5,m5: "RECORD = Revert"
|
||||||
h10,h10_5gb,e200*: "PREV = Revert"
|
h10,h10_5gb,e200*: "PREV = Revert"
|
||||||
gigabeatf: "POWER = Revert"
|
gigabeatf: "POWER = Revert"
|
||||||
mrobe100: "DISPLAY = Revert"
|
mrobe100: "DISPLAY = Revert"
|
||||||
gigabeats: "BACK = Revert"
|
gigabeats: "BACK = Revert"
|
||||||
|
sa9200: "LEFT = Revert"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: none
|
*: none
|
||||||
|
|
|
@ -547,6 +547,9 @@ target/arm/sandisk/audio-c200_e200.c
|
||||||
|
|
||||||
#ifdef PHILIPS_SA9200
|
#ifdef PHILIPS_SA9200
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
drivers/synaptics-mep.c
|
||||||
|
#endif /* BOOTLOADER */
|
||||||
target/arm/adc-as3514.c
|
target/arm/adc-as3514.c
|
||||||
target/arm/ascodec-pp.c
|
target/arm/ascodec-pp.c
|
||||||
target/arm/ata-sd-pp.c
|
target/arm/ata-sd-pp.c
|
||||||
|
|
|
@ -73,6 +73,26 @@
|
||||||
#define DATA_LO GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x10);\
|
#define DATA_LO GPIO_SET_BITWISE(GPIOA_OUTPUT_EN, 0x10);\
|
||||||
GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x10)
|
GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x10)
|
||||||
#define DATA_CL GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_EN, 0x10)
|
#define DATA_CL GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_EN, 0x10)
|
||||||
|
|
||||||
|
#elif defined(PHILIPS_SA9200)
|
||||||
|
#define INT_ENABLE GPIO_CLEAR_BITWISE(GPIOD_INT_LEV, 0x2);\
|
||||||
|
GPIO_SET_BITWISE(GPIOD_INT_EN, 0x2)
|
||||||
|
#define INT_DISABLE GPIO_CLEAR_BITWISE(GPIOD_INT_EN, 0x2);\
|
||||||
|
GPIO_SET_BITWISE(GPIOD_INT_CLR, 0x2)
|
||||||
|
|
||||||
|
#define ACK (GPIOD_INPUT_VAL & 0x8)
|
||||||
|
#define ACK_HI GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x8)
|
||||||
|
#define ACK_LO GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x8)
|
||||||
|
|
||||||
|
#define CLK ((GPIOD_INPUT_VAL & 0x2) >> 1)
|
||||||
|
#define CLK_HI GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x2)
|
||||||
|
#define CLK_LO GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x2)
|
||||||
|
|
||||||
|
#define DATA ((GPIOD_INPUT_VAL & 0x10) >> 4)
|
||||||
|
#define DATA_HI GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_EN, 0x10)
|
||||||
|
#define DATA_LO GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x10);\
|
||||||
|
GPIO_SET_BITWISE(GPIOD_OUTPUT_EN, 0x10)
|
||||||
|
#define DATA_CL GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_EN, 0x10)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LO 0
|
#define LO 0
|
||||||
|
|
|
@ -59,6 +59,9 @@
|
||||||
|
|
||||||
#define CONFIG_KEYPAD PHILIPS_SA9200_PAD
|
#define CONFIG_KEYPAD PHILIPS_SA9200_PAD
|
||||||
|
|
||||||
|
/* define this if the target has volume keys which can be used in the lists */
|
||||||
|
#define HAVE_VOLUME_IN_LIST
|
||||||
|
|
||||||
/* Define this if you do software codec */
|
/* Define this if you do software codec */
|
||||||
#define CONFIG_CODEC SWCODEC
|
#define CONFIG_CODEC SWCODEC
|
||||||
|
|
||||||
|
@ -99,6 +102,11 @@
|
||||||
/* Which backlight fading type? */
|
/* Which backlight fading type? */
|
||||||
#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
|
#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
|
||||||
|
|
||||||
|
/* define this if you have a light associated with the buttons */
|
||||||
|
#define HAVE_BUTTON_LIGHT
|
||||||
|
/* Can't control the brightness on all the buttons */
|
||||||
|
/* #define HAVE_BUTTONLIGHT_BRIGHTNESS */
|
||||||
|
|
||||||
/* define this if you have a flash memory storage */
|
/* define this if you have a flash memory storage */
|
||||||
#define HAVE_FLASH_STORAGE
|
#define HAVE_FLASH_STORAGE
|
||||||
|
|
||||||
|
|
|
@ -77,10 +77,12 @@ enum {
|
||||||
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
|
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
|
||||||
(CONFIG_KEYPAD == SANSA_C200_PAD) || \
|
(CONFIG_KEYPAD == SANSA_C200_PAD) || \
|
||||||
(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \
|
(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \
|
||||||
(CONFIG_KEYPAD == SANSA_FUZE_PAD) || \
|
(CONFIG_KEYPAD == SANSA_FUZE_PAD)
|
||||||
(CONFIG_KEYPAD == PHILIPS_SA9200_PAD)
|
|
||||||
#define USBPOWER_BUTTON BUTTON_SELECT
|
#define USBPOWER_BUTTON BUTTON_SELECT
|
||||||
#define USBPOWER_BTN_IGNORE BUTTON_POWER
|
#define USBPOWER_BTN_IGNORE BUTTON_POWER
|
||||||
|
#elif (CONFIG_KEYPAD == PHILIPS_SA9200_PAD)
|
||||||
|
#define USBPOWER_BUTTON BUTTON_PLAY
|
||||||
|
#define USBPOWER_BTN_IGNORE BUTTON_POWER
|
||||||
#elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
|
#elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
|
||||||
#define USBPOWER_BUTTON BUTTON_PLAYLIST
|
#define USBPOWER_BUTTON BUTTON_PLAYLIST
|
||||||
#define USBPOWER_BTN_IGNORE BUTTON_POWER
|
#define USBPOWER_BTN_IGNORE BUTTON_POWER
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "backlight-target.h"
|
#include "backlight-target.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "lcd.h"
|
|
||||||
#include "backlight.h"
|
#include "backlight.h"
|
||||||
#include "ascodec.h"
|
#include "ascodec.h"
|
||||||
#include "as3514.h"
|
#include "as3514.h"
|
||||||
|
#include "synaptics-mep.h"
|
||||||
|
|
||||||
void _backlight_set_brightness(int brightness)
|
void _backlight_set_brightness(int brightness)
|
||||||
{
|
{
|
||||||
|
@ -51,12 +51,29 @@ void _backlight_off(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_BUTTON_LIGHT
|
||||||
|
|
||||||
|
#define BUTTONLIGHT_MASK 0x7f
|
||||||
|
#define BUTTONLIGHT_MAX 0x0f
|
||||||
|
static unsigned short buttonlight_status = 0;
|
||||||
|
|
||||||
void _buttonlight_on(void)
|
void _buttonlight_on(void)
|
||||||
{
|
{
|
||||||
/* TODO */
|
if (!buttonlight_status)
|
||||||
|
{
|
||||||
|
touchpad_set_buttonlights(BUTTONLIGHT_MASK, BUTTONLIGHT_MAX);
|
||||||
|
GPIOD_OUTPUT_VAL &= ~(0x40 | 0x20 | 0x04); /* REW/FFWD/MENU */
|
||||||
|
buttonlight_status = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _buttonlight_off(void)
|
void _buttonlight_off(void)
|
||||||
{
|
{
|
||||||
/* TODO */
|
if (buttonlight_status)
|
||||||
|
{
|
||||||
|
touchpad_set_buttonlights(BUTTONLIGHT_MASK, 0);
|
||||||
|
GPIOD_OUTPUT_VAL |= (0x40 | 0x20 | 0x04); /* REW/FFWD/MENU */
|
||||||
|
buttonlight_status = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -27,6 +27,9 @@ void _backlight_off(void);
|
||||||
void _backlight_set_brightness(int brightness);
|
void _backlight_set_brightness(int brightness);
|
||||||
int __backlight_is_on(void);
|
int __backlight_is_on(void);
|
||||||
|
|
||||||
|
#ifdef HAVE_BUTTON_LIGHT
|
||||||
void _buttonlight_on(void);
|
void _buttonlight_on(void);
|
||||||
void _buttonlight_off(void);
|
void _buttonlight_off(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -22,12 +22,59 @@
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "backlight.h"
|
#include "backlight.h"
|
||||||
|
#include "synaptics-mep.h"
|
||||||
|
|
||||||
|
#define LOGF_ENABLE
|
||||||
|
#include "logf.h"
|
||||||
|
|
||||||
|
static int int_btn = BUTTON_NONE;
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
void button_init_device(void)
|
void button_init_device(void)
|
||||||
{
|
{
|
||||||
/* TODO...for now, hardware initialisation is done by the c200 bootloader */
|
/* The touchpad is powered on and initialized in power-sa9200.c
|
||||||
|
since it needs to be ready for both buttons and button lights. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Button interrupt handler
|
||||||
|
*/
|
||||||
|
void button_int(void)
|
||||||
|
{
|
||||||
|
char data[4];
|
||||||
|
int val;
|
||||||
|
|
||||||
|
int_btn = BUTTON_NONE;
|
||||||
|
|
||||||
|
val = touchpad_read_device(data, 4);
|
||||||
|
|
||||||
|
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[2] & 0x1) int_btn |= BUTTON_MENU;
|
||||||
|
}
|
||||||
|
else if (val == MEP_ABSOLUTE_HEADER)
|
||||||
|
{
|
||||||
|
/* Absolute packet - the finger is on the vertical strip.
|
||||||
|
Position ranges from 1-4095, with 1 at the bottom. */
|
||||||
|
val = ((data[1] >> 4) << 8) | data[2]; /* position */
|
||||||
|
|
||||||
|
if ((val > 0) && (val <= 1365))
|
||||||
|
int_btn |= BUTTON_DOWN;
|
||||||
|
else if ((val > 1365) && (val <= 2730))
|
||||||
|
int_btn |= BUTTON_PLAY;
|
||||||
|
else if ((val > 2730) && (val <= 4095))
|
||||||
|
int_btn |= BUTTON_UP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void button_init_device(void){}
|
||||||
|
#endif /* bootloader */
|
||||||
|
|
||||||
bool button_hold(void)
|
bool button_hold(void)
|
||||||
{
|
{
|
||||||
return !(GPIOL_INPUT_VAL & 0x40);
|
return !(GPIOL_INPUT_VAL & 0x40);
|
||||||
|
@ -38,32 +85,14 @@ bool button_hold(void)
|
||||||
*/
|
*/
|
||||||
int button_read_device(void)
|
int button_read_device(void)
|
||||||
{
|
{
|
||||||
int btn = BUTTON_NONE;
|
int btn = int_btn;
|
||||||
static bool hold_button = false;
|
|
||||||
bool hold_button_old;
|
|
||||||
|
|
||||||
/* Hold */
|
if (button_hold())
|
||||||
hold_button_old = hold_button;
|
return BUTTON_NONE;
|
||||||
hold_button = button_hold();
|
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
if (!(GPIOB_INPUT_VAL & 0x20)) btn |= BUTTON_POWER;
|
||||||
if (hold_button != hold_button_old)
|
if (!(GPIOF_INPUT_VAL & 0x10)) btn |= BUTTON_VOL_UP;
|
||||||
backlight_hold_changed(hold_button);
|
if (!(GPIOF_INPUT_VAL & 0x04)) btn |= BUTTON_VOL_DOWN;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* device buttons */
|
|
||||||
if (!hold_button)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
if (!(GPIOB_INPUT_VAL & 0x20)) btn |= BUTTON_POWER;
|
|
||||||
if (!(GPIOF_INPUT_VAL & 0x10)) btn |= BUTTON_VOL_UP;
|
|
||||||
if (!(GPIOF_INPUT_VAL & 0x04)) btn |= BUTTON_VOL_DOWN;
|
|
||||||
#endif
|
|
||||||
/* A hack until the touchpad works */
|
|
||||||
if (!(GPIOB_INPUT_VAL & 0x20)) btn |= BUTTON_SELECT;
|
|
||||||
if (!(GPIOF_INPUT_VAL & 0x10)) btn |= BUTTON_UP;
|
|
||||||
if (!(GPIOF_INPUT_VAL & 0x04)) btn |= BUTTON_DOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
return btn;
|
return btn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,15 +25,23 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#define MEP_BUTTON_HEADER 0x1a
|
||||||
|
#define MEP_BUTTON_ID 0x09
|
||||||
|
#define MEP_ABSOLUTE_HEADER 0x0b
|
||||||
|
|
||||||
#define HAS_BUTTON_HOLD
|
#define HAS_BUTTON_HOLD
|
||||||
|
|
||||||
bool button_hold(void);
|
bool button_hold(void);
|
||||||
void button_init_device(void);
|
void button_init_device(void);
|
||||||
int button_read_device(void);
|
int button_read_device(void);
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
void button_int(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Main unit's buttons */
|
/* Main unit's buttons */
|
||||||
#define BUTTON_POWER 0x00000001
|
#define BUTTON_POWER 0x00000001
|
||||||
#define BUTTON_SELECT 0x00000002
|
#define BUTTON_PLAY 0x00000002
|
||||||
#define BUTTON_MENU 0x00000004
|
#define BUTTON_MENU 0x00000004
|
||||||
#define BUTTON_LEFT 0x00000008
|
#define BUTTON_LEFT 0x00000008
|
||||||
#define BUTTON_RIGHT 0x00000010
|
#define BUTTON_RIGHT 0x00000010
|
||||||
|
|
|
@ -22,14 +22,50 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "i2c-pp.h"
|
|
||||||
#include "tuner.h"
|
|
||||||
#include "ascodec.h"
|
#include "ascodec.h"
|
||||||
#include "as3514.h"
|
#include "as3514.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
#include "synaptics-mep.h"
|
||||||
|
#include "logf.h"
|
||||||
|
|
||||||
void power_init(void)
|
void power_init(void)
|
||||||
{
|
{
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
/* Power on and initialize the touchpad here because we need it for
|
||||||
|
both buttons and button lights */
|
||||||
|
DEV_INIT2 &= ~0x800;
|
||||||
|
|
||||||
|
char byte = ascodec_read(AS3514_CVDD_DCDC3);
|
||||||
|
byte = (byte & ~0x18) | 0x08;
|
||||||
|
ascodec_write(AS3514_CVDD_DCDC3, byte);
|
||||||
|
|
||||||
|
/* LEDs for REW, FFWD, MENU */
|
||||||
|
GPIOD_ENABLE |= (0x40 | 0x20 | 0x04);
|
||||||
|
GPIOD_OUTPUT_VAL |= (0x40 | 0x20 | 0x04);
|
||||||
|
GPIOD_OUTPUT_EN |= (0x40 | 0x20 | 0x04);
|
||||||
|
udelay(20000);
|
||||||
|
|
||||||
|
GPIOL_ENABLE |= 0x10;
|
||||||
|
GPIOL_OUTPUT_VAL &= ~0x10;
|
||||||
|
GPIOL_OUTPUT_EN |= 0x10;
|
||||||
|
udelay(100000);
|
||||||
|
|
||||||
|
/* enable DATA, ACK, CLK lines */
|
||||||
|
GPIOD_ENABLE |= (0x10 | 0x08 | 0x02);
|
||||||
|
|
||||||
|
GPIOD_OUTPUT_EN |= 0x08; /* ACK */
|
||||||
|
GPIOD_OUTPUT_VAL |= 0x08; /* high */
|
||||||
|
|
||||||
|
GPIOD_OUTPUT_EN &= ~0x02; /* CLK */
|
||||||
|
|
||||||
|
GPIOD_OUTPUT_EN |= 0x10; /* DATA */
|
||||||
|
GPIOD_OUTPUT_VAL |= 0x10; /* high */
|
||||||
|
|
||||||
|
if (!touchpad_init())
|
||||||
|
{
|
||||||
|
logf("touchpad not ready");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void power_off(void)
|
void power_off(void)
|
||||||
|
|
Loading…
Reference in a new issue