?? os_cpu_c.c
字號:
#ifndef OS_MASTER_FILE
#include "includes.h"
#endif
OS_STK *OSTaskStkInit(void(*task)(void *pd),void* ppdata,OS_STK *ptos,INT16U opt) KCREENTRANT
{
OS_STK *stk;
ppdata = ppdata;
opt = opt; //opt沒被用到,保留此語句防止告警產生
stk = (OS_STK *)ptos; //用戶堆棧最低有效地址
*stk++ = 15; //用戶堆棧長度
*stk++ = (INT16U)task & 0xFF; //任務地址低8位
*stk++ = (INT16U)task >> 8; //任務地址高8位
*stk++ = 0x00; //PSW
*stk++ = 0x0A; //ACC
*stk++ = 0x0B; //B
*stk++ = 0x00; //DPL
*stk++ = 0x00; //DPH
*stk++ = 0x00; //R0
*stk++ = 0x01; //R1
*stk++ = 0x02; //R2
*stk++ = 0x03; //R3
*stk++ = 0x04; //R4
*stk++ = 0x05; //R5
*stk++ = 0x06; //R6
*stk++ = 0x07; //R7
//不用保存SP,任務切換時根據用戶堆棧長度計算得出。
*stk++ = (INT16U) (ptos+MaxStkSize) >> 8; //?C_XBP 仿真堆棧指針高8位
*stk++ = (INT16U) (ptos+MaxStkSize) & 0xFF; //?C_XBP 仿真堆棧指針低8位
return ((OS_STK *)ptos);
}
void OSTaskCreateHook(OS_TCB *ptcb) KCREENTRANT
{
ptcb = ptcb;
}
void OSTaskDelHook(OS_TCB *ptcb) KCREENTRANT
{
ptcb = ptcb;
}
void OSTaskSwHook(void) KCREENTRANT
{
}
void OSTaskIdleHook(void) KCREENTRANT
{
}
void OSTaskStatHook(void) KCREENTRANT
{
}
void OSTimeTickHook(void) KCREENTRANT
{
}
void OSInitHookBegin(void)KCREENTRANT
{
}
void OSInitHookEnd(void) KCREENTRANT
{
}
void OSTCBInitHook(OS_TCB *ptcb) KCREENTRANT
{
ptcb = ptcb;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -