BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: LVGL and FT813!  (Read 16556 times)

Juanj

  • Newbie
  • *
  • Posts: 2
    • View Profile
LVGL and FT813!
« on: January 28, 2024, 06:18:55 PM »

Hello, I share the progress on my project that is based on using the LVGL library with EVE displays. So far, I have only tested it on the FT813!

I am currently still working on it  :)

Details: https://github.com/juanjqh/lvgl/tree/master/src/draw/eve

https://youtu.be/3XNW7W6pYUA?si=PkmRHXyGxR97qmN1

Source: https://github.com/juanjqh/lvgl_eve_gpu_test-main
Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: LVGL and FT813!
« Reply #1 on: February 07, 2024, 08:00:50 AM »

interesting project! 

May I know the hardware configuration and the feature list of lvgl is supported?
Logged

Juanj

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: LVGL and FT813!
« Reply #2 on: February 08, 2024, 06:01:02 PM »

Hello, it should work with any hardware that this library covers: https://github.com/RudolphRiedel/FT800-FT813 But I have only tested it on an FT813.

LVGL feature list:

*Text
*Fill( rectangle, circle, border )
*Arc
*Triangle
*Lines
*Images in raw (RGB565, L8, ARGB8888 converted to RGBA4 and RGB565A8 converted to RGB1555).

I am currently working on gradients and images in PNG and JPG formats using the file system.

Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 818
    • View Profile
Re: LVGL and FT813!
« Reply #3 on: February 09, 2024, 08:55:59 AM »

Hi,
Yes, nice work and a very interesting project, thanks for sharing and let us know how it is going as you add the new features,
Best Regards,
BRT Community
Logged

cmilos

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: LVGL and FT813!
« Reply #4 on: January 16, 2025, 11:10:23 AM »

Hi all,

I am using EVE4 display, BT817Q graphics controller and XMC4700.
On a previous project, I only used EVE commands.
I learned about LVGL and I found your example on GitHub.

I integrated the LVGL library into my new project, running LVGL benchmark on an XMC controller and use part of your example, eve_display_flush function to refresh the content.

The screen content update is triggered by LVGL only for the changed pixels. However, if the update area is a small square, using eve_display_flush, as written ,
this will rewrite screen pixels of that area but for the entire screen width, the height will be the square height, avoiding pixel corruption.

By doing this, there will be multiple SPI commands, one for each line written, line that will be longer then square width, which will lead to an increase delay time.

How can I update the square without sending the pixels for the entire screen width , using only the length of pixels that are being changed ?

I tried using scissor functions, after I read about scissor functions, but without success, my guess is that EVE commands cannot be combined with EVE_memWrite_sram_buffer function.

Here I have one of the best variants that I could get, but the data is corrupted when the surface is smaller then the screen width:

void display_flush_exemple(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *color_p)
{
   eve_scissor(x, y, width, height);
   uint32_t ram_offset = (y * EVE_HSIZE + x) * 2;
   EVE_cmd_dl( DL_BEGIN | EVE_BITMAPS );
   EVE_cmd_dl(VERTEX2F(x * 16, y * 16));
   EVE_memWrite_sram_buffer(ram_offset, (uint8_t *)color_p, width * height * BYTES_PER_PIXEL);
   EVE_cmd_dl(DL_END);
   eve_scissor(0, 0, EVE_HSIZE, EVE_VSIZE);
}
where eve_scissor is as below:
void eve_scissor(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
    if (x1 != scissor_x1 || y1 != scissor_y1)
    {
        int16_t adjusted_x1 = x1 > 0 ? x1 - 1 : 0;
        int16_t adjusted_y1 = y1 > 0 ? y1 - 1 : 0;
        EVE_cmd_dl(SCISSOR_XY(adjusted_x1, adjusted_y1));
        scissor_x1 = x1;
        scissor_y1 = y1;
    }

    if (x2 != scissor_x2 || y2 != scissor_y2)
    {
        uint16_t w = x2 - x1 + 3;
        uint16_t h = y2 - y1 + 3;
        EVE_cmd_dl(SCISSOR_SIZE(w, h));
        scissor_x2 = x2;
        scissor_y2 = y2;
    }
}

You can see in the bellow pictures, that when I tried to switch the color of a square, the color is not filling the rectangle.

Thank you!
Best regards!

Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: LVGL and FT813!
« Reply #5 on: March 24, 2025, 05:00:04 AM »

1. eve_scissor(x, y, width, height)
    -> Should be eve_scissor(x, y, x+width, y+height) based on implementation of eve_scissor(x1, x2, y1, y2)
 
2. In display_flush_exemple(), try this:
    - Move eve_scissor to after DL_BEGIN
    - Move EVE_memWrite_sram_buffer to before DL_BEGIN
 
This is modified display_flush_exemple() function:
    void display_flush_exemple(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *color_p)
    {
       uint32_t ram_offset = (y * EVE_HSIZE + x) * 2;
       EVE_memWrite_sram_buffer(ram_offset, (uint8_t *)color_p, width * height * BYTES_PER_PIXEL);
       EVE_cmd_dl( DL_BEGIN | EVE_BITMAPS );
       eve_scissor(x, y, x+width, y+height);
       EVE_cmd_dl(VERTEX2F(x * 16, y * 16));
       EVE_cmd_dl(DL_END);
       eve_scissor(0, 0, EVE_HSIZE, EVE_VSIZE);
    }
Logged