diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index fce3e7aaf8..c5bbd020ef 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -2324,6 +2324,14 @@ static bool dbg_save_roms(void) | |||
2324 | 2324 | ||
2325 | #ifndef SIMULATOR | 2325 | #ifndef SIMULATOR |
2326 | #if CONFIG_TUNER | 2326 | #if CONFIG_TUNER |
2327 | |||
2328 | #ifdef CONFIG_TUNER_MULTI | ||
2329 | static int tuner_type = 0; | ||
2330 | #define IF_TUNER_TYPE(type) if(tuner_type==type) | ||
2331 | #else | ||
2332 | #define IF_TUNER_TYPE(type) | ||
2333 | #endif | ||
2334 | |||
2327 | static int radio_callback(int btn, struct gui_synclist *lists) | 2335 | static int radio_callback(int btn, struct gui_synclist *lists) |
2328 | { | 2336 | { |
2329 | (void)lists; | 2337 | (void)lists; |
@@ -2368,32 +2376,39 @@ static int radio_callback(int btn, struct gui_synclist *lists) | |||
2368 | (unsigned)nfo.write_regs[4]); | 2376 | (unsigned)nfo.write_regs[4]); |
2369 | #endif /* TEA5767 */ | 2377 | #endif /* TEA5767 */ |
2370 | #if (CONFIG_TUNER & SI4700) | 2378 | #if (CONFIG_TUNER & SI4700) |
2371 | struct si4700_dbg_info nfo; | 2379 | IF_TUNER_TYPE(SI4700) |
2372 | si4700_dbg_info(&nfo); | 2380 | { |
2373 | simplelist_addline(SIMPLELIST_ADD_LINE, "SI4700 regs:"); | 2381 | struct si4700_dbg_info nfo; |
2374 | /* Registers */ | 2382 | int i; |
2375 | simplelist_addline(SIMPLELIST_ADD_LINE, | 2383 | si4700_dbg_info(&nfo); |
2376 | "%04X %04X %04X %04X", | 2384 | simplelist_addline(SIMPLELIST_ADD_LINE, "SI4700 regs:"); |
2377 | (unsigned)nfo.regs[0], (unsigned)nfo.regs[1], | 2385 | for (i = 0; i < 16; i += 4) { |
2378 | (unsigned)nfo.regs[2], (unsigned)nfo.regs[3]); | 2386 | simplelist_addline(SIMPLELIST_ADD_LINE,"%02X: %04X %04X %04X %04X", |
2379 | simplelist_addline(SIMPLELIST_ADD_LINE, | 2387 | i, nfo.regs[i], nfo.regs[i+1], nfo.regs[i+2], nfo.regs[i+3]); |
2380 | "%04X %04X %04X %04X", | 2388 | } |
2381 | (unsigned)nfo.regs[4], (unsigned)nfo.regs[5], | 2389 | } |
2382 | (unsigned)nfo.regs[6], (unsigned)nfo.regs[7]); | ||
2383 | simplelist_addline(SIMPLELIST_ADD_LINE, | ||
2384 | "%04X %04X %04X %04X", | ||
2385 | (unsigned)nfo.regs[8], (unsigned)nfo.regs[9], | ||
2386 | (unsigned)nfo.regs[10], (unsigned)nfo.regs[11]); | ||
2387 | simplelist_addline(SIMPLELIST_ADD_LINE, | ||
2388 | "%04X %04X %04X %04X", | ||
2389 | (unsigned)nfo.regs[12], (unsigned)nfo.regs[13], | ||
2390 | (unsigned)nfo.regs[14], (unsigned)nfo.regs[15]); | ||
2391 | #endif /* SI4700 */ | 2390 | #endif /* SI4700 */ |
2391 | #if (CONFIG_TUNER & FMCLIPPLUS) | ||
2392 | IF_TUNER_TYPE(FMCLIPPLUS) | ||
2393 | { | ||
2394 | struct fmclipplus_dbg_info nfo; | ||
2395 | int i; | ||
2396 | fmclipplus_dbg_info(&nfo); | ||
2397 | simplelist_addline(SIMPLELIST_ADD_LINE, "FM Clip+ regs:"); | ||
2398 | for (i = 0; i < 32; i += 4) { | ||
2399 | simplelist_addline(SIMPLELIST_ADD_LINE,"%02X: %04X %04X %04X %04X", | ||
2400 | i, nfo.regs[i], nfo.regs[i+1], nfo.regs[i+2], nfo.regs[i+3]); | ||
2401 | } | ||
2402 | } | ||
2403 | #endif /* FMCLIPPLUS */ | ||
2392 | return ACTION_REDRAW; | 2404 | return ACTION_REDRAW; |
2393 | } | 2405 | } |
2394 | static bool dbg_fm_radio(void) | 2406 | static bool dbg_fm_radio(void) |
2395 | { | 2407 | { |
2396 | struct simplelist_info info; | 2408 | struct simplelist_info info; |
2409 | #ifdef CONFIG_TUNER_MULTI | ||
2410 | tuner_type = tuner_detect_type(); | ||
2411 | #endif | ||
2397 | info.scroll_all = true; | 2412 | info.scroll_all = true; |
2398 | simplelist_info_init(&info, "FM Radio", 1, NULL); | 2413 | simplelist_info_init(&info, "FM Radio", 1, NULL); |
2399 | simplelist_set_line_count(0); | 2414 | simplelist_set_line_count(0); |