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.c63
1 files changed, 7 insertions, 56 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index bc272e2a85..8913558e6c 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1004,16 +1004,7 @@ static bool view_battery(void)
1004 lcd_putsf(0, 2, "External: %d.%03d V", y / 1000, y % 1000); 1004 lcd_putsf(0, 2, "External: %d.%03d V", y / 1000, y % 1000);
1005#endif 1005#endif
1006#if CONFIG_CHARGING 1006#if CONFIG_CHARGING
1007#if defined ARCHOS_RECORDER 1007#if defined IPOD_NANO || defined IPOD_VIDEO
1008 lcd_putsf(0, 3, "Chgr: %s %s",
1009 charger_inserted() ? "present" : "absent",
1010 charger_enabled() ? "on" : "off");
1011 lcd_putsf(0, 5, "short delta: %d", short_delta);
1012 lcd_putsf(0, 6, "long delta: %d", long_delta);
1013 lcd_puts(0, 7, power_message);
1014 lcd_putsf(0, 8, "USB Inserted: %s",
1015 usb_inserted() ? "yes" : "no");
1016#elif defined IPOD_NANO || defined IPOD_VIDEO
1017 int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false; 1008 int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false;
1018 int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true; 1009 int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true;
1019 int dock = (GPIOA_INPUT_VAL & 0x10)?true:false; 1010 int dock = (GPIOA_INPUT_VAL & 0x10)?true:false;
@@ -1181,18 +1172,6 @@ static bool view_battery(void)
1181 1172
1182 case 3: /* remaining time estimation: */ 1173 case 3: /* remaining time estimation: */
1183 1174
1184#ifdef ARCHOS_RECORDER
1185 lcd_putsf(0, 0, "charge_state: %d", charge_state);
1186
1187 lcd_putsf(0, 1, "Cycle time: %d m", powermgmt_last_cycle_startstop_min);
1188
1189 lcd_putsf(0, 2, "Lvl@cyc st: %d%%", powermgmt_last_cycle_level);
1190
1191 lcd_putsf(0, 3, "P=%2d I=%2d", pid_p, pid_i);
1192
1193 lcd_putsf(0, 4, "Trickle sec: %d/60", trickle_sec);
1194#endif /* ARCHOS_RECORDER */
1195
1196#if (CONFIG_BATTERY_MEASURE & VOLTAGE_MEASURE) 1175#if (CONFIG_BATTERY_MEASURE & VOLTAGE_MEASURE)
1197 lcd_putsf(0, 5, "Last PwrHist: %d.%03dV", 1176 lcd_putsf(0, 5, "Last PwrHist: %d.%03dV",
1198 power_history[0] / 1000, 1177 power_history[0] / 1000,
@@ -1903,30 +1882,7 @@ static bool dbg_tagcache_info(void)
1903} 1882}
1904#endif 1883#endif
1905 1884
1906#if CONFIG_CPU == SH7034 1885#if defined CPU_COLDFIRE
1907static bool dbg_save_roms(void)
1908{
1909 int fd;
1910 int oldmode = system_memory_guard(MEMGUARD_NONE);
1911
1912 fd = creat("/internal_rom_0000-FFFF.bin", 0666);
1913 if(fd >= 0)
1914 {
1915 write(fd, (void *)0, 0x10000);
1916 close(fd);
1917 }
1918
1919 fd = creat("/internal_rom_2000000-203FFFF.bin", 0666);
1920 if(fd >= 0)
1921 {
1922 write(fd, (void *)0x2000000, 0x40000);
1923 close(fd);
1924 }
1925
1926 system_memory_guard(oldmode);
1927 return false;
1928}
1929#elif defined CPU_COLDFIRE
1930static bool dbg_save_roms(void) 1886static bool dbg_save_roms(void)
1931{ 1887{
1932 int fd; 1888 int fd;
@@ -2091,11 +2047,6 @@ static int radio_callback(int btn, struct gui_synclist *lists)
2091 simplelist_addline( 2047 simplelist_addline(
2092 "sd_set: %d Hz", lv24020lp_get(LV24020LP_SD_SET) ); 2048 "sd_set: %d Hz", lv24020lp_get(LV24020LP_SD_SET) );
2093#endif /* LV24020LP */ 2049#endif /* LV24020LP */
2094#if (CONFIG_TUNER & S1A0903X01)
2095 simplelist_addline(
2096 "Samsung regs: %08X", s1a0903x01_get(RADIO_ALL));
2097 /* This one doesn't return dynamic data atm */
2098#endif /* S1A0903X01 */
2099#if (CONFIG_TUNER & TEA5767) 2050#if (CONFIG_TUNER & TEA5767)
2100 struct tea5767_dbg_info nfo; 2051 struct tea5767_dbg_info nfo;
2101 tea5767_dbg_info(&nfo); 2052 tea5767_dbg_info(&nfo);
@@ -2218,7 +2169,7 @@ static bool dbg_metadatalog(void)
2218 return false; 2169 return false;
2219} 2170}
2220 2171
2221#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) 2172#if defined(CPU_COLDFIRE)
2222static bool dbg_set_memory_guard(void) 2173static bool dbg_set_memory_guard(void)
2223{ 2174{
2224 static const struct opt_items names[MAXMEMGUARD] = { 2175 static const struct opt_items names[MAXMEMGUARD] = {
@@ -2233,7 +2184,7 @@ static bool dbg_set_memory_guard(void)
2233 2184
2234 return false; 2185 return false;
2235} 2186}
2236#endif /* CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) */ 2187#endif /* defined(CPU_COLDFIRE) */
2237 2188
2238#if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) 2189#if defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS)
2239static bool dbg_write_eeprom(void) 2190static bool dbg_write_eeprom(void)
@@ -2589,13 +2540,13 @@ static const struct {
2589 unsigned char *desc; /* string or ID */ 2540 unsigned char *desc; /* string or ID */
2590 bool (*function) (void); /* return true if USB was connected */ 2541 bool (*function) (void); /* return true if USB was connected */
2591} menuitems[] = { 2542} menuitems[] = {
2592#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ 2543#if defined(CPU_COLDFIRE) || \
2593 (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) || \ 2544 (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) || \
2594 CONFIG_CPU == IMX31L || defined(CPU_TCC780X) || CONFIG_CPU == AS3525v2 || \ 2545 CONFIG_CPU == IMX31L || defined(CPU_TCC780X) || CONFIG_CPU == AS3525v2 || \
2595 CONFIG_CPU == AS3525 || CONFIG_CPU == RK27XX 2546 CONFIG_CPU == AS3525 || CONFIG_CPU == RK27XX
2596 { "Dump ROM contents", dbg_save_roms }, 2547 { "Dump ROM contents", dbg_save_roms },
2597#endif 2548#endif
2598#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ 2549#if defined(CPU_COLDFIRE) || defined(CPU_PP) \
2599 || CONFIG_CPU == S3C2440 || CONFIG_CPU == IMX31L || CONFIG_CPU == AS3525 \ 2550 || CONFIG_CPU == S3C2440 || CONFIG_CPU == IMX31L || CONFIG_CPU == AS3525 \
2600 || CONFIG_CPU == DM320 || defined(CPU_S5L870X) || CONFIG_CPU == AS3525v2 \ 2551 || CONFIG_CPU == DM320 || defined(CPU_S5L870X) || CONFIG_CPU == AS3525v2 \
2601 || CONFIG_CPU == RK27XX 2552 || CONFIG_CPU == RK27XX
@@ -2616,7 +2567,7 @@ static const struct {
2616#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR) 2567#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR)
2617 { "S/PDIF analyzer", dbg_spdif }, 2568 { "S/PDIF analyzer", dbg_spdif },
2618#endif 2569#endif
2619#if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) 2570#if defined(CPU_COLDFIRE)
2620 { "Catch mem accesses", dbg_set_memory_guard }, 2571 { "Catch mem accesses", dbg_set_memory_guard },
2621#endif 2572#endif
2622 { "View OS stacks", dbg_os }, 2573 { "View OS stacks", dbg_os },