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
This commit is contained in:
parent
4d3a020f27
commit
3c7e299cf3
|
@ -388,7 +388,7 @@ static void init(void)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
debug_init();
|
debug_init();
|
||||||
#else
|
#else
|
||||||
#if !defined(HAVE_FMADC) && !(CONFIG_STORAGE & STORAGE_MMC)
|
#ifdef HAVE_SERIAL
|
||||||
serial_setup();
|
serial_setup();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -108,7 +108,9 @@ drivers/button.c
|
||||||
#ifdef HAVE_DAC3550A
|
#ifdef HAVE_DAC3550A
|
||||||
drivers/dac.c
|
drivers/dac.c
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_SERIAL
|
||||||
drivers/serial.c
|
drivers/serial.c
|
||||||
|
#endif
|
||||||
#endif /* SIMULATOR */
|
#endif /* SIMULATOR */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
/* FIX: this doesn't work on iRiver or iPod yet */
|
/* FIX: this doesn't work on iRiver or iPod yet */
|
||||||
/* iFP7xx has no remote */
|
/* 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 */
|
/* Received byte identifiers */
|
||||||
#define PLAY 0xC1
|
#define PLAY 0xC1
|
||||||
#define STOP 0xC2
|
#define STOP 0xC2
|
||||||
|
@ -177,8 +174,7 @@ int remote_control_rx(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !HAVE_FMADC && !STORAGE_MMC */
|
#elif defined(CPU_COLDFIRE)
|
||||||
#elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL)
|
|
||||||
|
|
||||||
void serial_setup (void)
|
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
|
#endif
|
||||||
|
|
||||||
void dprintf(const char * str, ... )
|
void dprintf(const char * str, ... )
|
||||||
|
|
|
@ -187,5 +187,6 @@
|
||||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||||
|
|
||||||
#define IPOD_ACCESSORY_PROTOCOL
|
#define IPOD_ACCESSORY_PROTOCOL
|
||||||
|
#define HAVE_SERIAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -167,5 +167,6 @@
|
||||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||||
|
|
||||||
#define IPOD_ACCESSORY_PROTOCOL
|
#define IPOD_ACCESSORY_PROTOCOL
|
||||||
|
#define HAVE_SERIAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -177,5 +177,6 @@
|
||||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||||
|
|
||||||
#define IPOD_ACCESSORY_PROTOCOL
|
#define IPOD_ACCESSORY_PROTOCOL
|
||||||
|
#define HAVE_SERIAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -199,5 +199,6 @@
|
||||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||||
|
|
||||||
#define IPOD_ACCESSORY_PROTOCOL
|
#define IPOD_ACCESSORY_PROTOCOL
|
||||||
|
#define HAVE_SERIAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -100,3 +100,5 @@
|
||||||
#define MAX_CONTRAST_SETTING 31
|
#define MAX_CONTRAST_SETTING 31
|
||||||
#define DEFAULT_CONTRAST_SETTING 30
|
#define DEFAULT_CONTRAST_SETTING 30
|
||||||
|
|
||||||
|
#define HAVE_SERIAL
|
||||||
|
|
||||||
|
|
|
@ -120,3 +120,5 @@
|
||||||
#define MIN_CONTRAST_SETTING 5
|
#define MIN_CONTRAST_SETTING 5
|
||||||
#define MAX_CONTRAST_SETTING 63
|
#define MAX_CONTRAST_SETTING 63
|
||||||
|
|
||||||
|
#define HAVE_SERIAL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user