feat(freertos): add functions to better measure the CPU usage (#6619)
This commit is contained in:
committed by
GitHub
parent
b78a4de898
commit
f8e0932316
@@ -77,6 +77,29 @@ typedef struct {
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Set it for `traceTASK_SWITCHED_IN()` as
|
||||
* `lv_freertos_task_switch_in(pxCurrentTCB->pcTaskName)`
|
||||
* to save the start time stamp of a task
|
||||
* @param name the name of the which is switched in
|
||||
*/
|
||||
void lv_freertos_task_switch_in(const char * name);
|
||||
|
||||
/**
|
||||
* Set it for `traceTASK_SWITCHED_OUT()` as
|
||||
* `lv_freertos_task_switch_out()`
|
||||
* to save finish time stamp of a task
|
||||
*/
|
||||
void lv_freertos_task_switch_out(void);
|
||||
|
||||
/**
|
||||
* Set it for `LV_SYSMON_GET_IDLE` to show the CPU usage
|
||||
* as reported based the usage of FreeRTOS's idle task
|
||||
* If it's important when a GPU is used.
|
||||
* @return the idle percentage since the last call
|
||||
*/
|
||||
uint32_t lv_os_get_idle_percent(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
Reference in New Issue
Block a user