From 9891dfb612f674c9de6be4079feba9d8ac0adfa6 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Tue, 28 Apr 2020 16:15:09 +0200 Subject: [PATCH] Add Double buffer on stm32 --- src/hasp_gui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp index 23b20183..89ba0e4c 100644 --- a/src/hasp_gui.cpp +++ b/src/hasp_gui.cpp @@ -646,13 +646,19 @@ void guiSetup() // static lv_color_t * guiVdbBuffer2 = (lv_color_t *)malloc(sizeof(lv_color_t) * guiVDBsize); // lv_disp_buf_init(&disp_buf, guiVdbBuffer1, guiVdbBuffer2, guiVDBsize); lv_disp_buf_init(&disp_buf, guiVdbBuffer1, NULL, guiVDBsize); -#else +#elif defined(ARDUINO_ARCH_ESP8266) /* allocate on heap */ static lv_disp_buf_t disp_buf; static lv_color_t guiVdbBuffer1[5 * 512u]; // 5 KBytes // static lv_color_t guiVdbBuffer2[3 * 1024u]; // 6 KBytes guiVDBsize = sizeof(guiVdbBuffer1) / sizeof(guiVdbBuffer1[0]); lv_disp_buf_init(&disp_buf, guiVdbBuffer1, NULL, guiVDBsize); +#else + static lv_disp_buf_t disp_buf; + static lv_color_t guiVdbBuffer1[16 * 512u]; // 16 KBytes + static lv_color_t guiVdbBuffer2[16 * 512u]; // 16 KBytes + lv_disp_buf_init(&disp_buf, guiVdbBuffer1, guiVdbBuffer2, guiVDBsize); + //lv_disp_buf_init(&disp_buf, guiVdbBuffer1, NULL, guiVDBsize); #endif /* Initialize PNG decoder */