diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-04-08 18:35:51 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-04-08 18:35:51 -0600 |
commit | 06f824b36d8f1accc00cd66cb06697a9fe25b0b2 (patch) | |
tree | 393a0552778a3fe9af7ba0ee0d82021edb75f133 /nuttx/arch/arm/src/lpc17xx/lpc178x_gpio.c | |
parent | 35c1e939e6378761a187a4aff65e7e6e4e51bc90 (diff) | |
download | px4-nuttx-06f824b36d8f1accc00cd66cb06697a9fe25b0b2.tar.gz px4-nuttx-06f824b36d8f1accc00cd66cb06697a9fe25b0b2.tar.bz2 px4-nuttx-06f824b36d8f1accc00cd66cb06697a9fe25b0b2.zip |
LPC1788 framebuffer LCD now works! From Rommel Marcelo
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc178x_gpio.c')
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc178x_gpio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc178x_gpio.c b/nuttx/arch/arm/src/lpc17xx/lpc178x_gpio.c index 2e72d7a22..11a22bed5 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc178x_gpio.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc178x_gpio.c @@ -132,7 +132,6 @@ const uint32_t g_intbase[GPIO_NPORTS] = * ****************************************************************************/ -#if 0 /* Not used */ static uint32_t lpc17_getioconmask(unsigned int port, unsigned int pin) { uint32_t typemask = IOCON_TYPE_D_MASK; @@ -207,7 +206,7 @@ static uint32_t lpc17_getioconmask(unsigned int port, unsigned int pin) return typemask; } -#endif + /**************************************************************************** * Name: lpc17_seti2cmode @@ -242,12 +241,15 @@ static void lpc17_setpinfunction(unsigned int port, unsigned int pin, { uint32_t regaddr; uint32_t regval; + uint32_t typemask; + typemask= lpc17_getioconmask(port,pin); regaddr = LPC17_IOCON_P(port, pin); regval = getreg32(regaddr); regval &= ~IOCON_FUNC_MASK; regval |= ((value << IOCON_FUNC_SHIFT) & IOCON_FUNC_MASK); + regval &= typemask; putreg32(regval, regaddr); } @@ -774,6 +776,10 @@ static int lpc17_configalternate(lpc17_pinset_t cfgset, unsigned int port, lpc17_setopendrain(port, pin); } + /* Set output slew rate */ + + lpc17_setslewmode(cfgset, port, pin); + /* Select the alternate pin */ lpc17_setpinfunction(port, pin, alt); |