summaryrefslogtreecommitdiff
path: root/nuttx/arch/mips/src/pic32mx/pic32mx-config.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-10 16:52:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-10 16:52:14 +0000
commitff641f36093e5a01fed6f896ba0b6a1f7969144f (patch)
tree57dd0602747751bf88baaf02c9454fdd98c7d1fe /nuttx/arch/mips/src/pic32mx/pic32mx-config.h
parent6d7921dc5577dddfd1872c68d9236a6d7b61e12a (diff)
downloadnuttx-ff641f36093e5a01fed6f896ba0b6a1f7969144f.tar.gz
nuttx-ff641f36093e5a01fed6f896ba0b6a1f7969144f.tar.bz2
nuttx-ff641f36093e5a01fed6f896ba0b6a1f7969144f.zip
Adding support of PIC32MX5xx/6xx/7xx families
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4034 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/mips/src/pic32mx/pic32mx-config.h')
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-config.h76
1 files changed, 70 insertions, 6 deletions
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-config.h b/nuttx/arch/mips/src/pic32mx/pic32mx-config.h
index fcf4f3e5a..26b4bdbc7 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-config.h
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-config.h
@@ -2,7 +2,7 @@
* arch/mips/src/pic32mx/pic32mx-config.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * 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
@@ -500,34 +500,98 @@
/* UARTs ****************************************************************************/
/* Don't enable UARTs not supported by the chip. */
-#if CHIP_NEUARTS < 1
+#if CHIP_NUARTS < 1
# undef CONFIG_PIC32MX_UART1
# undef CONFIG_PIC32MX_UART2
-#endif
-#if CHIP_NEUARTS < 2
+# undef CONFIG_PIC32MX_UART3
+# undef CONFIG_PIC32MX_UART4
+# undef CONFIG_PIC32MX_UART5
+# undef CONFIG_PIC32MX_UART6
+#elif CHIP_NUARTS < 2
# undef CONFIG_PIC32MX_UART2
+# undef CONFIG_PIC32MX_UART3
+# undef CONFIG_PIC32MX_UART4
+# undef CONFIG_PIC32MX_UART5
+# undef CONFIG_PIC32MX_UART6
+#elif CHIP_NUARTS < 3
+# undef CONFIG_PIC32MX_UART3
+# undef CONFIG_PIC32MX_UART4
+# undef CONFIG_PIC32MX_UART5
+# undef CONFIG_PIC32MX_UART6
+#elif CHIP_NUARTS < 4
+# undef CONFIG_PIC32MX_UART4
+# undef CONFIG_PIC32MX_UART5
+# undef CONFIG_PIC32MX_UART6
+#elif CHIP_NUARTS < 5
+# undef CONFIG_PIC32MX_UART5
+# undef CONFIG_PIC32MX_UART6
+#elif CHIP_NUARTS < 6
+# undef CONFIG_PIC32MX_UART6
#endif
/* Are any UARTs enabled? */
#undef HAVE_UART_DEVICE
-#if defined(CONFIG_PIC32MX_UART1) || defined(CONFIG_PIC32MX_UART2)
+#if defined(CONFIG_PIC32MX_UART1) || defined(CONFIG_PIC32MX_UART2) || \
+ defined(CONFIG_PIC32MX_UART4) || defined(CONFIG_PIC32MX_UART4) || \
+ defined(CONFIG_PIC32MX_UART5) || defined(CONFIG_PIC32MX_UART6)
# define HAVE_UART_DEVICE 1
#endif
/* Is there a serial console? There should be at most one defined. It
- * could be on any UARTn, n=0,1
+ * could be on any UARTn, n=1,.. CHIP_NUARTS
*/
#if defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_PIC32MX_UART1)
# undef CONFIG_UART2_SERIAL_CONSOLE
+# undef CONFIG_UART3_SERIAL_CONSOLE
+# undef CONFIG_UART4_SERIAL_CONSOLE
+# undef CONFIG_UART5_SERIAL_CONSOLE
+# undef CONFIG_UART6_SERIAL_CONSOLE
# define HAVE_SERIAL_CONSOLE 1
#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_PIC32MX_UART2)
# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_UART2_SERIAL_CONSOLE
+# undef CONFIG_UART3_SERIAL_CONSOLE
+# undef CONFIG_UART4_SERIAL_CONSOLE
+# undef CONFIG_UART5_SERIAL_CONSOLE
+# undef CONFIG_UART6_SERIAL_CONSOLE
+# define HAVE_SERIAL_CONSOLE 1
+#elif defined(CONFIG_UART3_SERIAL_CONSOLE) && defined(CONFIG_PIC32MX_UART3)
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_UART2_SERIAL_CONSOLE
+# undef CONFIG_UART4_SERIAL_CONSOLE
+# undef CONFIG_UART5_SERIAL_CONSOLE
+# undef CONFIG_UART6_SERIAL_CONSOLE
+# define HAVE_SERIAL_CONSOLE 1
+#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && defined(CONFIG_PIC32MX_UART4)
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_UART2_SERIAL_CONSOLE
+# undef CONFIG_UART3_SERIAL_CONSOLE
+# undef CONFIG_UART5_SERIAL_CONSOLE
+# undef CONFIG_UART6_SERIAL_CONSOLE
+# define HAVE_SERIAL_CONSOLE 1
+#elif defined(CONFIG_UART5_SERIAL_CONSOLE) && defined(CONFIG_PIC32MX_UART5)
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_UART2_SERIAL_CONSOLE
+# undef CONFIG_UART3_SERIAL_CONSOLE
+# undef CONFIG_UART4_SERIAL_CONSOLE
+# undef CONFIG_UART6_SERIAL_CONSOLE
+# define HAVE_SERIAL_CONSOLE 1
+#elif defined(CONFIG_UART6_SERIAL_CONSOLE) && defined(CONFIG_PIC32MX_UART6)
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_UART2_SERIAL_CONSOLE
+# undef CONFIG_UART3_SERIAL_CONSOLE
+# undef CONFIG_UART4_SERIAL_CONSOLE
+# undef CONFIG_UART5_SERIAL_CONSOLE
# define HAVE_SERIAL_CONSOLE 1
#else
# undef CONFIG_UART1_SERIAL_CONSOLE
# undef CONFIG_UART2_SERIAL_CONSOLE
+# undef CONFIG_UART3_SERIAL_CONSOLE
+# undef CONFIG_UART4_SERIAL_CONSOLE
+# undef CONFIG_UART5_SERIAL_CONSOLE
+# undef CONFIG_UART6_SERIAL_CONSOLE
# undef HAVE_SERIAL_CONSOLE
#endif