summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-10 22:35:35 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-10 22:35:35 +0000
commitfcb3f0be7cf755c09970aef69d46c183779dc6f7 (patch)
tree7ab8ce071ef612193405dd334ff4af66bf98eaa9 /nuttx/configs
parentbc4b6fcb861a7f143ddcc4aeef828cbab4006b51 (diff)
downloadpx4-nuttx-fcb3f0be7cf755c09970aef69d46c183779dc6f7.tar.gz
px4-nuttx-fcb3f0be7cf755c09970aef69d46c183779dc6f7.tar.bz2
px4-nuttx-fcb3f0be7cf755c09970aef69d46c183779dc6f7.zip
Fix more NXTEXT bugs -- seems to be working now
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3768 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/stm3210e-eval/nxtext/defconfig4
-rwxr-xr-xnuttx/configs/stm3210e-eval/src/up_lcd.c40
2 files changed, 36 insertions, 8 deletions
diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig
index c82856953..bc36b9731 100644
--- a/nuttx/configs/stm3210e-eval/nxtext/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig
@@ -962,6 +962,9 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
# background window. Default depends on CONFIG_EXAMPLES_NXTEXT_BPP.
# CONFIG_EXAMPLES_NXTEXT_BPP -- Pixels per pixel to use. Valid options
# include 2, 4, 8, 16, 24, and 32. Default is 32.
+# CONFIG_EXAMPLES_NXTEXT_NOGETRUN -- If your display is read-only OR if
+# reading is not reliable, then select this configuration to avoid
+# reading from the display.
# CONFIG_EXAMPLES_NXTEXT_EXTERNINIT - The driver for the graphics device on
# this platform requires some unusual initialization. This is the
# for, for example, SPI LCD/OLED devices.
@@ -985,6 +988,7 @@ CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR=0xffdf
CONFIG_EXAMPLES_NXTEXT_PUCOLOR=0xfd20
CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR=0x001f
CONFIG_EXAMPLES_NXTEXT_BPP=16
+CONFIG_EXAMPLES_NXTEXT_NOGETRUN=y
CONFIG_EXAMPLES_NXTEXT_EXTERNINIT=n
CONFIG_EXAMPLES_NXTEXT_BMCACHE=512
CONFIG_EXAMPLES_NXTEXT_GLCACHE=16
diff --git a/nuttx/configs/stm3210e-eval/src/up_lcd.c b/nuttx/configs/stm3210e-eval/src/up_lcd.c
index 588890e50..a888f31e5 100755
--- a/nuttx/configs/stm3210e-eval/src/up_lcd.c
+++ b/nuttx/configs/stm3210e-eval/src/up_lcd.c
@@ -499,6 +499,36 @@ static void stm3210e_setcursor(uint16_t col, uint16_t row)
}
/**************************************************************************************
+ * Name: stm3210e_dumprun
+ *
+ * Description:
+ * Dump the contexts of the run buffer:
+ *
+ * run - The buffer in containing the run read to be dumped
+ * npixels - The number of pixels to dump
+ *
+ **************************************************************************************/
+
+#if 0 /* Sometimes useful */
+static void stm3210e_dumprun(FAR const char *msg, FAR uint16_t *run, size_t npixels)
+{
+ int i, j;
+
+ lib_rawprintf("\n%s:\n", msg);
+ for (i = 0; i < npixels; i += 16)
+ {
+ up_putc(' ');
+ lib_rawprintf(" ");
+ for (j = 0; j < 16; j++)
+ {
+ lib_rawprintf(" %04x", *run++);
+ }
+ up_putc('\n');
+ }
+}
+#endif
+
+/**************************************************************************************
* Name: stm3210e_putrun
*
* Description:
@@ -591,14 +621,7 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
lcddbg("row: %d col: %d npixels: %d\n", row, col, npixels);
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
- /* Set up to read the run. */
-
- stm3210e_setcursor(col, row);
-
- /* Read the run from GRAM. The LCD is configured so the X corresponds to rows and
- * Y corresponds to columns. (0, STM3210E_XRES-1) is the upper left hand corner. Y
- * autodecrements.
- */
+ /* Read the run from GRAM. */
#ifdef CONFIG_LCD_LANDSCAPE
/* Convert coordinates -- Which edge of the display is the "top?" Here the edge
@@ -638,6 +661,7 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
col++;
}
#endif
+
return OK;
}