1 /** 2 * @file lv_sysmon_private.h 3 * 4 */ 5 6 #ifndef LV_SYSMON_PRIVATE_H 7 #define LV_SYSMON_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "lv_sysmon.h" 18 19 #if LV_USE_SYSMON 20 21 /********************* 22 * DEFINES 23 *********************/ 24 25 /********************** 26 * TYPEDEFS 27 **********************/ 28 29 struct _lv_sysmon_backend_data_t { 30 lv_subject_t subject; 31 lv_timer_t * timer; 32 }; 33 34 #if LV_USE_PERF_MONITOR 35 struct _lv_sysmon_perf_info_t { 36 struct { 37 bool inited; 38 uint32_t refr_start; 39 uint32_t refr_interval_sum; 40 uint32_t refr_elaps_sum; 41 uint32_t refr_cnt; 42 uint32_t render_start; 43 uint32_t render_elaps_sum; /*Contains the flush time too*/ 44 uint32_t render_cnt; 45 uint32_t flush_in_render_start; 46 uint32_t flush_in_render_elaps_sum; 47 uint32_t flush_not_in_render_start; 48 uint32_t flush_not_in_render_elaps_sum; 49 uint32_t last_report_timestamp; 50 uint32_t render_in_progress : 1; 51 } measured; 52 53 struct { 54 uint32_t fps; 55 uint32_t cpu; 56 uint32_t refr_avg_time; 57 uint32_t render_avg_time; /**< Pure rendering time without flush time*/ 58 uint32_t flush_avg_time; /**< Pure flushing time without rendering time*/ 59 uint32_t cpu_avg_total; 60 uint32_t fps_avg_total; 61 uint32_t run_cnt; 62 } calculated; 63 64 }; 65 #endif 66 67 /********************** 68 * GLOBAL PROTOTYPES 69 **********************/ 70 71 /** 72 * Initialize built-in system monitor, such as performance and memory monitor. 73 */ 74 void lv_sysmon_builtin_init(void); 75 76 /** 77 * DeInitialize built-in system monitor, such as performance and memory monitor. 78 */ 79 void lv_sysmon_builtin_deinit(void); 80 81 /********************** 82 * MACROS 83 **********************/ 84 85 #endif /* LV_USE_SYSMON */ 86 87 #ifdef __cplusplus 88 } /*extern "C"*/ 89 #endif 90 91 #endif /*LV_SYSMON_PRIVATE_H*/ 92