summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/include/tiva/irq.h
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-12-18 15:19:16 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-12-18 15:19:16 -0600
commit80c255f609d67004c15cad2ad1cca77b7fdf26a7 (patch)
tree297833a096c2f8d1593cb4e060b2bc45ded2ba28 /nuttx/arch/arm/include/tiva/irq.h
parent7bcedfcedce874b1863bbc1cdceaae33eca7ba35 (diff)
downloadnuttx-80c255f609d67004c15cad2ad1cca77b7fdf26a7.tar.gz
nuttx-80c255f609d67004c15cad2ad1cca77b7fdf26a7.tar.bz2
nuttx-80c255f609d67004c15cad2ad1cca77b7fdf26a7.zip
Tiva: Change negative logic CONFIG_TIVA_DISABLE_GPIOx_IRQS to positive logic CONFIG_TIVA_GPIOx_IRQS
Diffstat (limited to 'nuttx/arch/arm/include/tiva/irq.h')
-rw-r--r--nuttx/arch/arm/include/tiva/irq.h191
1 files changed, 101 insertions, 90 deletions
diff --git a/nuttx/arch/arm/include/tiva/irq.h b/nuttx/arch/arm/include/tiva/irq.h
index a6add0e74..f3764eb3c 100644
--- a/nuttx/arch/arm/include/tiva/irq.h
+++ b/nuttx/arch/arm/include/tiva/irq.h
@@ -47,82 +47,93 @@
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
-/* The TM4C123x and TM4C129x support interrupts only on port P and Q */
-
-#if defined(CONFIG_ARCH_CHIP_TM4C)
-# undef CONFIG_TIVA_DISABLE_GPIOA_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOB_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOC_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOD_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOE_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOF_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOG_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOH_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOJ_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOK_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOL_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOM_IRQS
-# undef CONFIG_TIVA_DISABLE_GPION_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOR_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOS_IRQS
-# undef CONFIG_TIVA_DISABLE_GPIOT_IRQS
-
-# define CONFIG_TIVA_DISABLE_GPIOA_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOB_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOC_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOD_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOE_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOF_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOG_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOH_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOJ_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOK_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOL_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOM_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPION_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOR_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOS_IRQS 1
-# define CONFIG_TIVA_DISABLE_GPIOT_IRQS 1
+#if defined(CONFIG_ARCH_CHIP_LM3S) || defined(CONFIG_ARCH_CHIP_LM4F) || \
+ defined(CONFIG_ARCH_CHIP_CC3200)
+
+ /* I don't believe that any of these families support interrupts on port J. Many
+ * do not support interrupts on port H either.
+ */
+
+# undef CONFIG_TIVA_GPIOJ_IRQS
+
+#elif defined(CONFIG_ARCH_CHIP_TM4C)
+
+/* The TM4C123x and TM4C129x support interrupts only on ports P and Q. */
+
+# undef CONFIG_TIVA_GPIOA_IRQS
+# undef CONFIG_TIVA_GPIOB_IRQS
+# undef CONFIG_TIVA_GPIOC_IRQS
+# undef CONFIG_TIVA_GPIOD_IRQS
+# undef CONFIG_TIVA_GPIOE_IRQS
+# undef CONFIG_TIVA_GPIOF_IRQS
+# undef CONFIG_TIVA_GPIOG_IRQS
+# undef CONFIG_TIVA_GPIOH_IRQS
+# undef CONFIG_TIVA_GPIOJ_IRQS
+# undef CONFIG_TIVA_GPIOK_IRQS
+# undef CONFIG_TIVA_GPIOL_IRQS
+# undef CONFIG_TIVA_GPIOM_IRQS
+# undef CONFIG_TIVA_GPION_IRQS
+# undef CONFIG_TIVA_GPIOR_IRQS
+# undef CONFIG_TIVA_GPIOS_IRQS
+# undef CONFIG_TIVA_GPIOT_IRQS
+
#endif
/* Mark GPIO interrupts as disabled for non-existent GPIO ports. */
-#if TIVA_NPORTS < 1 && !defined(CONFIG_TIVA_DISABLE_GPIOA_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOA_IRQS
-#elif TIVA_NPORTS < 2 && !defined(CONFIG_TIVA_DISABLE_GPIOB_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOB_IRQS
-#elif TIVA_NPORTS < 3 && !defined(CONFIG_TIVA_DISABLE_GPIOC_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOC_IRQS
-#elif TIVA_NPORTS < 4 && !defined(CONFIG_TIVA_DISABLE_GPIOD_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOD_IRQS
-#elif TIVA_NPORTS < 5 && !defined(CONFIG_TIVA_DISABLE_GPIOE_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOE_IRQS
-#elif TIVA_NPORTS < 6 && !defined(CONFIG_TIVA_DISABLE_GPIOF_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOF_IRQS
-#elif TIVA_NPORTS < 7 && !defined(CONFIG_TIVA_DISABLE_GPIOG_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOG_IRQS
-#elif TIVA_NPORTS < 8 && !defined(CONFIG_TIVA_DISABLE_GPIOH_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOH_IRQS
-#elif TIVA_NPORTS < 9 && !defined(CONFIG_TIVA_DISABLE_GPIOJ_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOJ_IRQS
-#elif TIVA_NPORTS < 10 && !defined(CONFIG_TIVA_DISABLE_GPIOK_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOK_IRQS
-#elif TIVA_NPORTS < 11 && !defined(CONFIG_TIVA_DISABLE_GPIOL_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOL_IRQS
-#elif TIVA_NPORTS < 12 && !defined(CONFIG_TIVA_DISABLE_GPIOM_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOM_IRQS
-#elif TIVA_NPORTS < 13 && !defined(CONFIG_TIVA_DISABLE_GPION_IRQS)
-# define CONFIG_TIVA_DISABLE_GPION_IRQS
-#elif TIVA_NPORTS < 14 && !defined(CONFIG_TIVA_DISABLE_GPIOP_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOP_IRQS
-#elif TIVA_NPORTS < 15 && !defined(CONFIG_TIVA_DISABLE_GPIOQ_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOQ_IRQS
-#elif TIVA_NPORTS < 16 && !defined(CONFIG_TIVA_DISABLE_GPIOQ_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOQ_IRQS
-#elif TIVA_NPORTS < 17 && !defined(CONFIG_TIVA_DISABLE_GPIOQ_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOQ_IRQS
-#elif TIVA_NPORTS < 18 && !defined(CONFIG_TIVA_DISABLE_GPIOQ_IRQS)
-# define CONFIG_TIVA_DISABLE_GPIOQ_IRQS
+#if TIVA_NPORTS < 1
+# undef CONFIG_TIVA_GPIOA_IRQS
+#endif
+#if TIVA_NPORTS < 2
+# undef CONFIG_TIVA_GPIOB_IRQS
+#endif
+#if TIVA_NPORTS < 3
+# undef CONFIG_TIVA_GPIOC_IRQS
+#endif
+#if TIVA_NPORTS < 4
+# undef CONFIG_TIVA_GPIOD_IRQS
+#endif
+#if TIVA_NPORTS < 5
+# undef CONFIG_TIVA_GPIOE_IRQS
+#endif
+#if TIVA_NPORTS < 6
+# undef CONFIG_TIVA_GPIOF_IRQS
+#endif
+#if TIVA_NPORTS < 7
+# undef CONFIG_TIVA_GPIOG_IRQS
+#endif
+#if TIVA_NPORTS < 8
+# undef CONFIG_TIVA_GPIOH_IRQS
+#endif
+#if TIVA_NPORTS < 9
+# undef CONFIG_TIVA_GPIOJ_IRQS
+#endif
+#if TIVA_NPORTS < 10
+# undef CONFIG_TIVA_GPIOK_IRQS
+#endif
+#if TIVA_NPORTS < 11
+# undef CONFIG_TIVA_GPIOL_IRQS
+#endif
+#if TIVA_NPORTS < 12
+# undef CONFIG_TIVA_GPIOM_IRQS
+#endif
+#if TIVA_NPORTS < 13
+# undef CONFIG_TIVA_GPION_IRQS
+#endif
+#if TIVA_NPORTS < 14
+# undef CONFIG_TIVA_GPIOP_IRQS
+#endif
+#if TIVA_NPORTS < 15
+# undef CONFIG_TIVA_GPIOQ_IRQS
+#endif
+#if TIVA_NPORTS < 16
+# undef CONFIG_TIVA_GPIOQ_IRQS
+#endif
+#if TIVA_NPORTS < 17
+# undef CONFIG_TIVA_GPIOQ_IRQS
+#endif
+#if TIVA_NPORTS < 18
+# undef CONFIG_TIVA_GPIOQ_IRQS
#endif
/* Processor Exceptions (vectors 0-15) */
@@ -159,7 +170,7 @@
* be disabled in order to reduce the size of the implementation.
*/
-#if !defined(CONFIG_TIVA_DISABLE_GPIOA_IRQS)
+#if defined(CONFIG_TIVA_GPIOA_IRQS)
# define TIVA_IRQ_GPIOA_0 (NR_IRQS + 0)
# define TIVA_IRQ_GPIOA_1 (NR_IRQS + 1)
# define TIVA_IRQ_GPIOA_2 (NR_IRQS + 2)
@@ -173,7 +184,7 @@
# define _NGPIOAIRQS NR_IRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOB_IRQS)
+#if defined(CONFIG_TIVA_GPIOB_IRQS)
# define TIVA_IRQ_GPIOB_0 (_NGPIOAIRQS + 0)
# define TIVA_IRQ_GPIOB_1 (_NGPIOAIRQS + 1)
# define TIVA_IRQ_GPIOB_2 (_NGPIOAIRQS + 2)
@@ -187,7 +198,7 @@
# define _NGPIOBIRQS _NGPIOAIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOC_IRQS)
+#if defined(CONFIG_TIVA_GPIOC_IRQS)
# define TIVA_IRQ_GPIOC_0 (_NGPIOBIRQS + 0)
# define TIVA_IRQ_GPIOC_1 (_NGPIOBIRQS + 1)
# define TIVA_IRQ_GPIOC_2 (_NGPIOBIRQS + 2)
@@ -201,7 +212,7 @@
# define _NGPIOCIRQS _NGPIOBIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOD_IRQS)
+#if defined(CONFIG_TIVA_GPIOD_IRQS)
# define TIVA_IRQ_GPIOD_0 (_NGPIOCIRQS + 0)
# define TIVA_IRQ_GPIOD_1 (_NGPIOCIRQS + 1)
# define TIVA_IRQ_GPIOD_2 (_NGPIOCIRQS + 2)
@@ -215,7 +226,7 @@
# define _NGPIODIRQS _NGPIOCIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOE_IRQS)
+#if defined(CONFIG_TIVA_GPIOE_IRQS)
# define TIVA_IRQ_GPIOE_0 (_NGPIODIRQS + 0)
# define TIVA_IRQ_GPIOE_1 (_NGPIODIRQS + 1)
# define TIVA_IRQ_GPIOE_2 (_NGPIODIRQS + 2)
@@ -229,7 +240,7 @@
# define _NGPIOEIRQS _NGPIODIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOF_IRQS)
+#if defined(CONFIG_TIVA_GPIOF_IRQS)
# define TIVA_IRQ_GPIOF_0 (_NGPIOEIRQS + 0)
# define TIVA_IRQ_GPIOF_1 (_NGPIOEIRQS + 1)
# define TIVA_IRQ_GPIOF_2 (_NGPIOEIRQS + 2)
@@ -243,7 +254,7 @@
# define _NGPIOFIRQS _NGPIOEIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOG_IRQS)
+#if defined(CONFIG_TIVA_GPIOG_IRQS)
# define TIVA_IRQ_GPIOG_0 (_NGPIOFIRQS + 0)
# define TIVA_IRQ_GPIOG_1 (_NGPIOFIRQS + 1)
# define TIVA_IRQ_GPIOG_2 (_NGPIOFIRQS + 2)
@@ -257,7 +268,7 @@
# define _NGPIOGIRQS _NGPIOFIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOH_IRQS)
+#if defined(CONFIG_TIVA_GPIOH_IRQS)
# define TIVA_IRQ_GPIOH_0 (_NGPIOGIRQS + 0)
# define TIVA_IRQ_GPIOH_1 (_NGPIOGIRQS + 1)
# define TIVA_IRQ_GPIOH_2 (_NGPIOGIRQS + 2)
@@ -271,7 +282,7 @@
# define _NGPIOHIRQS _NGPIOGIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOJ_IRQS)
+#if defined(CONFIG_TIVA_GPIOJ_IRQS)
# define TIVA_IRQ_GPIOJ_0 (_NGPIOHIRQS + 0)
# define TIVA_IRQ_GPIOJ_1 (_NGPIOHIRQS + 1)
# define TIVA_IRQ_GPIOJ_2 (_NGPIOHIRQS + 2)
@@ -285,7 +296,7 @@
# define _NGPIOJIRQS _NGPIOHIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOK_IRQS)
+#if defined(CONFIG_TIVA_GPIOK_IRQS)
# define TIVA_IRQ_GPIOK_0 (_NGPIOJIRQS + 0)
# define TIVA_IRQ_GPIOK_1 (_NGPIOJIRQS + 1)
# define TIVA_IRQ_GPIOK_2 (_NGPIOJIRQS + 2)
@@ -299,7 +310,7 @@
# define _NGPIOKIRQS _NGPIOJIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOL_IRQS)
+#if defined(CONFIG_TIVA_GPIOL_IRQS)
# define TIVA_IRQ_GPIOL_0 (_NGPIOKIRQS + 0)
# define TIVA_IRQ_GPIOL_1 (_NGPIOKIRQS + 1)
# define TIVA_IRQ_GPIOL_2 (_NGPIOKIRQS + 2)
@@ -313,7 +324,7 @@
# define _NGPIOLIRQS _NGPIOKIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOM_IRQS)
+#if defined(CONFIG_TIVA_GPIOM_IRQS)
# define TIVA_IRQ_GPIOM_0 (_NGPIOLIRQS + 0)
# define TIVA_IRQ_GPIOM_1 (_NGPIOLIRQS + 1)
# define TIVA_IRQ_GPIOM_2 (_NGPIOLIRQS + 2)
@@ -327,7 +338,7 @@
# define _NGPIOMIRQS _NGPIOLIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPION_IRQS)
+#if defined(CONFIG_TIVA_GPION_IRQS)
# define TIVA_IRQ_GPION_0 (_NGPIOMIRQS + 0)
# define TIVA_IRQ_GPION_1 (_NGPIOMIRQS + 1)
# define TIVA_IRQ_GPION_2 (_NGPIOMIRQS + 2)
@@ -341,7 +352,7 @@
# define _NGPIONIRQS _NGPIOMIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOP_IRQS)
+#if defined(CONFIG_TIVA_GPIOP_IRQS)
# define TIVA_IRQ_GPIOP_0 (_NGPIONIRQS + 0)
# define TIVA_IRQ_GPIOP_1 (_NGPIONIRQS + 1)
# define TIVA_IRQ_GPIOP_2 (_NGPIONIRQS + 2)
@@ -355,7 +366,7 @@
# define _NGPIOPIRQS _NGPIONIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOQ_IRQS)
+#if defined(CONFIG_TIVA_GPIOQ_IRQS)
# define TIVA_IRQ_GPIOQ_0 (_NGPIOPIRQS + 0)
# define TIVA_IRQ_GPIOQ_1 (_NGPIOPIRQS + 1)
# define TIVA_IRQ_GPIOQ_2 (_NGPIOPIRQS + 2)
@@ -369,7 +380,7 @@
# define _NGPIOQIRQS _NGPIOPIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOR_IRQS)
+#if defined(CONFIG_TIVA_GPIOR_IRQS)
# define TIVA_IRQ_GPIOR_0 (_NGPIOQIRQS + 0)
# define TIVA_IRQ_GPIOR_1 (_NGPIOQIRQS + 1)
# define TIVA_IRQ_GPIOR_2 (_NGPIOQIRQS + 2)
@@ -383,7 +394,7 @@
# define _NGPIORIRQS _NGPIOQIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOS_IRQS)
+#if defined(CONFIG_TIVA_GPIOS_IRQS)
# define TIVA_IRQ_GPIOS_0 (_NGPIORIRQS + 0)
# define TIVA_IRQ_GPIOS_1 (_NGPIORIRQS + 1)
# define TIVA_IRQ_GPIOS_2 (_NGPIORIRQS + 2)
@@ -397,7 +408,7 @@
# define _NGPIOSIRQS _NGPIORIRQS
#endif
-#if !defined(CONFIG_TIVA_DISABLE_GPIOT_IRQS)
+#if defined(CONFIG_TIVA_GPIOT_IRQS)
# define TIVA_IRQ_GPIOT_0 (_NGPIOSIRQS + 0)
# define TIVA_IRQ_GPIOT_1 (_NGPIOSIRQS + 1)
# define TIVA_IRQ_GPIOT_2 (_NGPIOSIRQS + 2)