Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

void  OSTimeTickHook (void);

File

Called from

Code enabled by

os_cpu_c.c

OSTimeTick() ONLY

N/A

This function is called by OSTimeTick(), which is assumed to be called from an ISR. OSTimeTickHook() is called at the very beginning of OSTimeTick() to give priority to user or port-specific code when the tick interrupt occurs.

If the #define OS_CFG_APP_HOOKS_EN is set to 1 in os_cfg.h, OSTimeTickHook() will call App_OS_TimeTickHook().

OSTimeTickHook() is part of the CPU port code and the function must not be called by the application code. OSTimeTickHook() is actually used by the µC/OS-III port developer.

Arguments

None

Returned Value

None

Notes/Warnings

Do not call this function from the application.

Example

The code below calls an application-specific hook that the application programmer can define. The user can simply set the value of OS_AppTimeTickHookPtr to point to the desired hook function OSTimeTickHook() is called by OSTimeTick() which in turn calls App_OS_TimeTickHook() through the pointer OS_AppTimeTickHookPtr.

  • No labels