From ad5fff4b0b7287c6c9dd5c442157897d04984f9f Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei <gustavo.nihei@espressif.com> Date: Wed, 7 Apr 2021 11:52:45 -0300 Subject: [PATCH] graphics/lvgl: Add config to enable LVGL Performance Monitor --- graphics/lvgl/Kconfig | 6 ++++++ graphics/lvgl/lv_conf.h | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/graphics/lvgl/Kconfig b/graphics/lvgl/Kconfig index 7fc211a07..3162c9c41 100644 --- a/graphics/lvgl/Kconfig +++ b/graphics/lvgl/Kconfig @@ -28,6 +28,12 @@ config LV_USE_USER_DATA ---help--- Add a `user_data` to drivers and objects +config LV_USE_PERF_MONITOR + bool "Show CPU usage and FPS count" + default n + ---help--- + Show CPU usage and FPS count in the right bottom corner + menu "Graphics settings" config LV_HOR_RES diff --git a/graphics/lvgl/lv_conf.h b/graphics/lvgl/lv_conf.h index 721044f8d..3ea42c8aa 100644 --- a/graphics/lvgl/lv_conf.h +++ b/graphics/lvgl/lv_conf.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/graphics/littlevgl/lv_conf.h + * apps/graphics/lvgl/lv_conf.h * * Copyright (C) 2018 Gregory Nutt. All rights reserved. * Author: Gábor Kiss-Vámosi <kisvegabor@gmail.com> @@ -330,7 +330,11 @@ typedef void * lv_fs_drv_user_data_t; /* 1: Show CPU usage and FPS count in the right bottom corner */ -#define LV_USE_PERF_MONITOR 0 +#ifdef CONFIG_LV_USE_PERF_MONITOR +#define LV_USE_PERF_MONITOR CONFIG_LV_USE_PERF_MONITOR +#else +#define LV_USE_PERF_MONITOR 0 +#endif /* 1: Use the functions and types from the older API if possible */