📄 os_cpu_c.c
字号:
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
}
/*********************************************************************************************************\
* TCB INITIALISATION HOOK *
* *
* Description: This function is called when a TCB is initialised. *
* *
* Arguments : ptcb is a pointer to the task control block of the task being created. *
* *
* Note(s) : 1) Interrupts are disabled during this call. *
\*********************************************************************************************************/
void OSTCBInitHook(pOS_TCB ptcb)
{
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
ptcb = ptcb; /* Prevent compiler warning */
}
/*********************************************************************************************************\
* TASK IDLE HOOK *
* *
* Description: This function is called by the idle task. *
* *
* Arguments : void *
\*********************************************************************************************************/
void OSTaskIdleHook(void)
{
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
}
#if OS_CPU_HOOKS_EN
/*********************************************************************************************************\
* TASK CREATION HOOK *
* *
* Description: This function is called when a task is created. *
* *
* Arguments : ptcb is a pointer to the task control block of the task being created. *
* *
* Note(s) : 1) Interrupts are disabled during this call. *
\*********************************************************************************************************/
void OSTaskCreateHook(pOS_TCB ptcb)
{
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
ptcb = ptcb; /* Prevent compiler warning */
}
/*********************************************************************************************************\
* TASK DELETION HOOK *
* *
* Description: This function is called when a task is deleted. *
* *
* Arguments : ptcb is a pointer to the task control block of the task being deleted. *
* *
* Note(s) : 1) Interrupts are disabled during this call. *
\*********************************************************************************************************/
void OSTaskDelHook(pOS_TCB ptcb)
{
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
ptcb = ptcb; /* Prevent compiler warning */
}
/*********************************************************************************************************\
* TASK SWITCH HOOK *
* *
* Description: This function is called when a task switch is performed. This allows you to perform other *
* operations during a context switch. *
* *
* Arguments : none *
* *
* Note(s) : 1) Interrupts are disabled during this call. *
* 2) It is assumed that the global pointer 'OSTCBHighRdy' points to the TCB of the task that *
* will be 'switched in' (i.e. the highest priority task) and, 'OSTCBCur' points to the *
* task being switched out (i.e. the preempted task). *
\*********************************************************************************************************/
void OSTaskSwHook(void)
{
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
}
/*********************************************************************************************************\
* STATISTIC TASK HOOK *
* *
* Description: This function is called every second by uC/OS-II's statistics task. This allows your *
* application to add functionality to the statistics task. *
* *
* Arguments : none *
\*********************************************************************************************************/
void OSTaskStatHook (void)
{
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
}
/*********************************************************************************************************\
* TICK HOOK *
* *
* Description: This function is called every tick. *
* *
* Arguments : none *
* *
* Note(s) : 1) Interrupts may or may not be ENABLED during this call. *
\*********************************************************************************************************/
void OSTimeTickHook (void)
{
/*<---[ Variables used in this function: ]-------------------------------------------------------------->*/
/*<---[ End of variable declaration ]------------------------------------------------------------------->*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -