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.tar.gz
rockbox-3c7e299cf35fa4f8cadaaed4afe9cb164871c586.zip
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 94a9231d7f..24a89eca56 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -388,7 +388,7 @@ static void init(void)
388#ifdef DEBUG 388#ifdef DEBUG
389 debug_init(); 389 debug_init();
390#else 390#else
391#if !defined(HAVE_FMADC) && !(CONFIG_STORAGE & STORAGE_MMC) 391#ifdef HAVE_SERIAL
392 serial_setup(); 392 serial_setup();
393#endif 393#endif
394#endif 394#endif
diff --git a/firmware/SOURCES b/firmware/SOURCES
index c08d8f2d66..67a6a8a93a 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -108,7 +108,9 @@ drivers/button.c
108#ifdef HAVE_DAC3550A 108#ifdef HAVE_DAC3550A
109drivers/dac.c 109drivers/dac.c
110#endif 110#endif
111#ifdef HAVE_SERIAL
111drivers/serial.c 112drivers/serial.c
113#endif
112#endif /* SIMULATOR */ 114#endif /* SIMULATOR */
113 115
114 116
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c
index f66221b561..694ddef79d 100644
--- a/firmware/drivers/serial.c
+++ b/firmware/drivers/serial.c
@@ -41,9 +41,6 @@
41/* FIX: this doesn't work on iRiver or iPod yet */ 41/* FIX: this doesn't work on iRiver or iPod yet */
42/* iFP7xx has no remote */ 42/* iFP7xx has no remote */
43 43
44#if !defined(HAVE_FMADC) /* Recorder FM/V2 has no remote control pin */ \
45 && !(CONFIG_STORAGE & STORAGE_MMC) /* MMC takes serial port 1, so don't mess with it */
46
47/* Received byte identifiers */ 44/* Received byte identifiers */
48#define PLAY 0xC1 45#define PLAY 0xC1
49#define STOP 0xC2 46#define STOP 0xC2
@@ -177,8 +174,7 @@ int remote_control_rx(void)
177 return ret; 174 return ret;
178} 175}
179 176
180#endif /* !HAVE_FMADC && !STORAGE_MMC */ 177#elif defined(CPU_COLDFIRE)
181#elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL)
182 178
183void serial_setup (void) 179void serial_setup (void)
184{ 180{
@@ -428,30 +424,6 @@ void SERIAL0(void)
428 } 424 }
429} 425}
430 426
431#else /* Other targets */
432void serial_setup (void)
433{
434 /* a dummy */
435}
436
437int tx_rdy(void)
438{
439 /* a dummy */
440 return 1;
441}
442
443int rx_rdy(void)
444{
445 /* a dummy */
446 return 0;
447}
448
449void tx_writec(const unsigned char c)
450{
451 (void)c;
452 /* a dummy */
453}
454
455#endif 427#endif
456 428
457void dprintf(const char * str, ... ) 429void dprintf(const char * str, ... )
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index f6c71f39d8..e2aaa96ded 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -187,5 +187,6 @@
187#define ICODE_ATTR_TREMOR_NOT_MDCT 187#define ICODE_ATTR_TREMOR_NOT_MDCT
188 188
189#define IPOD_ACCESSORY_PROTOCOL 189#define IPOD_ACCESSORY_PROTOCOL
190#define HAVE_SERIAL
190 191
191#endif 192#endif
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index 58a888a969..e7395919d6 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -167,5 +167,6 @@
167#define ICODE_ATTR_TREMOR_NOT_MDCT 167#define ICODE_ATTR_TREMOR_NOT_MDCT
168 168
169#define IPOD_ACCESSORY_PROTOCOL 169#define IPOD_ACCESSORY_PROTOCOL
170#define HAVE_SERIAL
170 171
171#endif 172#endif
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index 1d82ec4428..3bf44b3abe 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -177,5 +177,6 @@
177#define ICODE_ATTR_TREMOR_NOT_MDCT 177#define ICODE_ATTR_TREMOR_NOT_MDCT
178 178
179#define IPOD_ACCESSORY_PROTOCOL 179#define IPOD_ACCESSORY_PROTOCOL
180#define HAVE_SERIAL
180 181
181#endif 182#endif
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index b658a9b3f8..d3e8dc0140 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -199,5 +199,6 @@
199#define ICODE_ATTR_TREMOR_NOT_MDCT 199#define ICODE_ATTR_TREMOR_NOT_MDCT
200 200
201#define IPOD_ACCESSORY_PROTOCOL 201#define IPOD_ACCESSORY_PROTOCOL
202#define HAVE_SERIAL
202 203
203#endif 204#endif
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h
index 9008212a17..91d97abd97 100644
--- a/firmware/export/config-player.h
+++ b/firmware/export/config-player.h
@@ -100,3 +100,5 @@
100#define MAX_CONTRAST_SETTING 31 100#define MAX_CONTRAST_SETTING 31
101#define DEFAULT_CONTRAST_SETTING 30 101#define DEFAULT_CONTRAST_SETTING 30
102 102
103#define HAVE_SERIAL
104
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index ff74eef402..f0a513851f 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -120,3 +120,5 @@
120#define MIN_CONTRAST_SETTING 5 120#define MIN_CONTRAST_SETTING 5
121#define MAX_CONTRAST_SETTING 63 121#define MAX_CONTRAST_SETTING 63
122 122
123#define HAVE_SERIAL
124