Description
OSStatTaskCPUUsageInit()
determines the maximum value that a 32-bit counter can reach when no other task is executing. This function must be called when only one task is created in the application and when multitasking has started. This function must be called from the first and only task created by the application.
Files
os.h/os_stat.c
Prototype
Arguments
p_err
is a pointer to a variable used to hold an error code:
OS_ERR_NONE
Counter maximum value obtained.
OS_ERR_OS_NOT_RUNNING
If OS_CFG_INVALID_OS_CALLS_CHK_EN
is set to DEF_ENABLED
in os_cfg.h
: if µC/OS-III is not running yet.
Returned Value
None
Required Configuration
OS_CFG_TASK_STAT_EN
must be enabled in os_cfg.h
. Refer to µC-OS-III Configuration Manual.
Callers
Application.
Notes/Warnings
None