提交 814ac8fb 编写于 作者: qiuyiuestc's avatar qiuyiuestc

fix lcd update issue

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@898 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 7659f790
......@@ -172,20 +172,12 @@ void LcdBkLtSet(rt_uint32_t HiRatio)
void rt_hw_lcd_update(rtgui_rect_t *rect)
{
volatile rt_uint16_t *src_ptr, *dst_ptr;
rt_uint32_t pitch, index;
rt_uint32_t i, j;
pitch = 2 * (rect->x2 - rect->x1);
/* copy from framebuffer to physical framebuffer */
src_ptr = &_rt_framebuffer[rect->y1][rect->x1];
dst_ptr = &_rt_hw_framebuffer[rect->y1][rect->x1];
for (index = rect->y1; index < rect->y2; index ++)
for (i = rect->y1; i < rect->y2; i ++)
{
memcpy((void*)dst_ptr, (void*)src_ptr, pitch);
src_ptr += (rect->x2 - rect->x1);
dst_ptr += (rect->x2 - rect->x1);
for(j = rect->x1; j < rect->x2; j++)
_rt_hw_framebuffer[i][j] = _rt_framebuffer[i][j];
}
}
......
......@@ -172,20 +172,12 @@ void LcdBkLtSet(rt_uint32_t HiRatio)
void rt_hw_lcd_update(rtgui_rect_t *rect)
{
volatile rt_uint16_t *src_ptr, *dst_ptr;
rt_uint32_t pitch, index;
rt_uint32_t i, j;
pitch = 2 * (rect->x2 - rect->x1);
/* copy from framebuffer to physical framebuffer */
src_ptr = &_rt_framebuffer[rect->y1][rect->x1];
dst_ptr = &_rt_hw_framebuffer[rect->y1][rect->x1];
for (index = rect->y1; index < rect->y2; index ++)
for (i = rect->y1; i < rect->y2; i ++)
{
memcpy((void*)dst_ptr, (void*)src_ptr, pitch);
src_ptr += (rect->x2 - rect->x1);
dst_ptr += (rect->x2 - rect->x1);
for(j = rect->x1; j < rect->x2; j++)
_rt_hw_framebuffer[i][j] = _rt_framebuffer[i][j];
}
}
......
......@@ -173,20 +173,12 @@ void LcdBkLtSet(rt_uint32_t HiRatio)
void rt_hw_lcd_update(rtgui_rect_t *rect)
{
volatile rt_uint16_t *src_ptr, *dst_ptr;
rt_uint32_t pitch, index;
rt_uint32_t i, j;
pitch = 2 * (rect->x2 - rect->x1);
/* copy from framebuffer to physical framebuffer */
src_ptr = &_rt_framebuffer[rect->y1][rect->x1];
dst_ptr = &_rt_hw_framebuffer[rect->y1][rect->x1];
for (index = rect->y1; index < rect->y2; index ++)
for (i = rect->y1; i < rect->y2; i ++)
{
memcpy((void*)dst_ptr, (void*)src_ptr, pitch);
src_ptr += (rect->x2 - rect->x1);
dst_ptr += (rect->x2 - rect->x1);
for(j = rect->x1; j < rect->x2; j++)
_rt_hw_framebuffer[i][j] = _rt_framebuffer[i][j];
}
}
......@@ -304,8 +296,9 @@ void rt_hw_lcd_init()
LCDCON2 = (LCD_UPPER_MARGIN << 24) | ((LCD_HEIGHT - 1) << 14) | (LCD_LOWER_MARGIN << 6) | (LCD_VSYNC_LEN << 0);
LCDCON3 = (LCD_RIGHT_MARGIN << 19) | ((LCD_WIDTH - 1) << 8) | (LCD_LEFT_MARGIN << 0);
LCDCON4 = (13 << 8) | (LCD_HSYNC_LEN << 0);
#if !defined(LCD_CON5)
#define LCD_CON5 ((1<<11) | (1 << 9) | (1 << 8) | (1 << 3) | (1 << 0))
#define LCD_CON5 ((1<<11) | (1 << 9) | (1 << 8) | (1 << 3) | (1 << 0))
#endif
LCDCON5 = LCD_CON5;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册