diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-30 00:59:17 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-30 00:59:17 +0000 |
commit | 2f9ef93c914795ff502f8371084cf3be931494a7 (patch) | |
tree | ededbcdf9e6b6c6baf72e0acbfede21062cbf9db /nuttx/arch/z16/src/common/up_internal.h | |
parent | b15595dcc890f5f9440cf6150e707a5f1739d396 (diff) | |
download | px4-nuttx-2f9ef93c914795ff502f8371084cf3be931494a7.tar.gz px4-nuttx-2f9ef93c914795ff502f8371084cf3be931494a7.tar.bz2 px4-nuttx-2f9ef93c914795ff502f8371084cf3be931494a7.zip |
Added low-level console driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@585 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/z16/src/common/up_internal.h')
-rw-r--r-- | nuttx/arch/z16/src/common/up_internal.h | 20 |
1 files changed, 16 insertions, 4 deletions
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 */ |