SSD1306: Reduce display buffer size

For monochrome displays each byte of the buffer size can store data for 8 pixels.

We divide LV_VER_RES_MAX by 8 because the display vertical side is grouped in
pages of 1 byte, so we need 1byte times LV_HOR_RES_MAX to represent the data of
one page.
This commit is contained in:
C47D 2021-01-19 23:54:14 -06:00
parent 2f3470b85e
commit d5048878b5

View file

@ -40,7 +40,7 @@ extern "C" {
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341 #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 64) #define DISP_BUF_SIZE (LV_HOR_RES_MAX * 64)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306 #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306
#define DISP_BUF_SIZE (LV_HOR_RES_MAX*LV_VER_RES_MAX) #define DISP_BUF_SIZE (LV_HOR_RES_MAX * (LV_VER_RES_MAX / 8))
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X) #elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X)
#define DISP_BUF_LINES 40 #define DISP_BUF_LINES 40
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * DISP_BUF_LINES) #define DISP_BUF_SIZE (LV_HOR_RES_MAX * DISP_BUF_LINES)