diff options
author | Ralf Ertzinger <rockbox@camperquake.de> | 2011-09-09 12:28:36 +0200 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2012-02-16 14:44:43 +0100 |
commit | d2f97da668836f5d825c9aaef0d58dea64fc4dd5 (patch) | |
tree | e55f90f533302a21f41d2633978e45f6099f77fc /firmware | |
parent | b193b75f62ff3be76f3cec120fe906c474b5caeb (diff) |
Make logf() output to serial optional
Only output logf() to the serial port if LOGF_SERIAL is defined
(in addition to HAVE_SERIAL). Add an option to advanced configure
to set this (defaults to off).
Change-Id: I13d0f5df391e5371f7797f46a3faaf7a6974b9e4
Reviewed-on: http://gerrit.rockbox.org/92
Reviewed-by: Björn Stenberg <bjorn@haxx.se>
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/logf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/logf.c b/firmware/logf.c index 3a6b696b1a..fc81ced779 100644 --- a/firmware/logf.c +++ b/firmware/logf.c @@ -188,7 +188,7 @@ static int logf_push(void *userp, unsigned char c) logfbuffer[logfindex++] = c; check_logfindex(); -#if defined(HAVE_SERIAL) && !defined(SIMULATOR) +#if defined(HAVE_SERIAL) && !defined(SIMULATOR) && defined(LOGF_SERIAL) if(c != '\0') { char buf[2]; @@ -225,7 +225,7 @@ void _logf(const char *fmt, ...) /* add trailing zero */ logf_push(NULL, '\0'); -#if defined(HAVE_SERIAL) && !defined(SIMULATOR) +#if defined(HAVE_SERIAL) && !defined(SIMULATOR) && defined(LOGF_SERIAL) serial_tx("\r\n"); #endif #ifdef USB_ENABLE_SERIAL |