Browse Source

update for armcc compiler.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@703 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 years ago
parent
commit
550df04b6b
3 changed files with 9 additions and 6 deletions
  1. 2 2
      bsp/mini2440/lcd_a70.c
  2. 2 2
      bsp/mini2440/lcd_n35.c
  3. 5 2
      bsp/mini2440/lcd_t35.c

+ 2 - 2
bsp/mini2440/lcd_a70.c

@@ -171,7 +171,7 @@ void LcdBkLtSet(rt_uint32_t HiRatio)
 
 void rt_hw_lcd_update(rtgui_rect_t *rect)
 {
-	rt_uint16_t *src_ptr, *dst_ptr;
+	volatile rt_uint16_t *src_ptr, *dst_ptr;
 	rt_uint32_t pitch, index;
 
 	pitch = 2 * (rect->x2 - rect->x1);
@@ -182,7 +182,7 @@ void rt_hw_lcd_update(rtgui_rect_t *rect)
 
 	for (index = rect->y1; index < rect->y2; index ++)
 	{
-		memcpy(dst_ptr, src_ptr, pitch);
+		memcpy((void*)dst_ptr, (void*)src_ptr, pitch);
 
 		src_ptr += (rect->x2 - rect->x1);
 		dst_ptr += (rect->x2 - rect->x1);

+ 2 - 2
bsp/mini2440/lcd_n35.c

@@ -171,7 +171,7 @@ void LcdBkLtSet(rt_uint32_t HiRatio)
 
 void rt_hw_lcd_update(rtgui_rect_t *rect)
 {
-	rt_uint16_t *src_ptr, *dst_ptr;
+	volatile rt_uint16_t *src_ptr, *dst_ptr;
 	rt_uint32_t pitch, index;
 
 	pitch = 2 * (rect->x2 - rect->x1);
@@ -182,7 +182,7 @@ void rt_hw_lcd_update(rtgui_rect_t *rect)
 
 	for (index = rect->y1; index < rect->y2; index ++)
 	{
-		memcpy(dst_ptr, src_ptr, pitch);
+		memcpy((void*)dst_ptr, (void*)src_ptr, pitch);
 
 		src_ptr += (rect->x2 - rect->x1);
 		dst_ptr += (rect->x2 - rect->x1);

+ 5 - 2
bsp/mini2440/lcd_t35.c

@@ -15,6 +15,7 @@
 #include <rtthread.h>
 
 #include <s3c24x0.h>
+#include <string.h>
 
 /* LCD driver for T3'5 */
 #define LCD_WIDTH 240
@@ -171,18 +172,20 @@ void LcdBkLtSet(rt_uint32_t HiRatio)
 
 void rt_hw_lcd_update(rtgui_rect_t *rect)
 {
-	rt_uint16_t *src_ptr, *dst_ptr;
+	volatile rt_uint16_t *src_ptr, *dst_ptr;
 	rt_uint32_t pitch, index;
 
 	pitch = 2 * (rect->x2 - rect->x1);
 
+	rt_kprintf("update (%d,%d - %d,%d)\n", rect->x1, rect->y1, rect->x2, rect->y2);
+
 	/* copy from framebuffer to physical framebuffer */
 	src_ptr = &_rt_framebuffer[rect->x1][rect->y1];
 	dst_ptr = &_rt_hw_framebuffer[rect->x1][rect->y1];
 
 	for (index = rect->y1; index < rect->y2; index ++)
 	{
-		memcpy(dst_ptr, src_ptr, pitch);
+		memcpy((void*)dst_ptr, (void*)src_ptr, pitch);
 
 		src_ptr += (rect->x2 - rect->x1);
 		dst_ptr += (rect->x2 - rect->x1);