From 3412e0792cdd885a8902c872af8213222f84b242 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 16 Feb 2008 22:46:55 +0000 Subject: Fix inconsistent use of CONFIG_ARCH_LOWPUTC git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@698 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/z16/src/common/up_internal.h | 14 ++++++++------ nuttx/arch/z16/src/z16f/chip.h | 3 ++- nuttx/arch/z16/src/z16f/z16f_lowuart.S | 10 +++++----- 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'nuttx') diff --git a/nuttx/arch/z16/src/common/up_internal.h b/nuttx/arch/z16/src/common/up_internal.h index 1f2f51829..1b1d1b375 100644 --- a/nuttx/arch/z16/src/common/up_internal.h +++ b/nuttx/arch/z16/src/common/up_internal.h @@ -57,16 +57,18 @@ #undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */ #undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */ +#undef CONFIG_Z16_LOWPUTC /* Support up_lowputc for debug */ +#undef CONFIG_Z16_LOWGETC /* support up_lowgetc for debug */ /* Determine which (if any) console driver to use */ -#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC) || \ +#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) || \ CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE) -# define CONFIG_USE_LOWCONSOLE 1 -# define CONFIG_USE_LOWUARTINIT 1 +# define CONFIG_USE_LOWCONSOLE 1 +# define CONFIG_USE_LOWUARTINIT 1 #elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0 -# define CONFIG_USE_SERIALDRIVER 1 -# define CONFIG_USE_EARLYSERIALINIT 1 +# define CONFIG_USE_SERIALDRIVER 1 +# define CONFIG_USE_EARLYSERIALINIT 1 #endif /* Macros for portability */ @@ -115,7 +117,7 @@ extern int up_saveusercontext(FAR chipreg_t *regs); extern void up_sigdeliver(void); extern int up_timerisr(int irq, FAR chipreg_t *regs); -#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC) +#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) extern void up_lowputc(char ch); #else # define up_lowputc(ch) diff --git a/nuttx/arch/z16/src/z16f/chip.h b/nuttx/arch/z16/src/z16f/chip.h index f43a65392..f2c7362a2 100644 --- a/nuttx/arch/z16/src/z16f/chip.h +++ b/nuttx/arch/z16/src/z16f/chip.h @@ -43,6 +43,7 @@ #include #include +#include "common/up_internal.h" /************************************************************************************ * Definitions @@ -543,7 +544,7 @@ extern "C" { */ EXTERN void z16f_lowinit(void); -#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC) +#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) EXTERN void z16f_lowuartinit(void); #endif diff --git a/nuttx/arch/z16/src/z16f/z16f_lowuart.S b/nuttx/arch/z16/src/z16f/z16f_lowuart.S index 1dedf16b3..1df5b62ca 100755 --- a/nuttx/arch/z16/src/z16f/z16f_lowuart.S +++ b/nuttx/arch/z16/src/z16f/z16f_lowuart.S @@ -50,10 +50,10 @@ xdef _z16f_lowuartinit xref _SYS_CLK_FREQ:EROM -#ifdef CONFIG_ARCH_LOWPUTC +#ifdef CONFIG_Z16_LOWPUTC xdef _up_lowputc #endif -#ifdef CONFIG_ARCH_LOWGETC +#ifdef CONFIG_Z16_LOWGETC xdef _up_lowgetc #endif @@ -139,7 +139,7 @@ _z16f_lowuartinit: * *************************************************************************/ -#ifdef CONFIG_ARCH_LOWPUTC +#ifdef CONFIG_Z16_LOWPUTC _up_lowputc: /* Check if the character to output is a linefeed */ @@ -184,7 +184,7 @@ _z16f_xmitc1: #endif ret /* Return */ -#endif /* CONFIG_ARCH_LOWPUTC */ +#endif /* CONFIG_Z16_LOWPUTC */ /************************************************************************* * Name: _up_lowgetc @@ -200,7 +200,7 @@ _z16f_xmitc1: * *************************************************************************/ -#ifdef CONFIG_ARCH_LOWGETC +#ifdef CONFIG_Z16_LOWGETC _up_lowgetc: _up_lowgetc1: ld r0, #Z16F_UARTSTAT0_RDA /* RDA=Receive data available */ -- cgit v1.2.3