summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-08-05 20:41:49 +0000
committerJens Arnold <amiconn@rockbox.org>2007-08-05 20:41:49 +0000
commit5fee03c1287d0e6981e8da0ce05b8a6f70c53b2e (patch)
tree7227e0a2e4a3cb0f5cbe61cc19c447dda95171f4
parent5e8e9565a252e4962587e79ca94fb574c31d1c26 (diff)
Make test_disk and test_fps plugins compile for the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14201 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/test_disk.c4
-rw-r--r--apps/plugins/test_fps.c10
2 files changed, 14 insertions, 0 deletions
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c
index 5799f4ce0b..45dc598fc2 100644
--- a/apps/plugins/test_disk.c
+++ b/apps/plugins/test_disk.c
@@ -114,9 +114,11 @@ static bool test_fs(void)
log_init();
log_text("test_disk WRITE&VERIFY", true);
+#ifndef SIMULATOR
rb->snprintf(text_buf, sizeof(text_buf), "CPU clock: %ld Hz",
*rb->cpu_frequency);
log_text(text_buf, true);
+#endif
log_text("----------------------", true);
rb->snprintf(text_buf, sizeof text_buf, "Data size: %dKB", (TEST_SIZE>>10));
log_text(text_buf, true);
@@ -297,9 +299,11 @@ static bool test_speed(void)
rb->memset(audiobuf, 'T', audiobuflen);
log_init();
log_text("test_disk SPEED TEST", true);
+#ifndef SIMULATOR
rb->snprintf(text_buf, sizeof(text_buf), "CPU clock: %ld Hz",
*rb->cpu_frequency);
log_text(text_buf, true);
+#endif
log_text("--------------------", true);
/* File creation speed */
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c
index ef1973f8b2..9188d96ba4 100644
--- a/apps/plugins/test_fps.c
+++ b/apps/plugins/test_fps.c
@@ -39,7 +39,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
char str[64]; /* text buffer */
int time_start; /* start tickcount */
int frame_count; /* frame counter */
+#ifndef SIMULATOR
int cpu_freq;
+#endif
int line = 0;
int part14_x = LCD_WIDTH/4; /* x-offset for 1/4 update test */
int part14_w = LCD_WIDTH/2; /* x-size for 1/4 update test */
@@ -67,7 +69,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#endif
rb->lcd_update();
+#ifndef SIMULATOR
cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */
+#endif
/* TEST 1: FULL LCD UPDATE */
frame_count = 0;
@@ -96,12 +100,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
(frame_count%2)*5);
rb->lcd_puts(0, line++, str);
+#ifndef SIMULATOR
if (*rb->cpu_frequency != cpu_freq)
rb->snprintf(str, sizeof(str), "CPU: frequency changed!");
else
rb->snprintf(str, sizeof(str), "CPU: %d Hz", cpu_freq);
rb->lcd_puts(0, line++, str);
+#endif
rb->lcd_update();
#ifdef HAVE_REMOTE_LCD
@@ -110,7 +116,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->lcd_remote_puts(0, r_line++, "Remote LCD");
rb->lcd_remote_update();
+#ifndef SIMULATOR
cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */
+#endif
/* TEST 1: FULL LCD UPDATE */
frame_count = 0;
@@ -140,12 +148,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
(frame_count%2)*5);
rb->lcd_puts(0, line++, str);
+#ifndef SIMULATOR
if (*rb->cpu_frequency != cpu_freq)
rb->snprintf(str, sizeof(str), "CPU: frequency changed!");
else
rb->snprintf(str, sizeof(str), "CPU: %d Hz", cpu_freq);
rb->lcd_puts(0, line++, str);
+#endif
rb->lcd_update();
#endif