Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 3.05
void  OSStatTaskCPUUsageInit (OS_ERR *p_err)

...

File

...

Called from

...

Code enabled by

...

os_stat.c

...

Startup code only

...

Description

OSStatTaskCPUUsageInit() determines  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

Always returns this valueCounter 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

Example Usage