Porting lvgl to a monochrome display

Hello everyone,
I am trying to port lvgl to a 240x128 resistive touch display. I already have a simpler graphic library and drivers running on my device so the task should not be particularly hard.
I have been taking this tutorial as reference: https://blog.littlevgl.com/2019-05-06/oled
Here however I find some discrepancies between the official API and the code snippets. Specifically it seems to reference the special case for a monochrome display that I can’t find in the source code of the library.

The code I’m referring to is the following:

    monitor_init();
    lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&disp_drv);            /*Basic initialization*/
    disp_drv.disp_flush = monitor_flush;
    disp_drv.vdb_wr = lv_vdb_wr_gray;  
    lv_disp_drv_register(&disp_drv);

Here it uses the fields disp_flush and vdb_wr of the lv_disp_driver_t structure: in the official API however the former just doesn’t exist and the latter is called flush_cb instead…
I believe the functionalities used should have been implemented 1 year ago in the wake of this Github issue https://github.com/littlevgl/lvgl/issues/300, which mention version 5.2 ; the latest lvgl version is 6.0, so it should be there?

I’m a little confused, can someone clarify this for me?

The functionality still exists but the blog post was written against the older API, hence the reason you are finding differences.

Thank you. I was confused because the post itself is very recent (May 2019).

We released v6.0 on 1 June.
If you follow that post and see the issues could you update it? Just edit the file on GitHub.

Do you mean July? :wink:

Yes, sorry :slight_smile:

Once I’ve reached reasonable results I most likely will; I was able to correctly edit the framebuffer today, tomorrow I’ll take a look at flushing and input management.

1 Like

@kisvegabor I’ve created a pull request to update the blog post with the outdated API

1 Like

Awesome! I’ll check it!