Fix float PINMODE case

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2836 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-08-10 04:08:40 +00:00
parent 057f48581f
commit f0d5de9049
3 changed files with 8 additions and 8 deletions

View File

@ -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;
}

View File

@ -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)

View File

@ -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 */