From 971e5a51bbaa3f4799d61e3c28de810cb2bf7a6c Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 Nov 2008 16:27:50 +0000 Subject: Handle no console case git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1151 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/str71x/str71x_serial.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nuttx/arch/arm/src/str71x/str71x_serial.c b/nuttx/arch/arm/src/str71x/str71x_serial.c index e9739ec62..38bbd149d 100644 --- a/nuttx/arch/arm/src/str71x/str71x_serial.c +++ b/nuttx/arch/arm/src/str71x/str71x_serial.c @@ -426,6 +426,7 @@ static inline void up_restoreuartint(struct up_dev_s *priv, uint16 ier) * Name: up_waittxnotfull ****************************************************************************/ +#ifdef HAVE_CONSOLE static inline void up_waittxnotfull(struct up_dev_s *priv) { int tmp; @@ -443,6 +444,7 @@ static inline void up_waittxnotfull(struct up_dev_s *priv) } } } +#endif /**************************************************************************** * Name: up_setup @@ -932,6 +934,7 @@ void up_serialinit(void) int up_putc(int ch) { +#ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv; ubyte ier; @@ -951,6 +954,7 @@ int up_putc(int ch) up_waittxnotfull(priv); up_restoreuartint(priv, ier); +#endif return ch; } @@ -966,6 +970,7 @@ int up_putc(int ch) int up_putc(int ch) { +#ifdef HAVE_CONSOLE /* Check for LF */ if (ch == '\n') @@ -976,6 +981,7 @@ int up_putc(int ch) } up_lowputc(ch); +#endif return ch; } -- cgit v1.2.3