From 7deec6527800efeec9149aedadfbd903a5104dca Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 17 Apr 2011 23:48:01 +0000 Subject: [PATCH] Add UG-9665SWAG01 driver git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3520 42af7a65-404d-4744-a932-0658087f49c3 --- configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h | 2 +- configs/lpcxpresso-lpc1768/src/up_oled.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h b/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h index d22161edc1..e79f4f62ae 100755 --- a/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h +++ b/configs/lpcxpresso-lpc1768/src/lpcxpresso_internal.h @@ -199,7 +199,7 @@ * ----------------------------+-------+-------------- ----------------------------- */ -#define LPCXPRESSO_OLED_POWER (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT2 | GPIO_PIN1) +#define LPCXPRESSO_OLED_POWER (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN1) #define LPCXPRESSO_OLED_CS (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT0 | GPIO_PIN6) #define LPCXPRESSO_OLED_DC (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN7) diff --git a/configs/lpcxpresso-lpc1768/src/up_oled.c b/configs/lpcxpresso-lpc1768/src/up_oled.c index 41ab01b821..a60984feac 100755 --- a/configs/lpcxpresso-lpc1768/src/up_oled.c +++ b/configs/lpcxpresso-lpc1768/src/up_oled.c @@ -140,6 +140,7 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno) /* And turn the OLED on (CONFIG_LCD_MAXPOWER should be 1) */ + (void)lpc17_gpiowrite(LPCXPRESSO_OLED_POWER, true); (void)dev->setpower(dev, CONFIG_LCD_MAXPOWER); return dev; } @@ -176,7 +177,7 @@ int lm3s_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) { /* Set GPIO to 1 for data, 0 for command */ - lm3s_gpiowrite(OLEDDC_GPIO, !cmd); + (void)lpc17_gpiowrite(LPCXPRESSO_OLED_DC, !cmd); return OK; } return -ENODEV;