全部博文(120)
分类: LINUX
2010-08-12 15:32:36
1.Display/LCD
1.1 display.h
Change the following #difine:
#define TARGET_XRES 800
#define TARGET_YRES 480
#define LCDC_FB_WIDTH 800
#define LCDC_FB_HEIGHT 480
#define LCDC_HSYNC_PULSE_WIDTH_DCLK 60
#define LCDC_HSYNC_BACK_PORCH_DCLK 81
#define LCDC_HSYNC_FRONT_PORCH_DCLK 81
#define LCDC_HSYNC_SKEW_DCLK 0
#define LCDC_VSYNC_PULSE_WIDTH_LINES 2
#define LCDC_VSYNC_BACK_PORCH_LINES 20
#define LCDC_VSYNC_FRONT_PORCH_LINES 27
1.2 fbcon.h
#define FB_FORMAT_RGB565 0
+#define FB_FORMAT_RGB888 1
1.3 fbcon.c
#define RGB565_BLACK 0x0000
#define RGB565_WHITE 0xffff
+#define RGB888_BLACK 0x000000
+#define RGB888_WHITE 0xffffff
void fbcon_setup(struct fbcon_config *_config)
{
uint32_t bg;
uint32_t fg;
ASSERT(_config);
config = _config;
switch (config->format) {
case FB_FORMAT_RGB565:
bg = RGB565_BLACK;
fg = RGB565_WHITE;
break;
+case FB_FORMAT_RGB888:
+ bg = RGB888_BLACK;
+ fg = RGB888_WHITE;
+ break;
default:
dprintf(CRITICAL, "unknown framebuffer pixel format\n");
ASSERT(0);
break;
}
fbcon_set_colors(bg, fg);
cur_pos.x = 0;
cur_pos.y = 0;
max_pos.x = config->width / (FONT_WIDTH+1);
max_pos.y = (config->height - 1) / FONT_HEIGHT;
}