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
This commit is contained in:
patacongo 2011-07-10 22:35:35 +00:00
parent 81e6a3b3ca
commit db418a33cd
2 changed files with 36 additions and 8 deletions

View File

@ -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

View File

@ -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;
}