diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-09 18:18:55 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-09 18:18:55 +0000 |
commit | 0d7b260aff92cead8f2e998a64e19f6452bf2875 (patch) | |
tree | 20a12b00369751e95ca166c02ac89d94f166f1c6 /nuttx/arch/sh/src/sh1/sh1_serial.c | |
parent | 178b76fc31ef415864e57c75ac991e6c2df3746c (diff) | |
download | px4-nuttx-0d7b260aff92cead8f2e998a64e19f6452bf2875.tar.gz px4-nuttx-0d7b260aff92cead8f2e998a64e19f6452bf2875.tar.bz2 px4-nuttx-0d7b260aff92cead8f2e998a64e19f6452bf2875.zip |
Support enable/disable of devices to reduce size
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1176 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src/sh1/sh1_serial.c')
-rw-r--r-- | nuttx/arch/sh/src/sh1/sh1_serial.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/nuttx/arch/sh/src/sh1/sh1_serial.c b/nuttx/arch/sh/src/sh1/sh1_serial.c index 7578132b2..550ca8cc7 100644 --- a/nuttx/arch/sh/src/sh1/sh1_serial.c +++ b/nuttx/arch/sh/src/sh1/sh1_serial.c @@ -53,19 +53,36 @@ #include "up_arch.h" #include "up_internal.h" -#ifdef CONFIG_USE_SERIALDRIVER - /**************************************************************************** * Definitions ****************************************************************************/ /* Some sanity checks *******************************************************/ +/* Are there any SCIs? */ + +#if !defined(CONFIG_SH1_SCI0) && !defined(CONFIG_SH1_SCI1) +# ifdef CONFIG_USE_SERIALDRIVER +# error "Serial driver selected, but SCIs not enabled" +# endif +# undef HAVE_CONSOLE +# undef CONFIG_USE_SERIALDRIVER +#endif + +#ifdef CONFIG_USE_SERIALDRIVER + /* Is there a serial console? */ -#if defined(CONFIG_SCI0_SERIAL_CONSOLE) || defined(CONFIG_SCI1_SERIAL_CONSOLE) -# define HAVE_CONSOLE +#if defined(CONFIG_SCI0_SERIAL_CONSOLE) && defined(CONFIG_SH1_SCI0) +# define HAVE_CONSOLE 1 +# undef CONFIG_SCI1_SERIAL_CONSOLE +#elif defined(CONFIG_SCI1_SERIAL_CONSOLE) && defined(CONFIG_SH1_SCI1) +# define HAVE_CONSOLE 1 +# undef CONFIG_SCI0_SERIAL_CONSOLE #else +# if defined(CONFIG_SCI0_SERIAL_CONSOLE) || defined(CONFIG_SCI1_SERIAL_CONSOLE) +# error "Serial console selected, but corresponding SCI not enabled" +# endif # undef HAVE_CONSOLE #endif |