mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Radio and radio recording for Samsung YH-920.
There is no simple method to detect radio through the 3-wire interface, so it's not implemented for the YH-925 for now. YH-920 always has a radio. Change-Id: Iea484d752915fcd40dbbbd7dbbf13e81aaf548db
This commit is contained in:
parent
0c3dca1f33
commit
eacd76cb80
11 changed files with 335 additions and 44 deletions
|
|
@ -296,6 +296,27 @@ static const struct button_mapping button_context_keyboard[] = {
|
|||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_keyboard */
|
||||
|
||||
#if CONFIG_TUNER
|
||||
static const struct button_mapping button_context_radio[] = {
|
||||
{ ACTION_FM_MENU, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
||||
{ ACTION_FM_EXIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_FM_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||
{ ACTION_FM_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_FM_PRESET, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT},
|
||||
{ ACTION_FM_MODE, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INCREPEAT,BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_FFWD, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_PREV, BUTTON_REW, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
|
||||
}; /* button_context_radio */
|
||||
#endif
|
||||
|
||||
const struct button_mapping* get_context_mapping(int context)
|
||||
{
|
||||
switch (context)
|
||||
|
|
@ -342,6 +363,10 @@ const struct button_mapping* get_context_mapping(int context)
|
|||
return button_context_recscreen;
|
||||
case CONTEXT_KEYBOARD:
|
||||
return button_context_keyboard;
|
||||
}
|
||||
#if CONFIG_TUNER
|
||||
case CONTEXT_FM:
|
||||
return button_context_radio;
|
||||
#endif
|
||||
}
|
||||
return button_context_standard;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue