打印
[MM32软件]

急。。。移植LVGL没法正常显示。真奇怪!

[复制链接]
517|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
安的|  楼主 | 2022-2-23 11:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
使用FSMC接口驱动4.7‘LCD,移植LVGL后,不能正常显示,使用了Benchmark测试,有动画,但是与官方的有差异,然后再移植官方的Widgets,屏幕没内容。。。。

static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
{
    /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
#if RAW_CODE
    int32_t x;
    int32_t y;
    for(y = area->y1; y <= area->y2; y++) {
        for(x = area->x1; x <= area->x2; x++) {
            /* Put a pixel to the display. For example: */
            /* put_px(x, y, *color_p)*/
            color_p++;
        }
    }
#else               

          unsigned short int draw_len  = area->x2-area->x1+1;
          unsigned short int draw_width= area->y2-area->y1+1;
       
          lcd_win_fill(&tft_lcd,area->x1,area->y1,draw_len,draw_width,color_p->full);
#endif
    /* IMPORTANT!!!
     * Inform the graphics library that you are ready with the flushing*/
    lv_disp_flush_ready(disp_drv);
}

lcd_win_fill(&tft_lcd,area->x1,area->y1,draw_len,draw_width,color_p->full);这个函数我单独拿出来是可以画块的


后来用其他的demo,也是没法显示内容,但是有刷屏

使用特权

评论回复
沙发
uccms| | 2022-2-27 19:09 | 只看该作者
lcd_win_fill(&tft_lcd, area->x1, area->y1, draw_len, draw_width, (uint16_t *)color_p);

color_p->full应该是一个点颜色

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

1

帖子

0

粉丝