Description
I am using LVGL 8 on an ESP32 with esp-idf in order to have a simple GUI on a 3.2" 320x240 LCD with resistive touch. It’s working great but I keep on running into memory issues as I have many things running on that controller.
I allocate one buffer with
buf1 = (lv_color_t*)heap_caps_malloc(DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA);
and have a color depth of 16 bits.
I tried to change the settings to 8 bit color depth which (obviously) decreases the memory footprint for the framebuffer, but the picture looks totally weird, probably because the display needs 16 bit per dot.
Is there a way to artificially reduce the framebuffer size to 8 bit colors (8 bit colors would be sufficient to me) and use it with a 16 bit display?
What MCU/Processor/Board and compiler are you using?
ESP32 with esp-idf
What do you want to achieve?
Reduce memory footprint
What have you tried so far?
Code to reproduce
Add the relevant code snippets here.
The code block(s) should be between ```c
and ```
tags:
buf1 = (lv_color_t*)heap_caps_malloc(DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA);
lv_disp_draw_buf_init(&disp_buf, buf1, NULL, DISP_BUF_SIZE);
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.