diff options
author | Nils Wallménius <nils@rockbox.org> | 2008-12-09 20:48:04 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2008-12-09 20:48:04 +0000 |
commit | 65f61d6cce4a5d3b52860d38a922b01fcddc70cd (patch) | |
tree | 03f8167279828845dcd4923d8184bc58d0e165da /apps | |
parent | a13c16271911be641539cace3ea5ea0c1440eeaf (diff) | |
download | rockbox-65f61d6cce4a5d3b52860d38a922b01fcddc70cd.tar.gz rockbox-65f61d6cce4a5d3b52860d38a922b01fcddc70cd.zip |
FS#9609 FM radio support for the Gigabeat S, seeking/scanning is not yet
implemented but manual tuning works nicely. Thanks to Rafaël Carré,
Bertrik Sikken and Robert Menes for suggestions and debugging help.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19372 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/keymaps/keymap-gigabeat-s.c | 18 | ||||
-rw-r--r-- | apps/recorder/radio.c | 6 |
2 files changed, 23 insertions, 1 deletions
diff --git a/apps/keymaps/keymap-gigabeat-s.c b/apps/keymaps/keymap-gigabeat-s.c index a60fd2d8a1..b0cc87011f 100644 --- a/apps/keymaps/keymap-gigabeat-s.c +++ b/apps/keymaps/keymap-gigabeat-s.c @@ -276,6 +276,22 @@ static const struct button_mapping button_context_keyboard[] = { LAST_ITEM_IN_LIST }; /* button_context_keyboard */ +static const struct button_mapping button_context_radio[] = { + { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT }, + { ACTION_FM_STOP, BUTTON_POWER, BUTTON_NONE }, + { ACTION_FM_MODE, BUTTON_MENU, BUTTON_NONE }, + { ACTION_FM_EXIT, BUTTON_BACK, BUTTON_NONE }, + { ACTION_FM_PLAY, BUTTON_PLAY, BUTTON_NONE }, + { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, + { ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, + { ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, + + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) +}; + const struct button_mapping* get_context_mapping(int context) { switch (context) @@ -319,6 +335,8 @@ const struct button_mapping* get_context_mapping(int context) return button_context_pitchscreen; case CONTEXT_KEYBOARD: return button_context_keyboard; + case CONTEXT_FM: + return button_context_radio; } return button_context_standard; } diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 5f9fff8d64..dee38b5475 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c @@ -104,13 +104,17 @@ #define FM_MODE #define FM_EXIT #define FM_PLAY + +#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) +#define FM_PRESET +#define FM_MODE #endif #define RADIO_SCAN_MODE 0 #define RADIO_PRESET_MODE 1 static int curr_preset = -1; -static int curr_freq; +static int curr_freq; /* current frequency in Hz */ static int radio_mode = RADIO_SCAN_MODE; static int search_dir = 0; |