summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-13 03:45:51 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-13 03:45:51 +0000
commitf39263af14175dd1414423d6c6d4fdf4f20461c8 (patch)
treec7119885c17b02835113a4fc83f433047fc0f014 /nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c
parentc3aabdfc763f00eace106a180c7f0c52cf7fc8d7 (diff)
downloadpx4-nuttx-f39263af14175dd1414423d6c6d4fdf4f20461c8.tar.gz
px4-nuttx-f39263af14175dd1414423d6c6d4fdf4f20461c8.tar.bz2
px4-nuttx-f39263af14175dd1414423d6c6d4fdf4f20461c8.zip
Fix limitation in number of GPIO ports that can be supported
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2846 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c')
-rw-r--r--nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c b/nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c
index 4165a4127..1165f6dec 100644
--- a/nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c
+++ b/nuttx/arch/arm/src/lm3s/lm3s_gpioirq.c
@@ -92,6 +92,13 @@ static const uint32_t g_gpiobase[] =
#ifndef CONFIG_LM3S_DISABLE_GPIOG_IRQS
LM3S_GPIOG_BASE,
#endif
+
+ /* NOTE: Not all LM3S architectures support GPIOs above GPIOG. If the chip
+ * does not support these higher ports, then they must be disabled in the
+ * configuration. Otherwise, the following will likely cause compilation
+ * errors!
+ */
+
#ifndef CONFIG_LM3S_DISABLE_GPIOH_IRQS
LM3S_GPIOH_BASE,
#endif
@@ -399,6 +406,7 @@ void gpio_irqdisable(int irq)
/* Get the base address of the GPIO module associated with this IRQ */
base = lm3s_gpiobaseaddress(gpioirq);
+ DEBUGASSERT(base != 0);
pin = (1 << (gpioirq & 7));
/* Disable the GPIO interrupt. "The GPIO IM register is the interrupt