LVGL v9 Touch Compatibility

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LVGL v9 Touch Compatibility

ソリューションへジャンプ
1,252件の閲覧回数
frozen
Contributor III

 

I use NXP Imx RT1170 EVK board and NXP’s own ide, MCU Xpresso. I have downloaded their latest version for now (03 Feb 2024). I had a project about GUI, there are some texts and images and buttons.
I wanted to import lvgl v9 after released. I can see the same screen on my lcd but I could not get successful touch. I think I have a problem about indev, I share some code pieces and screens here.

 

Previous version v8.3.11

 

 

void lv_port_indev_init(void)
{
static lv_indev_drv_t indev_drv;

DEMO_InitTouch();

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);
}

 

 

new version v9.0.0 written by me

 

void lv_port_indev_init(void)
{
lv_indev_t * indev = lv_indev_create();

DEMO_InitTouch();

lv_indev_set_type(indev,LV_INDEV_TYPE_POINTER);

lv_indev_set_read_cb(indev,DEMO_ReadTouch);

lv_indev_set_display(indev,disp);
}

 



Video is here : https://veed.io/view/a6df6215-cb30-4c41-9a26-10a940bda5f8

 

0 件の賞賛
返信
1 解決策
1,183件の閲覧回数
frozen
Contributor III

Hi thanks for support. I thought I have a problem about indev but I was wrong. My problem was about lv_display_t .

I have written below code

 

    memset(s_frameBuffer, 0, sizeof(s_frameBuffer));

    lv_display_t * disp = lv_display_create(DEMO_BUFFER_WIDTH, DEMO_BUFFER_HEIGHT);
    lv_display_set_flush_cb(disp, (void *)DEMO_FlushDisplay);
    lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_PARTIAL);

 

Then I have changed just render_mode as below and now touch capability is okay.

 

    lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_DIRECT);

 



Now I can see my gui designs on the lcd and when I touch objects I see an expected effects.

元の投稿で解決策を見る

4 返答(返信)
1,211件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @frozen ,

   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

   I already help you to check with our internal side, LVGL V9 is not supported now.

  We highly recommend you use the following LVGL version which is supported by the GUI Guider:

kerryzhou_0-1707123876535.png

  Then, if you meet any issues, just kindly let us know.

Best Regards,

Kerry

 

0 件の賞賛
返信
1,195件の閲覧回数
frozen
Contributor III

Hi @kerryzhou ,

Thanks for your support. I have to use v9, that's why I have to insist on not using Gui Guider with lvgl v8.3.5.

0 件の賞賛
返信
1,191件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @frozen ,

   I already check internally, the V9+SDK still in the progress internally, as V9 have a lot of difference with V8. So, until now, SDK support with V9 still not avaiable, thanks.

 

Best Regards,

Kerry

0 件の賞賛
返信
1,184件の閲覧回数
frozen
Contributor III

Hi thanks for support. I thought I have a problem about indev but I was wrong. My problem was about lv_display_t .

I have written below code

 

    memset(s_frameBuffer, 0, sizeof(s_frameBuffer));

    lv_display_t * disp = lv_display_create(DEMO_BUFFER_WIDTH, DEMO_BUFFER_HEIGHT);
    lv_display_set_flush_cb(disp, (void *)DEMO_FlushDisplay);
    lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_PARTIAL);

 

Then I have changed just render_mode as below and now touch capability is okay.

 

    lv_display_set_buffers(disp, s_frameBuffer[0], s_frameBuffer[1], DEMO_BUFFER_WIDTH*DEMO_BUFFER_HEIGHT*DEMO_BUFFER_BYTE_PER_PIXEL, LV_DISPLAY_RENDER_MODE_DIRECT);

 



Now I can see my gui designs on the lcd and when I touch objects I see an expected effects.