Serial driver needed even when no console; Fix user LED settings in all STM32 configurations
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5575 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
6cfe0a45e9
commit
1b8979d24f
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/common/up_initialize.c
|
* arch/arm/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010, 2012-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -161,11 +161,17 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#if defined(USE_SERIALDRIVER)
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
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();
|
lowconsole_init();
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_internal.h
|
* common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -63,7 +63,10 @@
|
|||||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
||||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
#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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS == 0
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -84,6 +87,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/avr/src/at32uc3/at32uc3_config.h
|
* arch/avr/src/at32uc3/at32uc3_config.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -144,7 +144,10 @@
|
|||||||
# undef HAVE_SERIAL_CONSOLE
|
# undef HAVE_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -168,6 +171,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/avr/src/at90usb/at90usb_config.h
|
* arch/avr/src/at90usb/at90usb_config.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -63,7 +63,10 @@
|
|||||||
# undef HAVE_SERIAL_CONSOLE
|
# undef HAVE_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -87,6 +90,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/avr/src/atmega/atmega_config.h
|
* arch/avr/src/atmega/atmega_config.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -68,7 +68,10 @@
|
|||||||
# undef HAVE_SERIAL_CONSOLE
|
# undef HAVE_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -92,6 +95,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/common/up_initialize.c
|
* arch/avr/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -57,6 +57,10 @@
|
|||||||
* up_serialinit to be incorrectly called if there is no USART configured to
|
* up_serialinit to be incorrectly called if there is no USART configured to
|
||||||
* be an RS-232 device (see as an example arch/avr/src/at32uc23/at32uc3_config.h)
|
* be an RS-232 device (see as an example arch/avr/src/at32uc23/at32uc3_config.h)
|
||||||
* This will probably have to be revisited someday.
|
* This will probably have to be revisited someday.
|
||||||
|
*
|
||||||
|
* 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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
@ -78,6 +82,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
@ -182,11 +196,17 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#if defined(USE_SERIALDRIVER)
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
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();
|
lowconsole_init();
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/hc/src/common/up_initialize.c
|
* arch/hc/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -149,11 +149,17 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#if defined(USE_SERIALDRIVER)
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
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();
|
lowconsole_init();
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/hc/src/common/up_internal.h
|
* arch/hc/src/common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -62,7 +62,10 @@
|
|||||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
||||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
#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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -83,6 +86,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -151,11 +151,17 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#if defined(USE_SERIALDRIVER)
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
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();
|
lowconsole_init();
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
|
@ -60,7 +60,10 @@
|
|||||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
||||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
#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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -81,6 +84,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/common/up_initialize.c
|
* arch/sh/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010, 2012-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -136,16 +136,20 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver. NOTE that the naming
|
/* Initialize the serial device driver */
|
||||||
* implies that the console is a serial driver. That is usually the case,
|
|
||||||
* however, if no UARTs are enabled, the console could als be provided
|
#ifdef USE_SERIALDRIVER
|
||||||
* through some other device, such as an LCD. Architecture-specific logic
|
up_serialinit();
|
||||||
* will have to detect that case.
|
#endif
|
||||||
|
|
||||||
|
/* Initialize the console device driver (if it is other than the standard
|
||||||
|
* serial driver). NOTE that the naming implies that the console is a serial
|
||||||
|
* driver. That is usually the case, however, if no UARTs are enabled, the
|
||||||
|
* console could als be provided through some other device, such as an LCD.
|
||||||
|
* Architecture-specific logic will have to detect that case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(USE_SERIALDRIVER)
|
#if defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
up_consoleinit();
|
|
||||||
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/common/up_internal.h
|
* arch/sh/src/common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2012-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -67,6 +67,9 @@
|
|||||||
* however, if no UARTs are enabled, the console could als be provided
|
* however, if no UARTs are enabled, the console could als be provided
|
||||||
* through some other device, such as an LCD. Architecture-specific logic
|
* through some other device, such as an LCD. Architecture-specific logic
|
||||||
* will have to detect that case.
|
* will have to detect that case.
|
||||||
|
*
|
||||||
|
* 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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
@ -88,6 +91,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/x86/src/common/up_initialize.c
|
* arch/x86/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -151,11 +151,17 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#if defined(USE_SERIALDRIVER)
|
#ifdef USE_SERIALDRIVER
|
||||||
up_serialinit();
|
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();
|
lowconsole_init();
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/x86/src/common/up_internal.h
|
* arch/x86/src/common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -62,7 +62,10 @@
|
|||||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
||||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
#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
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -83,6 +86,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#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 */
|
/* Determine which device to use as the system logging device */
|
||||||
|
|
||||||
#ifndef CONFIG_SYSLOG
|
#ifndef CONFIG_SYSLOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_initialize.c
|
* common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -168,7 +168,9 @@ void up_initialize(void)
|
|||||||
up_serialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver */
|
/* Initialize the console device driver (if it is other than the standard
|
||||||
|
* serial driver).
|
||||||
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_DEV_LOWCONSOLE)
|
#if defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_internal.h
|
* common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -60,15 +60,42 @@
|
|||||||
#undef CONFIG_Z16_LOWPUTC /* Support up_lowputc for debug */
|
#undef CONFIG_Z16_LOWPUTC /* Support up_lowputc for debug */
|
||||||
#undef CONFIG_Z16_LOWGETC /* support up_lowgetc for debug */
|
#undef CONFIG_Z16_LOWGETC /* support up_lowgetc for debug */
|
||||||
|
|
||||||
/* 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_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) || \
|
#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) || \
|
||||||
CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
|
CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
# define USE_LOWCONSOLE 1
|
# define USE_LOWCONSOLE 1
|
||||||
# define USE_LOWUARTINIT 1
|
# define USE_LOWUARTINIT 1
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
#elif !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
|
#else
|
||||||
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# else
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# 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
|
# define USE_SERIALDRIVER 1
|
||||||
# define USE_EARLYSERIALINIT 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Determine which device to use as the system logging device */
|
/* Determine which device to use as the system logging device */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/common/up_initialize.c
|
* arch/z80/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2012-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -161,15 +161,15 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the serial device driver */
|
||||||
|
|
||||||
#ifdef USE_LOWSERIALINIT
|
#ifdef USE_SERIALDRIVER
|
||||||
up_lowserialinit();
|
up_serialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the console device driver */
|
/* Initialize the console device driver (if it is other than the standard
|
||||||
|
* serial driver).
|
||||||
|
*/
|
||||||
|
|
||||||
#if defined(USE_SERIALDRIVER)
|
#if defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
up_serialinit();
|
|
||||||
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
|
@ -66,7 +66,10 @@
|
|||||||
* Definitions
|
* Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* 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 CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
|
#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
# undef USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
@ -75,9 +78,31 @@
|
|||||||
# else
|
# else
|
||||||
# undef USE_LOWSERIALINIT
|
# undef USE_LOWSERIALINIT
|
||||||
# endif
|
# endif
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
#elif !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_LOWSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
|
#else
|
||||||
|
# undef USE_LOWSERIALINIT
|
||||||
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# else
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# 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
|
# define USE_SERIALDRIVER 1
|
||||||
# undef USE_LOWSERIALINIT
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user