update lv_conf_internal.h

This commit is contained in:
Gabor Kiss-Vamosi 2024-04-22 18:13:02 +02:00
parent 08087cccd8
commit d0a9e8b817
10 changed files with 29 additions and 30 deletions

View File

@ -189,6 +189,11 @@ LV_EXPORT_CONST_INT(LV_DRAW_BUF_ALIGN);
#define LV_LOG_TRACE_ANIM 0
#endif /*LV_USE_LOG*/
#if LV_USE_SYSMON == 0
#define LV_USE_PERF_MONITOR 0
#define LV_USE_MEM_MONITOR 0
#endif /*LV_USE_SYSMON*/
#ifndef LV_USE_LZ4
#define LV_USE_LZ4 (LV_USE_LZ4_INTERNAL || LV_USE_LZ4_EXTERNAL)
#endif

View File

@ -191,11 +191,11 @@ typedef struct _lv_global_t {
lv_style_t fe_list_button_style;
#endif
#if LV_USE_SYSMON && LV_USE_PERF_MONITOR
#if LV_USE_PERF_MONITOR
lv_sysmon_backend_data_t sysmon_perf;
#endif
#if LV_USE_SYSMON && LV_USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
lv_sysmon_backend_data_t sysmon_mem;
#endif

View File

@ -331,7 +331,7 @@ void _lv_display_refr_timer(lv_timer_t * tmr)
/* Ensure the timer does not run again automatically.
* This is done before refreshing in case refreshing invalidates something else.
* However if the performance monitor is enabled keep the timer running to count the FPS.*/
#if !(defined(LV_USE_PERF_MONITOR) && LV_USE_PERF_MONITOR)
#if LV_USE_PERF_MONITOR
lv_timer_pause(tmr);
#endif
}

View File

@ -140,11 +140,11 @@ lv_display_t * lv_display_create(int32_t hor_res, int32_t ver_res)
lv_timer_ready(disp->refr_timer); /*Be sure the screen will be refreshed immediately on start up*/
#if defined(LV_USE_PERF_MONITOR) && LV_USE_PERF_MONITOR
#if LV_USE_PERF_MONITOR
lv_sysmon_show_performance(disp);
#endif
#if defined(LV_USE_MEM_MONITOR) && LV_USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
lv_sysmon_show_memory(disp);
#endif

View File

