Fix Core3 warnings when compiling LVGL (#19921)

This commit is contained in:
s-hadinger 2023-11-04 12:22:44 +01:00 committed by GitHub
parent 46df036b51
commit fbe31ab294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -205,7 +205,9 @@ LvGLStatus Adafruit_LvGL_Glue::begin(Renderer *tft, void *touch, bool debug) {
lvgl_buffer_size = tft->width() * (flushlines ? flushlines:LV_BUFFER_ROWS);
if (tft->lvgl_pars()->use_dma) {
lvgl_buffer_size /= 2;
lv_pixel_buf2 = new lv_color_t[lvgl_buffer_size];
if (lvgl_buffer_size < 1000000) {
lv_pixel_buf2 = new lv_color_t[lvgl_buffer_size];
}
if (!lv_pixel_buf2) {
return status;
}

View File

@ -22,7 +22,13 @@
#ifdef USE_LVGL
#include <berry.h>
// silence warning with Core3
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
#include "lvgl.h"
#pragma GCC diagnostic pop
#include "be_mapping.h"
#include "be_ctypes.h"
#include "lv_berry.h"