summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/src/atmega/atmega_config.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-08 21:10:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-08 21:10:47 +0000
commitfe2959c7e6d314cc44cf5472d20b8ac6d5806b51 (patch)
tree45399264e3dd854c8236e96a9930e40b3083ce28 /nuttx/arch/avr/src/atmega/atmega_config.h
parentc626aec4434149e17e4cd98174e59095a3a06e05 (diff)
downloadpx4-nuttx-fe2959c7e6d314cc44cf5472d20b8ac6d5806b51.tar.gz
px4-nuttx-fe2959c7e6d314cc44cf5472d20b8ac6d5806b51.tar.bz2
px4-nuttx-fe2959c7e6d314cc44cf5472d20b8ac6d5806b51.zip
More logic for the AVR port
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3684 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/src/atmega/atmega_config.h')
-rw-r--r--nuttx/arch/avr/src/atmega/atmega_config.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/nuttx/arch/avr/src/atmega/atmega_config.h b/nuttx/arch/avr/src/atmega/atmega_config.h
index 09b1c11d9..2cb483160 100644
--- a/nuttx/arch/avr/src/atmega/atmega_config.h
+++ b/nuttx/arch/avr/src/atmega/atmega_config.h
@@ -45,6 +45,28 @@
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
+/* USARTs ***************************************************************************/
+
+#undef HAVE_USART_DEVICE
+#if defined(CONFIG_AVR_USART0) || defined(CONFIG_AVR_USART0)
+# define HAVE_USART_DEVICE 1
+#endif
+
+/* Is there a serial console? There should be at most one defined. It
+ * could be on any USARTn, n=0,1
+ */
+
+#if defined(CONFIG_USART0_SERIAL_CONSOLE) && defined(CONFIG_AVR_USART0)
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# define HAVE_SERIAL_CONSOLE 1
+#elif defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_AVR_USART1)
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# define HAVE_SERIAL_CONSOLE 1
+#else
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef HAVE_SERIAL_CONSOLE
+#endif
/************************************************************************************
* Public Types