summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2009-02-07 11:15:30 +0000
committerBertrik Sikken <bertrik@sikken.nl>2009-02-07 11:15:30 +0000
commit3c7e299cf35fa4f8cadaaed4afe9cb164871c586 (patch)
tree8140ddb53bec8596fa82488358ff97f3c6fb1521
parent4d3a020f274d49c2b8f10cfdad8c67aaa153bebe (diff)
downloadrockbox-3c7e299cf35fa4f8cadaaed4afe9cb164871c586.zip
rockbox-3c7e299cf35fa4f8cadaaed4afe9cb164871c586.tar.gz
rockbox-3c7e299cf35fa4f8cadaaed4afe9cb164871c586.tar.bz2
rockbox-3c7e299cf35fa4f8cadaaed4afe9cb164871c586.tar.xz
Simplify conditions for including serial port support (it's now HAVE_SERIAL). This should save a little binsize and RAM for target that don't have/use a serial port.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19936 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main.c2
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/drivers/serial.c30
-rw-r--r--firmware/export/config-ipod4g.h1
-rw-r--r--firmware/export/config-ipodcolor.h1
-rw-r--r--firmware/export/config-ipodnano.h1
-rw-r--r--firmware/export/config-ipodvideo.h1
-rw-r--r--firmware/export/config-player.h2
-rw-r--r--firmware/export/config-recorder.h2
9 files changed, 12 insertions, 30 deletions
diff --git a/apps/main.c b/apps/main.c
index 94a9231..24a89ec 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -388,7 +388,7 @@ static void init(void)
#ifdef DEBUG
debug_init();
#else
-#if !defined(HAVE_FMADC) && !(CONFIG_STORAGE & STORAGE_MMC)
+#ifdef HAVE_SERIAL
serial_setup();
#endif
#endif
diff --git a/firmware/SOURCES b/firmware/SOURCES
index c08d8f2..67a6a8a 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -108,7 +108,9 @@ drivers/button.c
#ifdef HAVE_DAC3550A
drivers/dac.c
#endif
+#ifdef HAVE_SERIAL
drivers/serial.c
+#endif
#endif /* SIMULATOR */
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c
index f66221b..694ddef 100644
--- a/firmware/drivers/serial.c
+++ b/firmware/drivers/serial.c
@@ -41,9 +41,6 @@
/* FIX: this doesn't work on iRiver or iPod yet */
/* iFP7xx has no remote */
-#if !defined(HAVE_FMADC) /* Recorder FM/V2 has no remote control pin */ \
- && !(CONFIG_STORAGE & STORAGE_MMC) /* MMC takes serial port 1, so don't mess with it */
-
/* Received byte identifiers */
#define PLAY 0xC1
#define STOP 0xC2
@@ -177,8 +174,7 @@ int remote_control_rx(void)
return ret;
}
-#endif /* !HAVE_FMADC && !STORAGE_MMC */
-#elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL)
+#elif defined(CPU_COLDFIRE)
void serial_setup (void)
{
@@ -428,30 +424,6 @@ void SERIAL0(void)
}
}
-#else /* Other targets */
-void serial_setup (void)
-{
- /* a dummy */
-}
-
-int tx_rdy(void)
-{
- /* a dummy */
- return 1;
-}
-
-int rx_rdy(void)
-{
- /* a dummy */
- return 0;
-}
-
-void tx_writec(const unsigned char c)
-{
- (void)c;
- /* a dummy */
-}
-
#endif
void dprintf(const char * str, ... )
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index f6c71f3..e2aaa96 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -187,5 +187,6 @@
#define ICODE_ATTR_TREMOR_NOT_MDCT
#define IPOD_ACCESSORY_PROTOCOL
+#define HAVE_SERIAL
#endif
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index 58a888a..e739591 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -167,5 +167,6 @@
#define ICODE_ATTR_TREMOR_NOT_MDCT
#define IPOD_ACCESSORY_PROTOCOL
+#define HAVE_SERIAL
#endif
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index 1d82ec4..3bf44b3 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -177,5 +177,6 @@
#define ICODE_ATTR_TREMOR_NOT_MDCT
#define IPOD_ACCESSORY_PROTOCOL
+#define HAVE_SERIAL
#endif
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index b658a9b..d3e8dc0 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -199,5 +199,6 @@
#define ICODE_ATTR_TREMOR_NOT_MDCT
#define IPOD_ACCESSORY_PROTOCOL
+#define HAVE_SERIAL
#endif
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h
index 9008212..91d97ab 100644
--- a/firmware/export/config-player.h
+++ b/firmware/export/config-player.h
@@ -100,3 +100,5 @@
#define MAX_CONTRAST_SETTING 31
#define DEFAULT_CONTRAST_SETTING 30
+#define HAVE_SERIAL
+
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index ff74eef..f0a5138 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -120,3 +120,5 @@
#define MIN_CONTRAST_SETTING 5
#define MAX_CONTRAST_SETTING 63
+#define HAVE_SERIAL
+