summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/sam34/sam3u_gpio.h
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-06-13 18:53:14 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-06-13 18:53:14 -0600
commit619119787e7a5e1e04528f6bf4bf079fe4499ee7 (patch)
treeaf048106afd68c94926d8d90aee48bad75e9be6b /nuttx/arch/arm/src/sam34/sam3u_gpio.h
parentf89052fa018e2b4e3ae7aeea2f36aa3d08927956 (diff)
downloadpx4-nuttx-619119787e7a5e1e04528f6bf4bf079fe4499ee7.tar.gz
px4-nuttx-619119787e7a5e1e04528f6bf4bf079fe4499ee7.tar.bz2
px4-nuttx-619119787e7a5e1e04528f6bf4bf079fe4499ee7.zip
SAM3/4S GPIO interrupt changes
Diffstat (limited to 'nuttx/arch/arm/src/sam34/sam3u_gpio.h')
-rw-r--r--nuttx/arch/arm/src/sam34/sam3u_gpio.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/nuttx/arch/arm/src/sam34/sam3u_gpio.h b/nuttx/arch/arm/src/sam34/sam3u_gpio.h
index 84f543056..74716bb3a 100644
--- a/nuttx/arch/arm/src/sam34/sam3u_gpio.h
+++ b/nuttx/arch/arm/src/sam34/sam3u_gpio.h
@@ -56,7 +56,7 @@
/* 16-bit Encoding:
*
- * MMCC CII. VPPB BBBB
+ * MMCC CIII VPPB BBBB
*/
/* Input/Output mode:
@@ -85,17 +85,22 @@
/* Additional interrupt modes:
*
- * .... .II. .... ....
+ * .... .III .... ....
*/
-#define GPIO_INT_SHIFT (9) /* Bits 9-10: GPIO interrupt bits */
-#define GPIO_INT_MASK (3 << GPIO_INT_SHIFT)
-# define GPIO_INT_LEVEL (1 << 10) /* Bit 10: Level detection interrupt */
-# define GPIO_INT_EDGE (0) /* (vs. Edge detection interrupt) */
-# define GPIO_INT_HIGHLEVEL (1 << 9) /* Bit 9: High level detection interrupt */
-# define GPIO_INT_LOWLEVEL (0) /* (vs. Low level detection interrupt) */
-# define GPIO_INT_RISING (1 << 9) /* Bit 9: Rising edge detection interrupt */
-# define GPIO_INT_FALLING (0) /* (vs. Falling edge detection interrupt) */
+#define GPIO_INT_SHIFT (8) /* Bits 8-10: GPIO interrupt bits */
+#define GPIO_INT_MASK (7 << GPIO_INT_SHIFT)
+# define _GIO_INT_AIM (1 << 10) /* Bit 10: Additional Interrupt modes */
+# define _GPIO_INT_LEVEL (1 << 9) /* Bit 9: Level detection interrupt */
+# define _GPIO_INT_EDGE (0) /* (vs. Edge detection interrupt) */
+# define _GPIO_INT_RH (1 << 8) /* Bit 9: Rising edge/High level detection interrupt */
+# define _GPIO_INT_FL (0) /* (vs. Falling edge/Low level detection interrupt) */
+
+# define GPIO_INT_HIGHLEVEL (_GIO_INT_AIM | _GPIO_INT_LEVEL | _GPIO_INT_RH)
+# define GPIO_INT_LOWLEVEL (_GIO_INT_AIM | _GPIO_INT_LEVEL | _GPIO_INT_FL)
+# define GPIO_INT_RISING (_GIO_INT_AIM | _GPIO_INT_EDGE | _GPIO_INT_RH)
+# define GPIO_INT_FALLING (_GIO_INT_AIM | _GPIO_INT_EDGE | _GPIO_INT_FL)
+# define GPIO_INT_BOTHEDGES (0)
/* If the pin is an GPIO output, then this identifies the initial output value:
*