diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-28 15:03:17 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-28 15:03:17 +0000 |
commit | cc99071a6827580d7b9c403a907605777522ab5f (patch) | |
tree | 70ce245409ca55cda994ce812cf1d489681dc94f /nuttx/arch/mips | |
parent | 02b171cb25870b7caf1161469edd43486bf4145b (diff) | |
download | px4-firmware-cc99071a6827580d7b9c403a907605777522ab5f.tar.gz px4-firmware-cc99071a6827580d7b9c403a907605777522ab5f.tar.bz2 px4-firmware-cc99071a6827580d7b9c403a907605777522ab5f.zip |
Serial driver needed even when no console; Fix user LED settings in all STM32 configurations
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5575 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/mips')
-rw-r--r-- | nuttx/arch/mips/src/common/up_initialize.c | 12 | ||||
-rw-r--r-- | nuttx/arch/mips/src/common/up_internal.h | 15 |
2 files changed, 23 insertions, 4 deletions
diff --git a/nuttx/arch/mips/src/common/up_initialize.c b/nuttx/arch/mips/src/common/up_initialize.c index 3063b4b4b..a0f0ca9d5 100644 --- a/nuttx/arch/mips/src/common/up_initialize.c +++ b/nuttx/arch/mips/src/common/up_initialize.c @@ -151,11 +151,17 @@ void up_initialize(void) devnull_register(); /* Standard /dev/null */ #endif - /* Initialize the console device driver */ + /* Initialize the serial device driver */ -#if defined(USE_SERIALDRIVER) +#ifdef USE_SERIALDRIVER up_serialinit(); -#elif defined(CONFIG_DEV_LOWCONSOLE) +#endif + + /* Initialize the console device driver (if it is other than the standard + * serial driver). + */ + +#if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); diff --git a/nuttx/arch/mips/src/common/up_internal.h b/nuttx/arch/mips/src/common/up_internal.h index b284961b0..927538dea 100644 --- a/nuttx/arch/mips/src/common/up_internal.h +++ b/nuttx/arch/mips/src/common/up_internal.h @@ -60,7 +60,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ -/* Determine which (if any) console driver to use */ +/* Determine which (if any) console driver to use. If a console is enabled + * and no other console device is specified, then a serial console is + * assumed. + */ #if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0 # undef USE_SERIALDRIVER @@ -81,6 +84,16 @@ # endif #endif +/* If some other device is used as the console, then the serial driver may + * still be needed. Let's assume that if the upper half serial driver is + * built, then the lower half will also be needed. There is no need for + * the early serial initialization in this case. + */ + +#if !defined(USE_SERIALDRIVER) && defined(CONFIG_STANDARD_SERIAL) +# define USE_SERIALDRIVER 1 +#endif + /* Determine which device to use as the system logging device */ #ifndef CONFIG_SYSLOG |