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.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 8da022453d..bd969df0c0 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -53,7 +53,7 @@
53#include "lcd-remote.h" 53#include "lcd-remote.h"
54#include "crc32.h" 54#include "crc32.h"
55#include "logf.h" 55#include "logf.h"
56#ifndef SIMULATOR 56#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
57#include "disk.h" 57#include "disk.h"
58#include "adc.h" 58#include "adc.h"
59#include "power.h" 59#include "power.h"
@@ -276,7 +276,7 @@ static unsigned int ticks, boost_ticks, freq_sum;
276 276
277static void dbg_audio_task(void) 277static void dbg_audio_task(void)
278{ 278{
279#ifndef SIMULATOR 279#ifdef CPUFREQ_NORMAL
280 if(FREQ > CPUFREQ_NORMAL) 280 if(FREQ > CPUFREQ_NORMAL)
281 boost_ticks++; 281 boost_ticks++;
282 freq_sum += FREQ/1000000; /* in MHz */ 282 freq_sum += FREQ/1000000; /* in MHz */
@@ -371,7 +371,7 @@ static bool dbg_buffering_thread(void)
371 371
372 screens[i].putsf(0, line++, "handle count: %d", (int)d.num_handles); 372 screens[i].putsf(0, line++, "handle count: %d", (int)d.num_handles);
373 373
374#ifndef SIMULATOR 374#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
375 screens[i].putsf(0, line++, "cpu freq: %3dMHz", 375 screens[i].putsf(0, line++, "cpu freq: %3dMHz",
376 (int)((FREQ + 500000) / 1000000)); 376 (int)((FREQ + 500000) / 1000000));
377#endif 377#endif
@@ -758,7 +758,7 @@ static bool dbg_hw_info(void)
758#endif /* !HAVE_LCD_BITMAP */ 758#endif /* !HAVE_LCD_BITMAP */
759#endif /* !SIMULATOR */ 759#endif /* !SIMULATOR */
760 760
761#ifndef SIMULATOR 761#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
762static const char* dbg_partitions_getname(int selected_item, void *data, 762static const char* dbg_partitions_getname(int selected_item, void *data,
763 char *buffer, size_t buffer_len) 763 char *buffer, size_t buffer_len)
764{ 764{
@@ -786,7 +786,7 @@ bool dbg_partitions(void)
786 info.get_name = dbg_partitions_getname; 786 info.get_name = dbg_partitions_getname;
787 return simplelist_show_list(&info); 787 return simplelist_show_list(&info);
788} 788}
789#endif 789#endif /* PLATFORM_NATIVE */
790 790
791#if defined(CPU_COLDFIRE) && defined(HAVE_SPDIF_OUT) 791#if defined(CPU_COLDFIRE) && defined(HAVE_SPDIF_OUT)
792static bool dbg_spdif(void) 792static bool dbg_spdif(void)
@@ -928,7 +928,7 @@ static bool dbg_spdif(void)
928 lcd_putsf(0, line++, "Clock accuracy: %d", x); 928 lcd_putsf(0, line++, "Clock accuracy: %d", x);
929 line++; 929 line++;
930 930
931#ifndef SIMULATOR 931#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
932 lcd_putsf(0, line++, "Measured freq: %ldHz", 932 lcd_putsf(0, line++, "Measured freq: %ldHz",
933 spdif_measure_frequency()); 933 spdif_measure_frequency());
934#endif 934#endif
@@ -950,7 +950,7 @@ static bool dbg_spdif(void)
950} 950}
951#endif /* CPU_COLDFIRE */ 951#endif /* CPU_COLDFIRE */
952 952
953#ifndef SIMULATOR 953#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
954#ifdef HAVE_LCD_BITMAP 954#ifdef HAVE_LCD_BITMAP
955 /* button definitions */ 955 /* button definitions */
956#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ 956#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
@@ -1334,9 +1334,9 @@ bool dbg_ports(void)
1334 return false; 1334 return false;
1335} 1335}
1336#endif /* !HAVE_LCD_BITMAP */ 1336#endif /* !HAVE_LCD_BITMAP */
1337#endif /* !SIMULATOR */ 1337#endif /* PLATFORM_NATIVE */
1338 1338
1339#if (CONFIG_RTC == RTC_PCF50605) && !defined(SIMULATOR) 1339#if (CONFIG_RTC == RTC_PCF50605) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
1340static bool dbg_pcf(void) 1340static bool dbg_pcf(void)
1341{ 1341{
1342 int line; 1342 int line;
@@ -1423,7 +1423,7 @@ static bool dbg_cpufreq(void)
1423} 1423}
1424#endif /* HAVE_ADJUSTABLE_CPU_FREQ */ 1424#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
1425 1425
1426#if defined(HAVE_TSC2100) && !defined(SIMULATOR) 1426#if defined(HAVE_TSC2100) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
1427#include "tsc2100.h" 1427#include "tsc2100.h"
1428static char *itob(int n, int len) 1428static char *itob(int n, int len)
1429{ 1429{
@@ -1493,7 +1493,7 @@ static bool tsc2100_debug(void)
1493 return simplelist_show_list(&info); 1493 return simplelist_show_list(&info);
1494} 1494}
1495#endif 1495#endif
1496#ifndef SIMULATOR 1496#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
1497#ifdef HAVE_LCD_BITMAP 1497#ifdef HAVE_LCD_BITMAP
1498/* 1498/*
1499 * view_battery() shows a automatically scaled graph of the battery voltage 1499 * view_battery() shows a automatically scaled graph of the battery voltage
@@ -1785,7 +1785,7 @@ static bool view_battery(void)
1785#endif /* HAVE_LCD_BITMAP */ 1785#endif /* HAVE_LCD_BITMAP */
1786#endif 1786#endif
1787 1787
1788#ifndef SIMULATOR 1788#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
1789#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) 1789#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
1790 1790
1791#if (CONFIG_STORAGE & STORAGE_MMC) 1791#if (CONFIG_STORAGE & STORAGE_MMC)
@@ -2106,7 +2106,7 @@ static bool dbg_disk_info(void)
2106 info.scroll_all = true; 2106 info.scroll_all = true;
2107 return simplelist_show_list(&info); 2107 return simplelist_show_list(&info);
2108} 2108}
2109#endif /* !SIMULATOR */ 2109#endif /* PLATFORM_NATIVE */
2110 2110
2111#ifdef HAVE_DIRCACHE 2111#ifdef HAVE_DIRCACHE
2112static int dircache_callback(int btn, struct gui_synclist *lists) 2112static int dircache_callback(int btn, struct gui_synclist *lists)
@@ -2672,10 +2672,10 @@ static const struct the_menu_item menuitems[] = {
2672 || CONFIG_CPU == DM320 || defined(CPU_S5L870X) || CONFIG_CPU == AS3525v2 2672 || CONFIG_CPU == DM320 || defined(CPU_S5L870X) || CONFIG_CPU == AS3525v2
2673 { "View I/O ports", dbg_ports }, 2673 { "View I/O ports", dbg_ports },
2674#endif 2674#endif
2675#if (CONFIG_RTC == RTC_PCF50605) && !defined(SIMULATOR) 2675#if (CONFIG_RTC == RTC_PCF50605) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
2676 { "View PCF registers", dbg_pcf }, 2676 { "View PCF registers", dbg_pcf },
2677#endif 2677#endif
2678#if defined(HAVE_TSC2100) && !defined(SIMULATOR) 2678#if defined(HAVE_TSC2100) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
2679 { "TSC2100 debug", tsc2100_debug }, 2679 { "TSC2100 debug", tsc2100_debug },
2680#endif 2680#endif
2681#ifdef HAVE_ADJUSTABLE_CPU_FREQ 2681#ifdef HAVE_ADJUSTABLE_CPU_FREQ
@@ -2689,18 +2689,18 @@ static const struct the_menu_item menuitems[] = {
2689#endif 2689#endif
2690 { "View OS stacks", dbg_os }, 2690 { "View OS stacks", dbg_os },
2691#ifdef HAVE_LCD_BITMAP 2691#ifdef HAVE_LCD_BITMAP
2692#ifndef SIMULATOR 2692#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
2693 { "View battery", view_battery }, 2693 { "View battery", view_battery },
2694#endif 2694#endif
2695 { "Screendump", dbg_screendump }, 2695 { "Screendump", dbg_screendump },
2696#endif 2696#endif
2697#ifndef SIMULATOR 2697#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
2698 { "View HW info", dbg_hw_info }, 2698 { "View HW info", dbg_hw_info },
2699#endif 2699#endif
2700#ifndef SIMULATOR 2700#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
2701 { "View partitions", dbg_partitions }, 2701 { "View partitions", dbg_partitions },
2702#endif 2702#endif
2703#ifndef SIMULATOR 2703#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
2704 { "View disk info", dbg_disk_info }, 2704 { "View disk info", dbg_disk_info },
2705#if (CONFIG_STORAGE & STORAGE_ATA) 2705#if (CONFIG_STORAGE & STORAGE_ATA)
2706 { "Dump ATA identify info", dbg_identify_info}, 2706 { "Dump ATA identify info", dbg_identify_info},