From fcb3f0be7cf755c09970aef69d46c183779dc6f7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 10 Jul 2011 22:35:35 +0000 Subject: 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 --- nuttx/configs/stm3210e-eval/nxtext/defconfig | 4 +++ nuttx/configs/stm3210e-eval/src/up_lcd.c | 40 ++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 8 deletions(-) (limited to 'nuttx/configs') 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 @@ -498,6 +498,36 @@ static void stm3210e_setcursor(uint16_t col, uint16_t row) stm3210e_writereg(LCD_REG_33, col); /* GRAM vertical address */ } +/************************************************************************************** + * 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 * @@ -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; } -- cgit v1.2.3