use custom display buffer size set in config & set COL/ROW START to 0

This commit is contained in:
J.R. Luppold 2022-07-14 18:12:00 -07:00
parent 1759b774a9
commit 86788a0fb6
2 changed files with 8 additions and 4 deletions

View file

@ -240,8 +240,12 @@ size_t lvgl_get_display_buffer_size(void)
#endif
#else /* LVGL v8 */
/* ToDo: Implement display buffer size calculation with configuration values from the display driver */
disp_buffer_size = 320*40; // Reasonable for start
#if defined (CONFIG_CUSTOM_DISPLAY_BUFFER_SIZE)
disp_buffer_size = CONFIG_CUSTOM_DISPLAY_BUFFER_BYTES;
#else
/* ToDo: Implement display buffer size calculation with configuration values from the display driver */
disp_buffer_size = 320*40; // Reasonable for start
#endif
#endif
return disp_buffer_size;

View file

@ -37,8 +37,8 @@ extern "C" {
// https://github.com/adafruit/Adafruit-ST7735-Library
//
#define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 / 1 offset)
#define COLSTART 26
#define ROWSTART 1
#define COLSTART 0
#define ROWSTART 0
// Delay between some initialisation commands
#define TFT_INIT_DELAY 0x80