提交 eef0a2d8 编写于 作者: mysterywolf's avatar mysterywolf 提交者: Bernard Xiong

[qmeu] chore

上级 446bde64
......@@ -14,7 +14,7 @@
int main(void)
{
printf("hello rt-thread\n");
printf("Hello RT-Thread!\n");
return 0;
}
......@@ -75,13 +75,15 @@ static rt_err_t drv_clcd_control(struct rt_device *device, int cmd, void *args)
RT_ASSERT(info != RT_NULL);
info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565;
// info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_ARGB888;
info->bits_per_pixel= 16;
info->width = lcd->width;
info->height = lcd->height;
info->framebuffer = lcd->fb;
}
break;
default:
return -RT_EINVAL;
}
return RT_EOK;
......@@ -109,7 +111,7 @@ int drv_clcd_hw_init(void)
_lcd.width = CLCD_WIDTH;
_lcd.height = CLCD_HEIGHT;
_lcd.fb = rt_malloc(_lcd.width * _lcd.height * 2);
_lcd.fb = rt_malloc(_lcd.width * _lcd.height * 2 /*RGB565 2 Bytes*/);
if (_lcd.fb == NULL)
{
rt_kprintf("initialize frame buffer failed!\n");
......
......@@ -90,6 +90,9 @@ static rt_err_t drv_lcd_control(struct rt_device *device, int cmd, void *args)
info->framebuffer = lcd->lcd_info.framebuffer;
}
break;
default:
return -RT_EINVAL;
}
return RT_EOK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册