diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-04 17:59:16 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-04 17:59:16 +0000 |
commit | 876001162c43d26904d2ef2ac242e1267d3b5942 (patch) | |
tree | afdac7876afe410da2da74a542b22cec254bbedb /nuttx/arch/arm/src/lpc43xx/lpc43_gpio.h | |
parent | 6e63518d400fabf1531c9fb5445382951e3fbb02 (diff) | |
download | px4-nuttx-876001162c43d26904d2ef2ac242e1267d3b5942.tar.gz px4-nuttx-876001162c43d26904d2ef2ac242e1267d3b5942.tar.bz2 px4-nuttx-876001162c43d26904d2ef2ac242e1267d3b5942.zip |
Progress of LPC43xx build environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4904 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc43xx/lpc43_gpio.h')
-rw-r--r-- | nuttx/arch/arm/src/lpc43xx/lpc43_gpio.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_gpio.h b/nuttx/arch/arm/src/lpc43xx/lpc43_gpio.h index b3aa0c583..1ceb3f4f0 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_gpio.h +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_gpio.h @@ -41,6 +41,7 @@ ********************************************************************************************/ #include <nuttx/config.h> +#include <nuttx/irq.h> /* Include the chip capabilities and GPIO definitions file */ @@ -61,7 +62,7 @@ * 1111 1100 0000 0000 * 5432 1098 7654 3210 * ---- ---- ---- ---- - * Normal: .MM. .... PPPB BBBB + * Normal: .MMV .... PPPB BBBB * Interrupt: .MMG GPII PPPB BBBB */ @@ -83,6 +84,17 @@ #define GPIO_IS_INPUT(p) ((p) & GPIO_MODE_MASK) == GPIO_MODE_OUTPUT) #define GPIO_IS_INTERRUPT(p) ((p) & GPIO_MODE_MASK) == GPIO_MODE_INTERRUPT) +/* Initial value (for GPIO outputs only) + * + * 1111 1100 0000 0000 + * 5432 1098 7654 3210 + * ---- ---- ---- ---- + * ...V .... .... .... + */ + +#define GPIO_VALUE_ONE (1 << 12) /* Bit 12: 1=High */ +#define GPIO_VALUE_ZERO (0) /* Bit 12: 0=Low */ + /* Group Interrupt Selection (valid only for interrupt GPIO pins): * * 1111 1100 0000 0000 @@ -212,9 +224,17 @@ * Public Data ********************************************************************************************/ +#ifndef __ASSEMBLY__ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + /* Base addresses for each GPIO block */ -extern const uint32_t g_gpiobase[NUM_GPIO_PORTS]; +EXTERN const uint32_t g_gpiobase[NUM_GPIO_PORTS]; /******************************************************************************************** * Public Functions @@ -298,5 +318,6 @@ EXTERN int lpc43_dumpgpio(uint16_t gpiocfg, const char *msg); #if defined(__cplusplus) } #endif +#endif /* __ASSEMBLY__ */ #endif /* __ARCH_ARM_SRC_LPC43XX_GPIO_H */ |