您尚未登录。

楼主 #1 2020-01-06 18:45:38

staunchheart
会员
注册时间: 2019-12-17
已发帖子: 232
积分: 190

LittleVgl升级到6.1 LV_COLOR_DEPTH的问题 (RT-Thread)

https://gitee.com/jiang_xing/f1c100s_rt-thread 的基础上
我将LittleVgl升到6.1
6.0以后
#if LV_COLOR_DEPTH == 24
#error "LV_COLOR_DEPTH 24 is deprecated. Use LV_COLOR_DEPTH 32 instead (lv_conf.h)"
#endif

原来5.3 LV_COLOR_DEPTH 24正常,
如果我将FB中的LCD_PRE_PIXEL和LV_COLOR_DEPTH都改为32,屏能亮,大概能看到屏上的内容是我的。
但有很多点移位了。

如果FB中的LCD_PRE_PIXEL还是24,则会黑屏,只有背光亮。

这是LittleVgl DEMO上的代码。
if(info.bits_per_pixel == 24 || info.bits_per_pixel == 32)
{
uint32_t fbp32 = (uint32_t)info.framebuffer;

for(y = act_y1; y <= act_y2; y++)
{
for(x = act_x1; x <= act_x2; x++)
{
location = (x) + (y) * info.width;
fbp32[location] = (color_p->full);
color_p++;
}

color_p += area->x2 - act_x2;
}
}

最近编辑记录 staunchheart (2020-01-06 18:48:24)

离线

楼主 #2 2020-01-06 22:12:15

staunchheart
会员
注册时间: 2019-12-17
已发帖子: 232
积分: 190

Re: LittleVgl升级到6.1 LV_COLOR_DEPTH的问题 (RT-Thread)

问题自己解决了,但不知为什么

我是参考
https://github.com/ZJ-TEK/ZJ_RT_Thread_NimBLE_LittlevGL_Nordic/blob/928dd3902a015931745ee36069a0e464b6a8aa97/ZJ_Application_NRF52840/001.lvgl_nimble_hrm/littlevgl/vgl_rtt_drv/lvgl_rtt_drv.c

这个来处理的,但实际上。

static lv_color_t buffer[LV_HOR_RES_MAX * LV_VER_RES_MAX];
// rt_memset(buffer, 0x00, LV_HOR_RES_MAX LV_VER_RES_MAXsizeof(lv_color_t));
/ Example for 1) /
static lv_disp_buf_t disp_buf;
//这个地方需要重新用一个缓存,但为什么呢???
lv_disp_buf_init(&disp_buf, buffer, NULL, LV_HOR_RES_MAX LV_VER_RES_MAX); /Initialize the display buffer*/
//官方代码
//lv_disp_buf_init(&disp_buf, info.framebuffer, NULL, LV_HOR_RES_MAX * LV_VER_RES_MAX);
/ littlevGL Display device interface /
lv_disp_drv_t disp_drv;
lv_disp_drv_init(&disp_drv);

/Set the resolution of the display/
disp_drv.hor_res = info.width;
disp_drv.ver_res = info.height;

离线

#3 2020-01-06 22:29:45

晕哥
管理员
所在地: wechat: whycan_cn
注册时间: 2017-09-06
已发帖子: 9,473
积分: 9207

Re: LittleVgl升级到6.1 LV_COLOR_DEPTH的问题 (RT-Thread)

感谢楼主分享!





离线

#4 2020-02-11 16:57:17

sea18c
会员
注册时间: 2019-08-05
已发帖子: 230
积分: 222.5

Re: LittleVgl升级到6.1 LV_COLOR_DEPTH的问题 (RT-Thread)

/xboot/src/external/lvgl-6.1.1/lvgl/src/lv_conf_checker.h 这个文件里面修改LV_COLOR_DEPTH 32 试试

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn


东莞哇酷科技有限公司开发