Monochrome display minimize ram usage

Description

I’m using a monochrome display, so only one bit per pixel

What MCU/Processor/Board and compiler are you using?

nRF52840, Keil MDK

What do you want to achieve?

minimize the ram usage

What have you tried so far?

I have a full screen size buffer:

static lv_color_t buf_1[LV_HOR_RES_MAX * LV_VER_RES_MAX ];

But lv_color_t and lv_color1_t use 8 bits per pixel, making the ram usage 8 times bigger that necessary. Because of this, my flush_cb() function uses another 8 times higher ram space, resulting in final ram usage of 145kB!!! The actual shall be about 18kB. Is there a way to reduce the ram usage?

Thanks!

Take a look at his post: https://medium.com/@mattia512maldini/porting-littlevgl-for-a-monochrome-display-6c7be58851ce

The ram usage comes from lvgl, not the implementation. It uses 1 byte per pixel, even with #define LV_COLOR_DEPTH 1. It should use 1 bit per color to reduce the ram usage…

It’s discussed in the article.