@ -18,7 +18,7 @@ extern "C" {
#include "../draw/lv_draw.h"
#include "lv_display.h"
#if defined(LV_USE_PERF_MONITOR) && LV_USE_PERF_MONITOR
#if LV_USE_PERF_MONITOR
#include "../others/sysmon/lv_sysmon.h"
#endif
@ -153,13 +153,13 @@ struct _lv_display_t {
/** The area being refreshed*/
lv_area_t refreshed_area;
#if defined(LV_USE_PERF_MONITOR) && LV_USE_PERF_MONITOR
#if LV_USE_PERF_MONITOR
lv_obj_t * perf_label;
lv_sysmon_backend_data_t perf_sysmon_backend;
lv_sysmon_perf_info_t perf_sysmon_info;
#endif
#if defined(LV_USE_MEM_MONITOR) && LV_USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
lv_obj_t * mem_label;
#endif

View File

@ -349,7 +349,7 @@
#define LV_USE_NATIVE_HELIUM_ASM 0
#endif
#endif
/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
#ifndef LV_DRAW_SW_COMPLEX
@ -3283,6 +3283,11 @@ LV_EXPORT_CONST_INT(LV_DRAW_BUF_ALIGN);
#define LV_LOG_TRACE_ANIM 0
#endif /*LV_USE_LOG*/
#if LV_USE_SYSMON == 0
#define LV_USE_PERF_MONITOR 0
#define LV_USE_MEM_MONITOR 0
#endif /*LV_USE_SYSMON*/
#ifndef LV_USE_LZ4
#define LV_USE_LZ4 (LV_USE_LZ4_INTERNAL || LV_USE_LZ4_EXTERNAL)
#endif

View File

@ -197,6 +197,7 @@ lv_result_t lv_thread_sync_delete(lv_thread_sync_t * sync)
return LV_RESULT_OK;
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@ -23,17 +23,8 @@
#define SYSMON_REFR_PERIOD_DEF 300 /* ms */
#if defined(LV_USE_PERF_MONITOR) && LV_USE_PERF_MONITOR
#define _USE_PERF_MONITOR 1
#else
#define _USE_PERF_MONITOR 0
#endif
#if defined(LV_USE_MEM_MONITOR) && LV_USE_MEM_MONITOR
#define sysmon_mem LV_GLOBAL_DEFAULT()->sysmon_mem
#define _USE_MEM_MONITOR 1
#else
#define _USE_MEM_MONITOR 0
#endif
/**********************
@ -44,13 +35,13 @@
* STATIC PROTOTYPES
**********************/
#if _USE_PERF_MONITOR
#if LV_USE_PERF_MONITOR
static void perf_update_timer_cb(lv_timer_t * t);
static void perf_observer_cb(lv_observer_t * observer, lv_subject_t * subject);
static void perf_monitor_disp_event_cb(lv_event_t * e);
#endif
#if _USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
static void mem_update_timer_cb(lv_timer_t * t);
static void mem_observer_cb(lv_observer_t * observer, lv_subject_t * subject);
#endif
@ -70,7 +61,7 @@
void _lv_sysmon_builtin_init(void)
{
#if _USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
static lv_mem_monitor_t mem_info;
lv_subject_init_pointer(&sysmon_mem.subject, &mem_info);
sysmon_mem.timer = lv_timer_create(mem_update_timer_cb, SYSMON_REFR_PERIOD_DEF, &mem_info);
@ -79,7 +70,7 @@ void _lv_sysmon_builtin_init(void)
void _lv_sysmon_builtin_deinit(void)
{
#if _USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
lv_timer_delete(sysmon_mem.timer);
#endif
}
@ -97,7 +88,7 @@ lv_obj_t * lv_sysmon_create(lv_display_t * disp)
return label;
}
#if _USE_PERF_MONITOR
#if LV_USE_PERF_MONITOR
void lv_sysmon_show_performance(lv_display_t * disp)
{
@ -124,7 +115,7 @@ void lv_sysmon_hide_performance(lv_display_t * disp)
#endif
#if _USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
void lv_sysmon_show_memory(lv_display_t * disp)
{
@ -148,7 +139,7 @@ void lv_sysmon_hide_memory(lv_display_t * disp)
* STATIC FUNCTIONS
**********************/
#if _USE_PERF_MONITOR
#if LV_USE_PERF_MONITOR
static void perf_monitor_disp_event_cb(lv_event_t * e)
{
@ -275,7 +266,7 @@ static void perf_observer_cb(lv_observer_t * observer, lv_subject_t * subject)
#endif
#if _USE_MEM_MONITOR
#if LV_USE_MEM_MONITOR
static void mem_update_timer_cb(lv_timer_t * t)
{

View File

@ -76,7 +76,6 @@ struct _lv_sysmon_perf_info_t {
/**********************
* GLOBAL PROTOTYPES
**********************/
#if LV_USE_SYSMON
/**
* Create a new system monitor label
@ -117,8 +116,6 @@ void lv_sysmon_hide_memory(lv_display_t * disp);
#endif /*LV_USE_MEM_MONITOR*/
#endif /*LV_USE_SYSMON*/
/**
* Initialize built-in system monitor, such as performance and memory monitor.
*/

View File

@ -182,7 +182,7 @@ void test_arc_click_sustained_from_start_to_end_does_not_set_value_to_max(void)
lv_test_mouse_release();
lv_test_indev_wait(50);
TEST_ASSERT_EQUAL_UINT32(0, event_cnt);
TEST_ASSERT_EQUAL_UINT32(1, event_cnt);
TEST_ASSERT_EQUAL_INT32(lv_arc_get_min_value(arc), lv_arc_get_value(arc));
/* Click close to end angle */