From 2f9ef93c914795ff502f8371084cf3be931494a7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 30 Jan 2008 00:59:17 +0000 Subject: Added low-level console driver git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@585 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/z16/src/common/up_internal.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'nuttx/arch/z16/src/common/up_internal.h') diff --git a/nuttx/arch/z16/src/common/up_internal.h b/nuttx/arch/z16/src/common/up_internal.h index f6acb97a6..144fee754 100644 --- a/nuttx/arch/z16/src/common/up_internal.h +++ b/nuttx/arch/z16/src/common/up_internal.h @@ -58,6 +58,17 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */ +/* Determine which (if any) console driver to use */ + +#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC) || \ + CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE) +# 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 +#endif + /* Macros for portability */ #define IN_INTERRUPT (current_regs != NULL) @@ -118,12 +129,13 @@ void up_addregion(void); /* Defined in up_serial.c */ -#if CONFIG_NFILE_DESCRIPTORS > 0 +#ifdef CONFIG_USE_SERIALDRIVER extern void up_earlyserialinit(void); extern void up_serialinit(void); -#else -# define up_earlyserialinit() -# define up_serialinit() +#endif + +#ifdef CONFIG_USE_LOWCONSOLE +extern void lowconsole_init(void); #endif /* Defined in up_timerisr.c */ -- cgit v1.2.3