summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-26 19:41:54 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-26 19:41:54 +0000
commitc747e2953e1d1c6db1e159ecc5554773d83557ed (patch)
tree79974698ecda117d5294c221d9c8790934b564f5 /nuttx/drivers
parentb55eb97656c92bbb5f7bce796de5084cbbc890c7 (diff)
downloadpx4-nuttx-c747e2953e1d1c6db1e159ecc5554773d83557ed.tar.gz
px4-nuttx-c747e2953e1d1c6db1e159ecc5554773d83557ed.tar.bz2
px4-nuttx-c747e2953e1d1c6db1e159ecc5554773d83557ed.zip
Shenzhou board has an SSD1289 LCD, not ILI93xx
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5194 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/lcd/Kconfig28
-rw-r--r--nuttx/drivers/lcd/ssd1289.c8
2 files changed, 33 insertions, 3 deletions
diff --git a/nuttx/drivers/lcd/Kconfig b/nuttx/drivers/lcd/Kconfig
index 851263d27..640239e63 100644
--- a/nuttx/drivers/lcd/Kconfig
+++ b/nuttx/drivers/lcd/Kconfig
@@ -43,6 +43,7 @@ config LCD_P14201
p14201.c. Driver for RiT P14201 series display with SD1329 IC
controller. This OLED is used with older versions of the
TI/Luminary LM3S8962 Evaluation Kit.
+
if LCD_P14201
config P14201_NINTERFACES
int "Number of physical P14201 devices"
@@ -189,6 +190,33 @@ config LCD_UG9664HSWAG01
Technology Inc. Used with the LPC Xpresso and Embedded Artists
base board.
+config LCD_SSD1289
+ bool "LCD Based on SSD1289 Controller"
+ default n
+ ---help---
+ Enables generic support for any LCD based on the Solomon Systech,
+ Ltd, SSD1289 Controller. Use of this driver will usually require so
+ detailed customization of the LCD initialization code as necessary
+ for the specific LCD driven by the SSD1289 controller.
+
+if LCD_SSD1289
+
+choice
+ prompt "SSD1289 Initialization Profile"
+ default SSD1289_PROFILE1
+
+config SSD1289_PROFILE1
+ bool "Profile 1"
+
+config SSD1289_PROFILE2
+ bool "Profile 2"
+
+config SSD1289_PROFILE3
+ bool "Profile 3"
+
+endchoice
+endif
+
choice
prompt "LCD Orientation"
default LCD_LANDSCAPE
diff --git a/nuttx/drivers/lcd/ssd1289.c b/nuttx/drivers/lcd/ssd1289.c
index 58c606968..3d5ba96d3 100644
--- a/nuttx/drivers/lcd/ssd1289.c
+++ b/nuttx/drivers/lcd/ssd1289.c
@@ -766,7 +766,7 @@ static int ssd1289_getvideoinfo(FAR struct lcd_dev_s *dev,
{
DEBUGASSERT(dev && vinfo);
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n",
- SSD1289_COLORFMT, SSD1289_XRES, SSD1289_XRES);
+ SSD1289_COLORFMT, SSD1289_XRES, SSD1289_YRES);
vinfo->fmt = SSD1289_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */
vinfo->xres = SSD1289_XRES; /* Horizontal resolution in pixel columns */
@@ -925,6 +925,7 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv)
#ifndef CONFIG_LCD_NOGETRUN
uint16_t id;
#endif
+ int ret;
/* Select the LCD */
@@ -1168,19 +1169,20 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv)
/* One driver has a 50 msec delay here */
/* up_mdelay(50); */
- return OK;
+ ret = OK;
}
#ifndef CONFIG_LCD_NOGETRUN
else
{
lcddbg("Unsupported LCD type\n");
- return -ENODEV;
+ ret = -ENODEV;
}
#endif
/* De-select the LCD */
lcd->deselect(lcd);
+ return ret;
}
/*************************************************************************************