void OSTimeTickHook (void);
File |
Called from |
Code enabled by |
|
|
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
.