summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/src/at90usb/at90usb_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/avr/src/at90usb/at90usb_config.h')
-rw-r--r--nuttx/arch/avr/src/at90usb/at90usb_config.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/nuttx/arch/avr/src/at90usb/at90usb_config.h b/nuttx/arch/avr/src/at90usb/at90usb_config.h
index 0aa73053e..3f0d80a19 100644
--- a/nuttx/arch/avr/src/at90usb/at90usb_config.h
+++ b/nuttx/arch/avr/src/at90usb/at90usb_config.h
@@ -1,7 +1,7 @@
/************************************************************************************
* 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>
*
* Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,10 @@
# undef HAVE_SERIAL_CONSOLE
#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
# undef USE_SERIALDRIVER
@@ -87,6 +90,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