1 /**
2  * @file lv_sysmon.h
3  *
4  */
5 
6 #ifndef LV_SYSMON_H
7 #define LV_SYSMON_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "../../misc/lv_timer.h"
18 #include "../../others/observer/lv_observer.h"
19 
20 #if LV_USE_SYSMON
21 
22 #if LV_USE_LABEL == 0
23 #error "lv_sysmon: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL  1) "
24 #endif
25 
26 #if LV_USE_OBSERVER == 0
27 #error "lv_observer: lv_observer is required. Enable it in lv_conf.h (LV_USE_OBSERVER  1) "
28 #endif
29 
30 /*********************
31  *      DEFINES
32  *********************/
33 
34 /**********************
35  *      TYPEDEFS
36  **********************/
37 
38 /**********************
39  * GLOBAL PROTOTYPES
40  **********************/
41 
42 /**
43  * Create a new system monitor label
44  * @param disp      create the sys. mon. on this display's system layer
45  * @return          the create label
46  */
47 lv_obj_t * lv_sysmon_create(lv_display_t * disp);
48 
49 #if LV_USE_PERF_MONITOR
50 
51 /**
52  * Show system performance monitor: CPU usage and FPS count
53  * @param disp      target display, NULL: use the default displays
54  */
55 void lv_sysmon_show_performance(lv_display_t * disp);
56 
57 /**
58  * Hide system performance monitor
59  * @param disp      target display, NULL: use the default
60  */
61 void lv_sysmon_hide_performance(lv_display_t * disp);
62 
63 #endif /*LV_USE_PERF_MONITOR*/
64 
65 #if LV_USE_MEM_MONITOR
66 
67 /**
68  * Show system memory monitor: used memory and the memory fragmentation
69  * @param disp      target display, NULL: use the default displays
70  */
71 void lv_sysmon_show_memory(lv_display_t * disp);
72 
73 /**
74  * Hide system memory monitor
75  * @param disp      target display, NULL: use the default displays
76  */
77 void lv_sysmon_hide_memory(lv_display_t * disp);
78 
79 #endif /*LV_USE_MEM_MONITOR*/
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_H*/
92