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
This commit is contained in:
patacongo 2008-02-16 22:46:55 +00:00
parent 7629c2c811
commit 81f4b8dbf0
3 changed files with 15 additions and 12 deletions

View File

@ -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)

View File

@ -43,6 +43,7 @@
#include <nuttx/config.h>
#include <arch/irq.h>
#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

View File

@ -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 */