summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-30 13:00:43 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-30 13:00:43 +0000
commitedc07922eb9e179e7cada5bae60828d72f71c207 (patch)
tree81c6c560b1b2bbe39e6c229ffa4d6f248f28c295 /firmware
parentc3b1eceff1daae7fdb7348bb70b309c37d3f6376 (diff)
downloadrockbox-edc07922eb9e179e7cada5bae60828d72f71c207.tar.gz
rockbox-edc07922eb9e179e7cada5bae60828d72f71c207.zip
(Optional) logf support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6538 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES1
-rw-r--r--firmware/export/logf.h7
-rw-r--r--firmware/logf.c5
3 files changed, 13 insertions, 0 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index b6eeaec3f1..0ea55b382f 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1,3 +1,4 @@
+logf.c
#ifndef SIMULATOR
backlight.c
#endif
diff --git a/firmware/export/logf.h b/firmware/export/logf.h
index af7d7eeb34..f74f50377e 100644
--- a/firmware/export/logf.h
+++ b/firmware/export/logf.h
@@ -18,6 +18,9 @@
****************************************************************************/
#ifndef LOGF_H
#define LOGF_H
+#include <config.h>
+
+#ifdef ROCKBOX_HAS_LOGF
#define MAX_LOGF_LINES 1000
#define MAX_LOGF_DATASIZE (16*MAX_LOGF_LINES)
@@ -27,5 +30,9 @@ extern int logfindex;
extern bool logfwrap;
void logf(const char *format, ...);
+#else
+/* built without logf() support enabled */
+#define logf(...)
+#endif
#endif /* LOGF_H */
diff --git a/firmware/logf.c b/firmware/logf.c
index ac25d65690..ab3d621428 100644
--- a/firmware/logf.c
+++ b/firmware/logf.c
@@ -33,6 +33,9 @@
#include "lcd-remote.h"
#include "logf.h"
+/* Only provide all this if asked to */
+#ifdef ROCKBOX_HAS_LOGF
+
unsigned char logfbuffer[MAX_LOGF_LINES][16];
int logfindex;
bool logfwrap;
@@ -96,3 +99,5 @@ void logf(const char *format, ...)
displayremote();
}
+
+#endif