summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-07 01:40:39 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-07 01:40:39 +0000
commite74af6c45d89859148b79d3d48d918e66ae0e5f3 (patch)
tree991d292e975f164c6291c5b926056cd753f47fe4
parent789a796f848fb29e37a151f5f59d5ac0b931e6aa (diff)
downloadnuttx-e74af6c45d89859148b79d3d48d918e66ae0e5f3.tar.gz
nuttx-e74af6c45d89859148b79d3d48d918e66ae0e5f3.tar.bz2
nuttx-e74af6c45d89859148b79d3d48d918e66ae0e5f3.zip
Mostly cosmetic, partial fixes for STM3240G-EVAL LCD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4705 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--apps/examples/README.txt9
-rw-r--r--apps/examples/lcdrw/lcdrw_main.c7
-rw-r--r--nuttx/ChangeLog2
-rwxr-xr-xnuttx/configs/stm3240g-eval/README.txt15
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_lcd.c19
-rw-r--r--nuttx/drivers/input/stmpe11_temp.c4
6 files changed, 36 insertions, 20 deletions
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 06236180c..f11b92b51 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -464,9 +464,16 @@ examples/lcdrw
^^^^^^^^^^^^^^
This example may be used to verify if you can or cannot read data
- correct from an LCD interface. At present, this supports only LCDs
+ correctly from an LCD interface. At present, this supports only LCDs
with RGB565 color format.
+ * CONFIG_EXAMPLES_LDCRW_DEVNO
+ LCD device number. Default: 0
+ * CONFIG_EXAMPLES_LDCRW_XRES
+ LCD X resolution. Default: 240
+ * CONFIG_EXAMPLES_LDCRW_YRES
+ LCD Y resolution. Default: 320
+
examples/mm
^^^^^^^^^^^
diff --git a/apps/examples/lcdrw/lcdrw_main.c b/apps/examples/lcdrw/lcdrw_main.c
index 4b717666f..c366743f4 100644
--- a/apps/examples/lcdrw/lcdrw_main.c
+++ b/apps/examples/lcdrw/lcdrw_main.c
@@ -179,7 +179,7 @@ int MAIN_NAME(int argc, char *argv[])
exit(1);
}
- /* Then read each line from the LCD and write to the TIFF file */
+ /* Loop, writing all possible values to the LCD */
value = 0;
for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
@@ -214,10 +214,7 @@ int MAIN_NAME(int argc, char *argv[])
}
printf("---f\n");
- /* Then read each line back from the LCD (this would hook into
- * the TIFF file creation library *very* easily to create a
- * TIFF file of the returned values).
- */
+ /* Then read each line back from the LCD. */
offset = 0;
for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index e99c62a26..89d21bef4 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -2708,6 +2708,6 @@
position, not an offset.
* graphics/nxtk/nxtk_drawframe.c: Framed windows are now drawn in three
colors (instead of just two).
- * drivers/input/stmpe11_*: Beginning of a driver to support STMicro STMPE11
+ * drivers/input/stmpe11_*: Added a driver to support the STMicro STMPE11
IO Expander and touchscreen driver.
diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt
index 9c0cb5726..bf5959871 100755
--- a/nuttx/configs/stm3240g-eval/README.txt
+++ b/nuttx/configs/stm3240g-eval/README.txt
@@ -1081,6 +1081,21 @@ Where <subdir> is one of the following:
CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows
CONFIG_LCD_LANDSCAPE=y : 320x240 landscape
+ nxwm
+ ----
+ This is a special configuration setup for the NxWM window manager
+ UnitTest. The NxWM window manager can be found here:
+
+ trunk/NxWidgets/nxwm
+
+ The NxWM unit test can be found at:
+
+ trunk/NxWidgets/UnitTests/nxwm
+
+ Documentation for installing the NxWM unit test can be found here:
+
+ trunk/NxWidgets/UnitTests/READEM.txt
+
ostest:
------
This configuration directory, performs a simple OS test using
diff --git a/nuttx/configs/stm3240g-eval/src/up_lcd.c b/nuttx/configs/stm3240g-eval/src/up_lcd.c
index c24e6b0c3..c781e08dc 100644
--- a/nuttx/configs/stm3240g-eval/src/up_lcd.c
+++ b/nuttx/configs/stm3240g-eval/src/up_lcd.c
@@ -101,7 +101,7 @@
# error "Cannot define both rportrait and any other orientations"
# endif
#elif defined(CONFIG_LCD_LANDSCAPE)
-# ifdef defined(CONFIG_LCD_RLANDSCAPE)
+# ifdef CONFIG_LCD_RLANDSCAPE
# error "Cannot define both landscape and any other orientations"
# endif
#elif !defined(CONFIG_LCD_RLANDSCAPE)
@@ -141,8 +141,8 @@
/* STM3240G-EVAL LCD Hardware Definitions *********************************************/
/* LCD /CS is CE4, Bank 3 of NOR/SRAM Bank 1~4 */
-#define STM3240G_LCDBASE ((uint32_t)(0x60000000 | 0x08000000))
-#define LCD ((struct lcd_regs_s *) STM3240G_LCDBASE)
+#define STM3240G_LCDBASE ((uintptr_t)(0x60000000 | 0x08000000))
+#define LCD ((struct lcd_regs_s *)STM3240G_LCDBASE)
#define LCD_REG_0 0x00
#define LCD_REG_1 0x01
@@ -488,12 +488,15 @@ static inline void stm3240g_writegram(uint16_t rgbval)
* this LCD type. When reading 16-bit gram data, there may be some shifts in the
* returned data:
*
- * - ILI932x: Unknown -- assuming no shift in the return data
+ * - ILI932x: Discard first dummy read; no shift in the return data
*
**************************************************************************************/
static void stm3240g_readnosetup(FAR uint16_t *accum)
{
+ /* Read-ahead one pixel */
+
+ *accum = LCD->value;
}
/**************************************************************************************
@@ -507,14 +510,12 @@ static void stm3240g_readnosetup(FAR uint16_t *accum)
*
**************************************************************************************/
-#if !defined(CONFIG_STM32_ILI9320_DISABLE) || !defined(CONFIG_STM32_ILI9325_DISABLE)
static uint16_t stm3240g_readnoshift(FAR uint16_t *accum)
{
/* Read the value (GRAM register already selected) */
return LCD->value;
}
-#endif
/**************************************************************************************
* Name: stm3240g_setcursor
@@ -593,11 +594,7 @@ static int stm3240g_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu
* the STM3240G-EVAL is used as the top.
*/
- /* Set the cursor position */
-
- stm3240g_setcursor(col, row);
-
- /* Then write the GRAM data, manually incrementing X */
+ /* Write the GRAM data, manually incrementing X */
for (i = 0; i < npixels; i++)
{
diff --git a/nuttx/drivers/input/stmpe11_temp.c b/nuttx/drivers/input/stmpe11_temp.c
index 8c7406761..b3eb8f6c5 100644
--- a/nuttx/drivers/input/stmpe11_temp.c
+++ b/nuttx/drivers/input/stmpe11_temp.c
@@ -132,12 +132,12 @@ uint16_t stmpe11_tempread(STMPE11_HANDLE handle)
stmpe11_putreg8(priv, STMPE11_TEMP_CTRL, (TEMP_CTRL_ACQ|TEMP_CTRL_ENABLE));
- /* Read the tempreature */
+ /* Read the temperature */
temp1 = stmpe11_getreg8(priv, STMPE11_SYS_CTRL2);
temp2 = stmpe11_getreg8(priv, STMPE11_SYS_CTRL2+1);
- /* Scale the tempreature */
+ /* Scale the temperature (where Vio is assumed to be .33) */
temp = ((uint32_t)(temp1 & 3) << 8) | temp2;
temp = (uint32_t)((33 * temp * 100) / 751);