diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-11 03:50:52 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-11 03:50:52 +0000 |
commit | 4a62de545bf87610c2415218e144ddef4dd0e75c (patch) | |
tree | 6c5b47ab79d40800d497f8a470aad5aa569ff9d6 /nuttx/arch/z16/src/common | |
parent | 24af177eb1a3e7036f8a3ee5342970ddeb151124 (diff) | |
download | px4-nuttx-4a62de545bf87610c2415218e144ddef4dd0e75c.tar.gz px4-nuttx-4a62de545bf87610c2415218e144ddef4dd0e75c.tar.bz2 px4-nuttx-4a62de545bf87610c2415218e144ddef4dd0e75c.zip |
Add logic so that a RAM log can be used in place of a console device
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4380 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/z16/src/common')
-rw-r--r-- | nuttx/arch/z16/src/common/up_initialize.c | 12 | ||||
-rw-r--r-- | nuttx/arch/z16/src/common/up_internal.h | 22 |
2 files changed, 22 insertions, 12 deletions
diff --git a/nuttx/arch/z16/src/common/up_initialize.c b/nuttx/arch/z16/src/common/up_initialize.c index 063ccdf71..ab653f368 100644 --- a/nuttx/arch/z16/src/common/up_initialize.c +++ b/nuttx/arch/z16/src/common/up_initialize.c @@ -1,8 +1,8 @@ /**************************************************************************** * common/up_initialize.c * - * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -162,12 +162,16 @@ void up_initialize(void) /* Initialize the serial device driver */ -#ifdef CONFIG_USE_SERIALDRIVER +#ifdef USE_SERIALDRIVER up_serialinit(); #endif -#ifdef CONFIG_USE_LOWCONSOLE + /* Initialize the console device driver */ + +#if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); +#elif defined(CONFIG_RAMLOG_CONSOLE) + ramlog_consoleinit(); #endif /* Initialize the netwok */ diff --git a/nuttx/arch/z16/src/common/up_internal.h b/nuttx/arch/z16/src/common/up_internal.h index 117d7f405..e0c8ffc61 100644 --- a/nuttx/arch/z16/src/common/up_internal.h +++ b/nuttx/arch/z16/src/common/up_internal.h @@ -1,8 +1,8 @@ /**************************************************************************** * common/up_internal.h * - * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -64,11 +64,11 @@ #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 USE_LOWCONSOLE 1 +# define USE_LOWUARTINIT 1 #elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0 -# define CONFIG_USE_SERIALDRIVER 1 -# define CONFIG_USE_EARLYSERIALINIT 1 +# define USE_SERIALDRIVER 1 +# define USE_EARLYSERIALINIT 1 #endif /* Macros for portability */ @@ -131,15 +131,21 @@ void up_addregion(void); /* Defined in up_serial.c */ -#ifdef CONFIG_USE_SERIALDRIVER +#ifdef USE_SERIALDRIVER extern void up_earlyserialinit(void); extern void up_serialinit(void); #endif -#ifdef CONFIG_USE_LOWCONSOLE +#ifdef USE_LOWCONSOLE extern void lowconsole_init(void); #endif +/* Defined in drivers/ramlog.c */ + +#ifdef CONFIG_RAMLOG_CONSOLE +extern void ramlog_consoleinit(void); +#endif + /* Defined in up_timerisr.c */ extern void up_timerinit(void); |