










颜色模式不匹配
ILI9488 SPI 接口 仅支持 RGB666 (18bit),而 LVGL 默认是 RGB565 (16bit)。
你需要将 RGB565 转换成 RGB666。
MADCTL(内存访问控制)设置不正确
ILI9488 的 MADCTL 控制颜色格式和方向,错误设置可能导致颜色错乱。
LVGL 颜色格式(Color Depth)设置错误
在 lv_conf.h 里,LV_COLOR_DEPTH 可能不匹配 ILI9488。

我的最终解决办法是将
.swap_bytes = 0,
const lvgl_port_display_cfg_t disp_cfg = {
.io_handle = lcd_io_handle,
.panel_handle = lcd_handle,
.control_handle = NULL,
.double_buffer = false,
.trans_size = 0,
.buffer_size = EXAMPLE_LCD_H_RES * 10,
.hres = EXAMPLE_LCD_H_RES,
.vres = EXAMPLE_LCD_V_RES,
.monochrome = false,
.color_format = LV_COLOR_FORMAT_RGB565,
.rotation = {
.swap_xy = false,
.mirror_x = false,
.mirror_y = false,
},
.flags = {
.buff_dma = 1,
.buff_spiram = 0,
.sw_rotate = 0,
.swap_bytes = 0,//改成0
.full_refresh = 0,
.direct_mode = 0,
},
};
lvgl_disp = lvgl_port_add_disp(&disp_cfg);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。