Hello I use IMX RT1176 and have a GUI project. I use the latest SDK and MCU Xpresso IDE and in my project I have to use the latest LVGL version which is v9.0.0 . I know it is really brand new, just released on 22 of January but I have to ask when NXP SDK will support v9 LVGL ?
I am trying to support it on my own. I have added LVGL as submodule and changed LVGL version to v9.0.0 . I use SDK project which is lvgl demo widgets for now. After changing lvgl to version 9, I see compilations errors on board/lvgl_support.c file. Particularly there are two functions give major errors ;
void lv_port_disp_init(void)
{
static lv_disp_draw_buf_t disp_buf;
memset(s_frameBuffer, 0, sizeof(s_frameBuffer));
lv_disp_draw_buf_init(&disp_buf, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH * DEMO_BUFFER_HEIGHT);
status_t status;
dc_fb_info_t fbInfo;
/*-------------------------
* Initialize your display
* -----------------------*/
BOARD_PrepareDisplayController();
status = g_dc.ops->init(&g_dc);
if (kStatus_Success != status)
{
assert(0);
}
g_dc.ops->getLayerDefaultConfig(&g_dc, 0, &fbInfo);
fbInfo.pixelFormat = DEMO_BUFFER_PIXEL_FORMAT;
fbInfo.width = DEMO_BUFFER_WIDTH;
fbInfo.height = DEMO_BUFFER_HEIGHT;
fbInfo.startX = DEMO_BUFFER_START_X;
fbInfo.startY = DEMO_BUFFER_START_Y;
fbInfo.strideBytes = DEMO_BUFFER_STRIDE_BYTE;
g_dc.ops->setLayerConfig(&g_dc, 0, &fbInfo);
g_dc.ops->setCallback(&g_dc, 0, DEMO_BufferSwitchOffCallback, NULL);
s_transferDone = xSemaphoreCreateBinary();
if (NULL == s_transferDone)
{
PRINTF("Frame semaphore create failed\r\n");
assert(0);
}
/* lvgl starts render in frame buffer 0, so show frame buffer 1 first. */
g_dc.ops->setFrameBuffer(&g_dc, 0, (void *)s_frameBuffer[1]);
/* Wait for frame buffer sent to display controller video memory. */
if ((g_dc.ops->getProperty(&g_dc) & kDC_FB_ReserveFrameBuffer) == 0)
{
DEMO_WaitBufferSwitchOff();
}
g_dc.ops->enableLayer(&g_dc, 0);
/*-----------------------------------
* Register the display in LittlevGL
*----------------------------------*/
static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
/*Set up the functions to access to your display*/
/*Set the resolution of the display*/
disp_drv.hor_res = LVGL_BUFFER_WIDTH;
disp_drv.ver_res = LVGL_BUFFER_HEIGHT;
/*Used to copy the buffer's content to the display*/
disp_drv.flush_cb = DEMO_FlushDisplay;
/*Set a display buffer*/
disp_drv.draw_buf = &disp_buf;
/* Partial refresh */
disp_drv.full_refresh = 1;
/*Finally register the driver*/
lv_disp_drv_register(&disp_drv);
}
void lv_port_indev_init(void)
{
static lv_indev_drv_t indev_drv;
/*------------------
* Touchpad
* -----------------*/
/*Initialize your touchpad */
DEMO_InitTouch();
/*Register a touchpad input device*/
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = DEMO_ReadTouch;
lv_indev_drv_register(&indev_drv);
}
Problems are about changed structs. For example there is no a struct named lv_indev_drv_t . There is lv_draw_buf_t but it does not cover it fully. There are more jobs needs to do. Do you have prework about these SDK release? If not, could you show me a way?