Add UG-9665SWAG01 driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3520 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
9639d8ce53
commit
7deec65278
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user