在 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)
离线
问题自己解决了,但不知为什么
这个来处理的,但实际上。
 static lv_color_t buffer[LV_HOR_RES_MAX * LV_VER_RES_MAX];
  //  rt_memset(buffer, 0x00, LV_HOR_RES_MAX * LV_VER_RES_MAX*sizeof(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;
离线