From 9ccd158477c9ee5581dc047940f92a3cfac631ce Mon Sep 17 00:00:00 2001
From: patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>
Date: Sat, 15 May 2010 23:03:17 +0000
Subject: [PATCH] more oled fixes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2677 42af7a65-404d-4744-a932-0658087f49c3
---
 arch/arm/src/lm3s/lm3s_gpio.c                 | 2 +-
 configs/lm3s6965-ek/README.txt                | 4 ++++
 configs/lm3s6965-ek/src/lm3s6965ek_internal.h | 2 +-
 drivers/lcd/p14201.c                          | 4 ++--
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/lm3s/lm3s_gpio.c b/arch/arm/src/lm3s/lm3s_gpio.c
index 1c792e888b..305103143a 100644
--- a/arch/arm/src/lm3s/lm3s_gpio.c
+++ b/arch/arm/src/lm3s/lm3s_gpio.c
@@ -727,7 +727,7 @@ int lm3s_configgpio(uint32_t cfgset)
   putreg32(regval, LM3S_SYSCON_RCGC2);
 
   /* First, set the port to digital input.  This is the safest state in which
-   * to perform reconfiguation.
+   * to perform reconfiguration.
    */
 
   lm3s_gpiofunc(base, pinno, &g_funcbits[0]);
diff --git a/configs/lm3s6965-ek/README.txt b/configs/lm3s6965-ek/README.txt
index 24a9ab099e..a29e27cd7f 100755
--- a/configs/lm3s6965-ek/README.txt
+++ b/configs/lm3s6965-ek/README.txt
@@ -97,6 +97,10 @@ OLED
   - PC7: OLED display data/control select (D/Cn)
   - PA3: OLED display chip select (CSn)
 
+  NOTE:  Newer versions of the LM3S6965 Evaluation Kit has an OSAM 128x64x4 OLED
+  display.  Some tweaks to drivers/lcd/p14201.c would be required to support that
+  LCD.
+
 Development Environment
 ^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/configs/lm3s6965-ek/src/lm3s6965ek_internal.h b/configs/lm3s6965-ek/src/lm3s6965ek_internal.h
index 2b7514c21e..c0ddfa6d96 100755
--- a/configs/lm3s6965-ek/src/lm3s6965ek_internal.h
+++ b/configs/lm3s6965-ek/src/lm3s6965ek_internal.h
@@ -105,7 +105,7 @@
  *  - PA3: OLED display chip select (CSn)
  */
 
-#define OLEDDC_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \
+#define OLEDDC_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STD | GPIO_STRENGTH_8MA | \
                      GPIO_VALUE_ONE | GPIO_PORTC | 7)
 #define OLEDCS_GPIO (GPIO_FUNC_OUTPUT | GPIO_PADTYPE_STDWPU | GPIO_STRENGTH_4MA | \
                      GPIO_VALUE_ONE | GPIO_PORTA | 3)
diff --git a/drivers/lcd/p14201.c b/drivers/lcd/p14201.c
index d3ea175761..a8bb347a91 100755
--- a/drivers/lcd/p14201.c
+++ b/drivers/lcd/p14201.c
@@ -407,14 +407,14 @@ static const uint8_t g_setallcol[] =
 {
   SSD1329_SET_COLADDR,
   0,
-  RIT_YRES-1
+  (RIT_XRES/2)-1
 };
 
 static const uint8_t g_setallrow[] =
 {
   SSD1329_SET_ROWADDR,
   0,
-  RIT_XRES-1
+  RIT_YRES-1
 };
 
 /**************************************************************************************
-- 
GitLab