diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-08-10 04:08:40 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-08-10 04:08:40 +0000 |
commit | 51a8fb9bd76bf226a803b7216e17736bfc55e4f7 (patch) | |
tree | a73324440e69f3d14f24e1f32bd512203adb4e7a | |
parent | 4cd953017345f03caa640eb7f2c30f19b5ea3aa9 (diff) | |
download | px4-nuttx-51a8fb9bd76bf226a803b7216e17736bfc55e4f7.tar.gz px4-nuttx-51a8fb9bd76bf226a803b7216e17736bfc55e4f7.tar.bz2 px4-nuttx-51a8fb9bd76bf226a803b7216e17736bfc55e4f7.zip |
Fix float PINMODE case
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2836 42af7a65-404d-4744-a932-0658087f49c3
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c | 6 | ||||
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_internal.h | 4 | ||||
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c index 84fd5b4e6..0b526bd20 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c @@ -230,12 +230,12 @@ static int lpc17_pullup(uint16_t cfgset, unsigned int port, unsigned int pin) value = PINCONN_PINMODE_RM; break; - case GPIO_PUNONE: /* Neither pull-up nor -down */ - value = PINCONN_PINMODE_PD; + case GPIO_FLOAT: /* Neither pull-up nor -down */ + value = PINCONN_PINMODE_FLOAT; break; case GPIO_PULLDN: /* Pull-down resistor enabled */ - value = PINCONN_PINMODE_MASK; + value = PINCONN_PINMODE_PD; break; } diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_internal.h b/nuttx/arch/arm/src/lpc17xx/lpc17_internal.h index c22530d8c..819c13894 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_internal.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_internal.h @@ -106,7 +106,7 @@ #define GPIO_PUMODE_MASK (3 << GPIO_PUMODE_SHIFT) # define GPIO_PULLUP (0 << GPIO_PUMODE_SHIFT) /* Pull-up resistor enabled */ # define GPIO_REPEATER (1 << GPIO_PUMODE_SHIFT) /* Repeater mode enabled */ -# define GPIO_PUNONE (2 << GPIO_PUMODE_SHIFT) /* Neither pull-up nor -down */ +# define GPIO_FLOAT (2 << GPIO_PUMODE_SHIFT) /* Neither pull-up nor -down */ # define GPIO_PULLDN (3 << GPIO_PUMODE_SHIFT) /* Pull-down resistor enabled */ /* Open drain: O */ @@ -296,7 +296,7 @@ #define GPIO_MCPWM_MCOB2 (GPIO_ALT1 | GPIO_PULLUP | GPIO_PORT1 | GPIO_PIN29) #define GPIO_PCAP1p1 (GPIO_ALT2 | GPIO_PULLUP | GPIO_PORT1 | GPIO_PIN29) #define GPIO_MAT0p1_1 (GPIO_ALT3 | GPIO_PULLUP | GPIO_PORT1 | GPIO_PIN29) -#define GPIO_USB_VBUS (GPIO_ALT2 | GPIO_PUNONE | GPIO_PORT1 | GPIO_PIN30) +#define GPIO_USB_VBUS (GPIO_ALT2 | GPIO_FLOAT | GPIO_PORT1 | GPIO_PIN30) #define GPIO_AD0p4 (GPIO_ALT3 | GPIO_PULLUP | GPIO_PORT1 | GPIO_PIN30) #define GPIO_SSP1_SCK_2 (GPIO_ALT2 | GPIO_PULLUP | GPIO_PORT1 | GPIO_PIN31) #define GPIO_AD0p5 (GPIO_ALT3 | GPIO_PULLUP | GPIO_PORT1 | GPIO_PIN31) diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h b/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h index 3b3dbb837..e41bdb8de 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_pinconn.h @@ -314,9 +314,9 @@ /* Pin Mode select register 0 (PINMODE0: 0x4002c040) */
#define PINCONN_PINMODE_PU (0) /* 00: pin has a pull-up resistor enabled */
-#define PINCONN_PINMODE_RM (1) /* 00: pin has repeater mode enabled */
-#define PINCONN_PINMODE_NORMAL (2) /* 00: pin has neither pull-up nor pull-down */
-#define PINCONN_PINMODE_PD (3) /* 00: pin has a pull-down resistor enabled */
+#define PINCONN_PINMODE_RM (1) /* 01: pin has repeater mode enabled */
+#define PINCONN_PINMODE_FLOAT (2) /* 10: pin has neither pull-up nor pull-down */
+#define PINCONN_PINMODE_PD (3) /* 11: pin has a pull-down resistor enabled */
#define PINCONN_PINMODE_MASK (3)
#define PINCONN_PINMODEL_SHIFT(n) ((n) << 1) /* n=0,1,..,15 */
|