⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_cpu_c.c

📁 UCOS-II2.76在ADI-BF533上的移植.在UCOS-II网站提供的源码基础上修改了几处汇编代码.采用2.76版系统内核移植,在DSP++4.0上调试成功
💻 C
字号:
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                         The Real-Time Kernel
*
*                                       Blackfin specific C language code
*
* File : OS_CPU_C.C
* By   : Ron Territo   ron@territocomputerservices.com
*********************************************************************************************************

Copyright...

This code is placed in the public domain, and can be distributed freely with no restrictions provided that the heading
of each source module file is not modified to remove the credit to the original author.
  
Disclaimer...

This program code is provided "as is". There is no warranty, either expressed or implied as to its fitness for use in
any application. It is provided only as an example of porting the MicroC/OS operating system to the Blackfin processor.
Its use is strictly at the risk of the user. The author will not be liable for any damages direct or consequential related
to the use of this software including, but not limited to loss of profit.

*/

#include "uCOS-II_V2.70\source\ucos_ii.h"
#include <Inc\BF533_EZLite.h>
/****************************************************************************/
//
//  Global Variables
//
/****************************************************************************/



/****************************************************************************/
//
//  Local type definitions.
//
/****************************************************************************/



/*
*********************************************************************************************************
*                                          TASK EXIT HOOK
*
* Description: This function is called when a task exits
*
* Arguments  : none
*
*********************************************************************************************************
*/
void OSTaskExitHook(void)
{
}


/*
*********************************************************************************************************
*                                          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(OS_TCB *ptcb)
{
}

/*
*********************************************************************************************************
*                                           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(OS_TCB *ptcb)
{
}

#if OS_TASK_SW_HOOK_EN
/*
*********************************************************************************************************
*                                           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)
{
}
#endif



/*
*********************************************************************************************************
*                                           TCB Init HOOK
*
* Description: 
*
* Arguments  : pointer to TCB
*********************************************************************************************************
*/

void OSTCBInitHook(OS_TCB *ptcb)
{
}

/*
*********************************************************************************************************
*                                           Init HOOK begin & end
*
* Description: 
*
* Arguments  : pointer to TCB
*********************************************************************************************************
*/

void          OSInitHookBegin(void)
{
}

void          OSInitHookEnd(void)
{
}


/*
*********************************************************************************************************
*                                           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)
{
}


#if OS_TIME_TICK_HOOK_EN
/*
*********************************************************************************************************
*                                               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)
{
}
#endif



/*
*********************************************************************************************************
*                                               IDLE HOOK
*
* Description: This function is called by uC/OS-ii IDLE Task.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
*********************************************************************************************************
*/

void OSTaskIdleHook(void)
{

}





⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -