summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-07-14 22:00:50 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-07-14 22:00:50 +0000
commitdc051248be106c783da15f41295691095f7c18f2 (patch)
treec885ec1307eada2361af145f07e1eef9b44f23c1 /apps/debug_menu.c
parenta42a346789bff0d13457d19b22e4e0004be7e479 (diff)
downloadrockbox-dc051248be106c783da15f41295691095f7c18f2.zip
rockbox-dc051248be106c783da15f41295691095f7c18f2.tar.gz
rockbox-dc051248be106c783da15f41295691095f7c18f2.tar.bz2
rockbox-dc051248be106c783da15f41295691095f7c18f2.tar.xz
e200: Tuner driver needs to yield alot and also be mutexed. FM debug screen got broken again and was ignoring cancellation and not drawing the lines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13896 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 93004d8..736c205 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1942,11 +1942,10 @@ static bool dbg_save_roms(void)
#ifndef SIMULATOR
#if CONFIG_TUNER
-int radio_lines = 0;
static int radio_callback(int btn, struct gui_synclist *lists)
{
- (void)btn;(void)lists;
- radio_lines = 0;
+ int radio_lines = 0;
+
if (radio_hardware_present())
{
snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN,
@@ -1966,10 +1965,14 @@ static int radio_callback(int btn, struct gui_synclist *lists)
"if_set: %d Hz", (lv24020lp_get(LV24020LP_IF_SET) ) );
snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN,
"sd_set: %d Hz", (lv24020lp_get(LV24020LP_SD_SET) ) );
+
+ if (btn != ACTION_STD_CANCEL)
+ btn = ACTION_REDRAW;
#endif
#if (CONFIG_TUNER & S1A0903X01)
snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN,
"Samsung regs: %08X", s1a0903x01_get(RADIO_ALL));
+ /* This one doesn't return dynamic data atm */
#endif
#if (CONFIG_TUNER & TEA5767)
struct tea5767_dbg_info info;
@@ -1985,16 +1988,21 @@ static int radio_callback(int btn, struct gui_synclist *lists)
(unsigned)info.write_regs[0], (unsigned)info.write_regs[1],
(unsigned)info.write_regs[2], (unsigned)info.write_regs[3],
(unsigned)info.write_regs[4]);
+
+ if (btn != ACTION_STD_CANCEL)
+ btn = ACTION_REDRAW;
#endif
- btn = ACTION_REDRAW;
+
+ gui_synclist_set_nb_items(lists, radio_lines);
}
else
- snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN, "HW detected: no");
+ snprintf(debug_list_messages[0], DEBUG_MSG_LEN, "HW detected: no");
+
return btn;
}
static bool dbg_fm_radio(void)
{
- dbg_list("FM Radio",radio_lines, 1,
+ dbg_list("FM Radio", 1, 1,
radio_callback, dbg_listmessage_getname);
return false;
}