config LV_USE_SYSMON
	bool "System monitor"
	default n
	help
		Periodically collect CPU, FPS and memory statistics and optionally show them in an
		on-screen overlay.

if LV_USE_SYSMON

config LV_SYSMON_PROC_IDLE_AVAILABLE
	bool "Per-process idle measurement"
	default n
	help
		The port provides `lv_os_get_proc_idle_percent` a per-process idle percentage
		in addition to the system-wide one. LVGL provides a default one for linux systems.

config LV_USE_PERF_MONITOR
	bool "Performance monitor"
	default n
	help
		Show the CPU usage and FPS count in a label on the screen.

choice
	prompt "Performance monitor position"
	depends on LV_USE_PERF_MONITOR
	default LV_PERF_MONITOR_ALIGN_BOTTOM_RIGHT

	config LV_PERF_MONITOR_ALIGN_TOP_LEFT
		bool "Top left"
	config LV_PERF_MONITOR_ALIGN_TOP_MID
		bool "Top middle"
	config LV_PERF_MONITOR_ALIGN_TOP_RIGHT
		bool "Top right"
	config LV_PERF_MONITOR_ALIGN_BOTTOM_LEFT
		bool "Bottom left"
	config LV_PERF_MONITOR_ALIGN_BOTTOM_MID
		bool "Bottom middle"
	config LV_PERF_MONITOR_ALIGN_BOTTOM_RIGHT
		bool "Bottom right"
	config LV_PERF_MONITOR_ALIGN_LEFT_MID
		bool "Left middle"
	config LV_PERF_MONITOR_ALIGN_RIGHT_MID
		bool "Right middle"
	config LV_PERF_MONITOR_ALIGN_CENTER
		bool "Center"
endchoice

config LV_USE_PERF_MONITOR_LOG_MODE
	bool "Log performance data"
	depends on LV_USE_PERF_MONITOR
	default n
	help
		Print the performance data to the log instead of showing the on-screen label.

config LV_USE_MEM_MONITOR
	bool "Memory monitor"
	default n
	depends on LV_USE_BUILTIN_MALLOC
	help
		Show the used memory and the memory fragmentation in a label on the screen.

choice
	prompt "Memory monitor position"
	depends on LV_USE_MEM_MONITOR
	default LV_MEM_MONITOR_ALIGN_BOTTOM_LEFT

	config LV_MEM_MONITOR_ALIGN_TOP_LEFT
		bool "Top left"
	config LV_MEM_MONITOR_ALIGN_TOP_MID
		bool "Top middle"
	config LV_MEM_MONITOR_ALIGN_TOP_RIGHT
		bool "Top right"
	config LV_MEM_MONITOR_ALIGN_BOTTOM_LEFT
		bool "Bottom left"
	config LV_MEM_MONITOR_ALIGN_BOTTOM_MID
		bool "Bottom middle"
	config LV_MEM_MONITOR_ALIGN_BOTTOM_RIGHT
		bool "Bottom right"
	config LV_MEM_MONITOR_ALIGN_LEFT_MID
		bool "Left middle"
	config LV_MEM_MONITOR_ALIGN_RIGHT_MID
		bool "Right middle"
	config LV_MEM_MONITOR_ALIGN_CENTER
		bool "Center"
endchoice

config LV_SYSMON_USE_CUSTOM_INCLUDE
	bool "Custom sysmon header"
	default n
	help
	  Include the header given by LV_SYSMON_CUSTOM_INCLUDE to override system
	  monitor macros such as LV_SYSMON_GET_IDLE.

config LV_SYSMON_CUSTOM_INCLUDE
	string "Path to custom sysmon header"
	default ""
	depends on LV_SYSMON_USE_CUSTOM_INCLUDE
	help
	  Optional header to override system monitor idle measurement macros.

	  LV_SYSMON_GET_IDLE
	    Expression returning the CPU idle percentage (0-100) since last call.
	    e.g. my_rtos_get_idle_percent()

	  LV_SYSMON_GET_PROC_IDLE
	    Expression returning per-process idle percentage, if supported by
	    the RTOS. Requires LV_SYSMON_PROC_IDLE_AVAILABLE to be enabled
	    e.g. my_rtos_get_proc_idle_percent()

endif #LV_USE_SYSMON
