mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 22:22:33 -05:00
D2: Enable FM radio (based on FS#10035 by Michael Burtin with some changes by myself). Also updates the LV24020 driver to add optional logf debugging.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20420 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d63a8fcb7b
commit
1a6bcfa2c1
8 changed files with 57 additions and 7 deletions
|
|
@ -146,6 +146,13 @@ static const struct button_mapping button_context_keyboard[] = {
|
|||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_keyboard */
|
||||
|
||||
static const struct button_mapping button_context_radio[] = {
|
||||
{ ACTION_FM_MENU, BUTTON_MENU, BUTTON_NONE },
|
||||
{ ACTION_FM_STOP, BUTTON_POWER, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
|
||||
}; /* button_context_radio */
|
||||
|
||||
const struct button_mapping* target_get_context_mapping(int context)
|
||||
{
|
||||
switch (context)
|
||||
|
|
@ -182,6 +189,8 @@ const struct button_mapping* target_get_context_mapping(int context)
|
|||
|
||||
case CONTEXT_YESNOSCREEN:
|
||||
return button_context_yesno;
|
||||
case CONTEXT_FM:
|
||||
return button_context_radio;
|
||||
case CONTEXT_BOOKMARKSCREEN:
|
||||
return button_context_bmark;
|
||||
case CONTEXT_QUICKSCREEN:
|
||||
|
|
|
|||
|
|
@ -232,6 +232,19 @@ static const struct button_mapping button_context_keyboard[] = {
|
|||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_KEYBOARD)
|
||||
}; /* button_context_keyboard */
|
||||
|
||||
static const struct button_mapping button_context_radio[] = {
|
||||
{ ACTION_STD_PREV, BUTTON_MIDLEFT, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_MIDRIGHT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_FM_MENU, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_CENTER },
|
||||
{ ACTION_FM_PRESET, BUTTON_CENTER|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_FM_EXIT, BUTTON_TOPLEFT|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_FM_MODE, BUTTON_BOTTOMLEFT|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_FM_PLAY, BUTTON_TOPRIGHT|BUTTON_REL, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_FM)
|
||||
}; /* button_context_radio */
|
||||
|
||||
const struct button_mapping* get_context_mapping(int context)
|
||||
{
|
||||
if (context & CONTEXT_CUSTOM2
|
||||
|
|
@ -274,6 +287,8 @@ const struct button_mapping* get_context_mapping(int context)
|
|||
|
||||
case CONTEXT_YESNOSCREEN:
|
||||
return button_context_yesno;
|
||||
case CONTEXT_FM:
|
||||
return button_context_radio;
|
||||
case CONTEXT_BOOKMARKSCREEN:
|
||||
return button_context_bmark;
|
||||
case CONTEXT_QUICKSCREEN:
|
||||
|
|
|
|||
|
|
@ -109,6 +109,14 @@
|
|||
#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
|
||||
#define FM_PRESET
|
||||
#define FM_MODE
|
||||
|
||||
#elif (CONFIG_KEYPAD == COWOND2_PAD)
|
||||
#define FM_MENU
|
||||
#define FM_PRESET
|
||||
#define FM_STOP
|
||||
#define FM_MODE
|
||||
#define FM_EXIT
|
||||
#define FM_PLAY
|
||||
#endif
|
||||
|
||||
#define RADIO_SCAN_MODE 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue