From 7a3cc22417acd35b3812255d467709373a179608 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 8 Apr 2013 18:58:50 -0600 Subject: [PATCH] Back out the LPC1788 GPIO typemask logic that was just checked in. This is not necessary --- arch/arm/src/lpc17xx/lpc178x_gpio.c | 6 ++---- arch/arm/src/lpc17xx/lpc17_lcd.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc178x_gpio.c b/arch/arm/src/lpc17xx/lpc178x_gpio.c index 11a22bed58..19e70ee7ba 100755 --- a/arch/arm/src/lpc17xx/lpc178x_gpio.c +++ b/arch/arm/src/lpc17xx/lpc178x_gpio.c @@ -132,6 +132,7 @@ 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; @@ -206,7 +207,7 @@ static uint32_t lpc17_getioconmask(unsigned int port, unsigned int pin) return typemask; } - +#endif /**************************************************************************** * Name: lpc17_seti2cmode @@ -241,15 +242,12 @@ 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); } diff --git a/arch/arm/src/lpc17xx/lpc17_lcd.c b/arch/arm/src/lpc17xx/lpc17_lcd.c index 4050356e46..4c479b3636 100644 --- a/arch/arm/src/lpc17xx/lpc17_lcd.c +++ b/arch/arm/src/lpc17xx/lpc17_lcd.c @@ -569,7 +569,7 @@ int up_fbinitialize(void) regval |= LCD_CTRL_LCDTFT; #endif - /* Swap red and blue */ + /* Swap red and blue. The colors will be 0x00RRGGBB, not 0x00BBGGRR. */ regval |= LCD_CTRL_BGR;