📄 os_cpu_c.c
字号:
/****************************************Copyright (c)****************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
**
** http://www.embedtools.com
**
**--------------File Info---------------------------------------------------------------------------------
** File Name: os_cpu_c.c
** Last modified Date: 2007.01.18
** Last Version: 1.0
** Description: The C functions that a uC/OS-II port requires uC/OS-II移植所需要的C函数
**
**--------------------------------------------------------------------------------------------------------
** Created By: Steven Zhou 周绍刚
** Created date: 2007.01.18
** Version: 1.0
** Descriptions: The original version 初始版本
**
**--------------------------------------------------------------------------------------------------------
** Modified by: Ni Likao
** Modified date: 2007.10.29
** Version: 1.1
** Description: The second version 第二版
**
*********************************************************************************************************/
#define OS_CPU_GLOBALS
#include <includes.h>
/********************************************************************************************************
Local variables 局部变量
********************************************************************************************************/
#if OS_TMR_EN > 0
static INT16U OSTmrCtr;
#endif
/*********************************************************************************************************
** Function name: OSInitHookBegin
** Descriptions: The hook function called by OSInit() at the beginning of OSInit()
** OSInit()函数刚开始执行时调用的钩子函数
** Input parameters: None 无
** Output parameters: None 无
** Returned value: None 无
** Created by: Steven Zhou 周绍刚
** Created Date: 2007.01.18
**--------------------------------------------------------------------------------------------------------
** Modified by: Ni Likao 倪力考
** Modified date: 2007.10.29
**-------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void OSInitHookBegin (void)
{
#if OS_TMR_EN > 0
OSTmrCtr = 0;
#endif
}
#endif
/*********************************************************************************************************
** Function name: OSInitHookEnd
** Descriptions: The hook function called by OSInit() at the end of OSInit()
** OSInit()函数结束前调用的钩子函数
** Input parameters: None 无
** Output parameters: None 无
** Returned value: None 无
** Created by: Steven Zhou 周绍刚
** Created Date: 2007.01.18
**--------------------------------------------------------------------------------------------------------
** Modified by: Ni Likao 倪力考
** Modified date: 2007.10.29
**-------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void OSInitHookEnd (void)
{
}
#endif
/*********************************************************************************************************
** Function name: OSTaskCreateHook
** Descriptions: The hook function called when a task is created
** 初始化任务时调用的钩子函数
** Input parameters: ptcb
** Output parameters: None 无
** Returned value: None 无
** Created by: Steven Zhou 周绍刚
** Created Date: 2007.01.18
**--------------------------------------------------------------------------------------------------------
** Modified by: Ni Likao 倪力考
** Modified date: 2007.10.29
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#if OS_CPU_HOOKS_EN > 0
void OSTaskCreateHook (OS_TCB *ptcb)
{
(void)ptcb; /* Prevent compiler warning */
/* 防止编译警告 */
}
#endif
/*********************************************************************************************************
** Function name: OSTaskDelHook
** Descriptions: The hook function called when a task is deleted
** 删除任务时调用的钩子函数
** Input parameters: ptcb
** Output parameters: None 无
** Returned value: None 无
** Created by: Steven Zhou 周绍刚
** Created Date: 2007.01.18
**--------------------------------------------------------------------------------------------------------
** Modified by: Ni Likao 倪力考
** Modified date: 2007.10.29
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#if OS_CPU_HOOKS_EN > 0
void OSTaskDelHook (OS_TCB *ptcb)
{
(void)ptcb; /* Prevent compiler warning */
/* 防止编译警告 */
}
#endif
/*********************************************************************************************************
** Function name: OSTaskIdleHook
** Descriptions: The hook function called by the idle task
** 空闲任务调用的钩子函数
** Input parameters: None 无
** Output parameters: None 无
** Returned value: None 无
** Created by: Steven Zhou 周绍刚
** Created Date: 2007.01.18
**--------------------------------------------------------------------------------------------------------
** Modified by: Ni Likao 倪力考
** Modified date: 2007.10.29
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
void OSTaskIdleHook (void)
{
}
#endif
/*********************************************************************************************************
** Function name: OSTaskStatHook
** Descriptions: The hook function called every second by the statistics task
** 统计任务每秒钟调用的钩子函数
** Input parameters: None 无
** Output parameters: None 无
** Returned value: None 无
** Created by: Steven Zhou 周绍刚
** Created Date: 2007.01.18
**--------------------------------------------------------------------------------------------------------
** Modified by: Ni Likao 倪力考
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -