From 72c0c33d10e26f4ac9026c66cd3cf69478a31bc9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 21 Apr 2010 12:10:30 +0000 Subject: More LCD fixes git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2623 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/sam3u-ek/src/up_lcd.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'nuttx/configs/sam3u-ek') diff --git a/nuttx/configs/sam3u-ek/src/up_lcd.c b/nuttx/configs/sam3u-ek/src/up_lcd.c index a966c72a0..61f77ade7 100755 --- a/nuttx/configs/sam3u-ek/src/up_lcd.c +++ b/nuttx/configs/sam3u-ek/src/up_lcd.c @@ -167,10 +167,10 @@ /* Graphics Capbilities ***************************************************************/ -/* LCD resolution: 240 (row) x 320 (columns) */ +/* LCD resolution: 240 (rows) x 320 (columns) */ -#define SAM3UEK_XRES 240 -#define SAM3UEK_YRES 320 +#define SAM3UEK_XRES 320 +#define SAM3UEK_YRES 240 /* Color depth and format. BPP=16 R=6, G=6, B=5: RRRR RBBB BBBG GGGG */ @@ -592,15 +592,17 @@ static int sam3u_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffe gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); - /* Set up for the write */ - - sam3u_setcursor(row, col); - sam3u_wrsetup(); - /* Write the run to GRAM */ for (i = 0; i < npixels; i++) { + /* Set up for the write */ + + sam3u_setcursor(row, col++); + sam3u_wrsetup(); + + /* Write the pixel to GRAM */ + sam3u_wrram(*run++); } return OK; -- cgit v1.2.3