From 1a6bcfa2c1545fc66aac40c88dba3a6f804d6227 Mon Sep 17 00:00:00 2001 From: Rob Purchase Date: Sat, 21 Mar 2009 00:13:20 +0000 Subject: D2: Enable FM radio (based on FS#10035 by Michael Burtin with some changes by myself). Also updates the LV24020 driver to add optional logf debugging. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20420 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/tuner/lv24020lp.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'firmware/drivers/tuner/lv24020lp.c') diff --git a/firmware/drivers/tuner/lv24020lp.c b/firmware/drivers/tuner/lv24020lp.c index 769be8ac77..c6d396aca4 100644 --- a/firmware/drivers/tuner/lv24020lp.c +++ b/firmware/drivers/tuner/lv24020lp.c @@ -29,19 +29,17 @@ #include "power.h" #include "fmradio.h" /* physical interface driver */ #include "sound.h" -#include "pp5024.h" #include "system.h" #ifndef BOOTLOADER static struct mutex tuner_mtx; -#if 0 /* define to enable tuner logging */ -#define SANYO_TUNER_LOG -#endif +#undef SANYO_TUNER_LOG_FILE +#undef SANYO_TUNER_LOGF -#ifdef SANYO_TUNER_LOG +#ifdef SANYO_TUNER_LOG_FILE #include "sprintf.h" #include "file.h" @@ -52,6 +50,15 @@ static int fd_log = -1; /* syncing required because close() is never called */ #define TUNER_LOG_SYNC() fsync(fd_log) #define TUNER_LOG(s...) fdprintf(fd_log, s) + +#elif defined(SANYO_TUNER_LOGF) +#define LOGF_ENABLE +#include "logf.h" + +#define TUNER_LOG_OPEN() +#define TUNER_LOG_SYNC() +#define TUNER_LOG(s...) logf(s) + #else #define TUNER_LOG_OPEN() #define TUNER_LOG_SYNC() -- cgit v1.2.3