summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
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 93004d818a..736c2054d1 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1942,11 +1942,10 @@ static bool dbg_save_roms(void)
1942 1942
1943#ifndef SIMULATOR 1943#ifndef SIMULATOR
1944#if CONFIG_TUNER 1944#if CONFIG_TUNER
1945int radio_lines = 0;
1946static int radio_callback(int btn, struct gui_synclist *lists) 1945static int radio_callback(int btn, struct gui_synclist *lists)
1947{ 1946{
1948 (void)btn;(void)lists; 1947 int radio_lines = 0;
1949 radio_lines = 0; 1948
1950 if (radio_hardware_present()) 1949 if (radio_hardware_present())
1951 { 1950 {
1952 snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN, 1951 snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN,
@@ -1966,10 +1965,14 @@ static int radio_callback(int btn, struct gui_synclist *lists)
1966 "if_set: %d Hz", (lv24020lp_get(LV24020LP_IF_SET) ) ); 1965 "if_set: %d Hz", (lv24020lp_get(LV24020LP_IF_SET) ) );
1967 snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN, 1966 snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN,
1968 "sd_set: %d Hz", (lv24020lp_get(LV24020LP_SD_SET) ) ); 1967 "sd_set: %d Hz", (lv24020lp_get(LV24020LP_SD_SET) ) );
1968
1969 if (btn != ACTION_STD_CANCEL)
1970 btn = ACTION_REDRAW;
1969#endif 1971#endif
1970#if (CONFIG_TUNER & S1A0903X01) 1972#if (CONFIG_TUNER & S1A0903X01)
1971 snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN, 1973 snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN,
1972 "Samsung regs: %08X", s1a0903x01_get(RADIO_ALL)); 1974 "Samsung regs: %08X", s1a0903x01_get(RADIO_ALL));
1975 /* This one doesn't return dynamic data atm */
1973#endif 1976#endif
1974#if (CONFIG_TUNER & TEA5767) 1977#if (CONFIG_TUNER & TEA5767)
1975 struct tea5767_dbg_info info; 1978 struct tea5767_dbg_info info;
@@ -1985,16 +1988,21 @@ static int radio_callback(int btn, struct gui_synclist *lists)
1985 (unsigned)info.write_regs[0], (unsigned)info.write_regs[1], 1988 (unsigned)info.write_regs[0], (unsigned)info.write_regs[1],
1986 (unsigned)info.write_regs[2], (unsigned)info.write_regs[3], 1989 (unsigned)info.write_regs[2], (unsigned)info.write_regs[3],
1987 (unsigned)info.write_regs[4]); 1990 (unsigned)info.write_regs[4]);
1991
1992 if (btn != ACTION_STD_CANCEL)
1993 btn = ACTION_REDRAW;
1988#endif 1994#endif
1989 btn = ACTION_REDRAW; 1995
1996 gui_synclist_set_nb_items(lists, radio_lines);
1990 } 1997 }
1991 else 1998 else
1992 snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN, "HW detected: no"); 1999 snprintf(debug_list_messages[0], DEBUG_MSG_LEN, "HW detected: no");
2000
1993 return btn; 2001 return btn;
1994} 2002}
1995static bool dbg_fm_radio(void) 2003static bool dbg_fm_radio(void)
1996{ 2004{
1997 dbg_list("FM Radio",radio_lines, 1, 2005 dbg_list("FM Radio", 1, 1,
1998 radio_callback, dbg_listmessage_getname); 2006 radio_callback, dbg_listmessage_getname);
1999 return false; 2007 return false;
2000} 2008}