From 02c3298fcaa41b41b6cbc579beabcfbe30bdd10b Mon Sep 17 00:00:00 2001 From: Matias N Date: Sun, 29 Nov 2020 11:34:56 -0300 Subject: [PATCH] LVGL: use NuttX's printf() --- examples/lvgldemo/Makefile | 4 ++-- graphics/lvgl/Makefile | 4 ++++ graphics/lvgl/lv_conf.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/lvgldemo/Makefile b/examples/lvgldemo/Makefile index 2b30f473c..c1577afe5 100644 --- a/examples/lvgldemo/Makefile +++ b/examples/lvgldemo/Makefile @@ -86,8 +86,8 @@ endif MAINSRC = lvgldemo.c -CFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE} -CXXFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE} +CFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE} -Wno-format +CXXFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE} -Wno-format $(LVGL_EXAMPLES_TARBALL): @echo "Downloading: $(LVGL_EXAMPLES_TARBALL)" diff --git a/graphics/lvgl/Makefile b/graphics/lvgl/Makefile index fd386d13f..f60afd8d5 100644 --- a/graphics/lvgl/Makefile +++ b/graphics/lvgl/Makefile @@ -40,6 +40,10 @@ include $(APPDIR)/Make.defs LVGL_DIR = . LVGL_DIR_NAME = lvgl +# Relax format check for LVGL to avoid errors on prinf() use + +CFLAGS += -Wno-format + # LVGL Libraries -include ./lvgl/src/lv_core/lv_core.mk diff --git a/graphics/lvgl/lv_conf.h b/graphics/lvgl/lv_conf.h index 16ad75090..721044f8d 100644 --- a/graphics/lvgl/lv_conf.h +++ b/graphics/lvgl/lv_conf.h @@ -753,7 +753,7 @@ typedef void * lv_font_user_data_t; /* Change the built in (v)snprintf functions */ -#define LV_SPRINTF_CUSTOM 0 +#define LV_SPRINTF_CUSTOM 1 #if LV_SPRINTF_CUSTOM # define LV_SPRINTF_INCLUDE # define lv_snprintf snprintf