亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? os_cpu_c.c

?? freescale h12的 OS_CPU_C
?? C
字號(hào):
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                         The Real-Time Kernel
*
*                         (c) Copyright 2002, Jean J. Labrosse, Weston, FL
*                                          All Rights Reserved
*
*
*                                  MC9S12 Metrowerks Banked Memory Model
*                                                 
*
* File         : OS_CPU_C.C
* By           : Eric Shufro
* Port Version : V2.83 and higher)
*********************************************************************************************************
*/

#include  "uCOS_II.H"

/*
*********************************************************************************************************
*                                           LOCALS
*********************************************************************************************************
*/

#if OS_TMR_EN > 0
static  INT16U  OSTmrCtr;
#endif

/*
*********************************************************************************************************
*                                       OS INITIALIZATION HOOK
*                                            (BEGINNING)
*
* Description: This function is called by OSInit() at the beginning of OSInit().
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts should be disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSInitHookBegin (void)
{
#if OS_TMR_EN > 0
    OSTmrCtr = 0;
#endif
}
#endif

/*
*********************************************************************************************************
*                                       OS INITIALIZATION HOOK
*                                               (END)
*
* Description: This function is called by OSInit() at the end of OSInit().
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts should be disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSInitHookEnd (void)
{
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                          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.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTaskCreateHook (OS_TCB *ptcb)
{
#if OS_VIEW_MODULE > 0
    OSView_TaskCreateHook(ptcb);
#else
    (void)ptcb;                        /* Prevent compiler warning                                     */
#endif
}
#endif


/*
*********************************************************************************************************
*                                           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.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTaskDelHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}
#endif

/*
*********************************************************************************************************
*                                             IDLE TASK HOOK
*
* Description: This function is called by the idle task.  This hook has been added to allow you to do  
*              such things as STOP the CPU to conserve power.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts are enabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
void  OSTaskIdleHook (void)
{
}
#endif

/*
*********************************************************************************************************
*                                           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
*********************************************************************************************************
*/

#if OS_CPU_HOOKS_EN > 0 
void  OSTaskStatHook (void)
{
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                        INITIALIZE A TASK'S STACK
*
* Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
*              stack frame of the task being created.  This function is highly processor specific.
*
* Arguments  : task          is a pointer to the task code
*
*              pdata         is a pointer to a user supplied data area that will be passed to the task
*                            when the task first executes.
*
*              ptos          is a pointer to the top of stack.  It is assumed that 'ptos' points to
*                            a 'free' entry on the task stack.  If OS_STK_GROWTH is set to 1 then 
*                            'ptos' will contain the HIGHEST valid address of the stack.  Similarly, if
*                            OS_STK_GROWTH is set to 0, the 'ptos' will contains the LOWEST valid address
*                            of the stack.
*
*              opt           specifies options that can be used to alter the behavior of OSTaskStkInit().
*                            (see uCOS_II.H for OS_TASK_OPT_???).
*
* Returns    : Always returns the location of the new top-of-stack' once the processor registers have
*              been placed on the stack in the proper order.
*
* Note(s)    : 1) XIRQ interrupts are disabled when your task starts executing. You can change this by 
*                 clearing BIT6 in the CCR.
*              2) The STOP instruction is disabled when your task starts executing.  You can change this
*                 by clearing BIT7 in the CCR.
*              3) The other interrupts (i.e. maskable interrupts) are enabled when your task starts
*                 executing.  You can change this by setting BIT4 in the CCR.
*              4) You can change pass the above options in the 'opt' argument.  You MUST only use the
*                 upper 8 bits of 'opt' because the lower bits are reserved by uC/OS-II.  If you make
*                 changes to the code below, you will need to ensure that it doesn't affect the behaviour
*                 of OSTaskIdle() and OSTaskStat().
*              5) Registers are initialized to make them easy to differentiate with a debugger.
*              6) All your tasks are assumed to be in NON-PAGED memory.  However, the tasks can call
*                 functions in PAGED memory and if a context switch occurs, the proper page will be
*                 saved/restored by uC/OS-II.  Page #0 is stored onto the task's stack as a 'dummy'
*                 value.
*********************************************************************************************************
*/

OS_STK *OSTaskStkInit (void (*task)(void *pd), void *p_arg, OS_STK *ptos, INT16U opt)
{
    INT16U *wstk;
    INT8U  *bstk;
 
    opt     = opt;                           /* 'opt' is not used, prevent warning                     */
    wstk    = (INT16U *)ptos;                /* Load stack pointer                                     */
    *--wstk = (INT16U)p_arg;                 /* Simulate call to function with argument                */
    *--wstk = (INT16U)(((INT32U)task) >> 8); /* Return address.  Format: PCH:PCL:PPAGE (cut out PPage) */
    *--wstk = (INT16U)0x2222;                /* Y Register                                             */
    *--wstk = (INT16U)0x1111;                /* X Register                                             */
    *--wstk = (INT16U)0xBBAA;                /* D Register                                             */    
    bstk    = (INT8U *)wstk;                 /* Convert WORD ptr to BYTE ptr to set CCR                */
    *--bstk = (0xC0);                        /* CCR Register (Disable STOP instruction and XIRQ)       */
    *--bstk = (INT8U)task;                   /* Save the PPAGE register                                */
    return ((OS_STK *)bstk);                 /* Return pointer to new top-of-stack                     */   
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                           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).
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTaskSwHook (void)
{
#if OS_VIEW_MODULE > 0
    OSView_TaskSwHook();
#endif
}
#endif

/*
*********************************************************************************************************
*                                           OSTCBInit() HOOK
*
* Description: This function is called by OS_TCBInit() after setting up most of the TCB.
*
* Arguments  : ptcb    is a pointer to the TCB of the task being created.
*
* Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSTCBInitHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                                           /* Prevent Compiler warning                 */
}
#endif


/*
*********************************************************************************************************
*                                               TICK HOOK
*
* Description: This function is called every tick.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTimeTickHook (void)
{
#if OS_VIEW_MODULE > 0
    OSView_TickHook();
#endif

#if OS_TMR_EN > 0
    OSTmrCtr++;
    if (OSTmrCtr >= (OS_TICKS_PER_SEC / OS_TMR_CFG_TICKS_PER_SEC)) {
        OSTmrCtr = 0;
        OSTmrSignal();
    }
#endif
}
#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91美女片黄在线观看91美女| 色一情一乱一乱一91av| 国产精品美女一区二区三区| 欧美日韩高清一区二区三区| 国产精品69毛片高清亚洲| 亚洲午夜日本在线观看| 国产亚洲精久久久久久| 欧美日韩另类一区| 99视频精品免费视频| 国产一区二区主播在线| 亚洲国产精品人人做人人爽| 中文字幕一区视频| 2019国产精品| 欧美一卡二卡三卡| 欧美日韩和欧美的一区二区| jlzzjlzz国产精品久久| 国产真实乱偷精品视频免| 天天色图综合网| 亚洲免费观看视频| 中文字幕在线视频一区| 精品久久久久99| 69堂精品视频| 欧美三级中文字| 色屁屁一区二区| av色综合久久天堂av综合| 国产一二三精品| 国产一区二区三区最好精华液| 三级影片在线观看欧美日韩一区二区| |精品福利一区二区三区| 日本一区二区三级电影在线观看| 日韩精品一区二区三区四区视频 | 欧美va亚洲va在线观看蝴蝶网| 在线观看视频欧美| 色吧成人激情小说| 91老师片黄在线观看| 91免费在线看| 在线亚洲免费视频| 色婷婷av一区| 欧美性一区二区| 欧美挠脚心视频网站| 欧美日韩精品欧美日韩精品| 欧美日韩国产综合一区二区三区| 欧美午夜精品久久久| 欧美视频自拍偷拍| 欧美三级电影在线观看| 欧美日韩高清影院| 欧美一区二区三区视频免费播放| 91精品国产综合久久精品| 欧美理论在线播放| 日韩免费观看高清完整版| 欧美精品一区二区三区在线| 久久婷婷一区二区三区| 国产日韩av一区二区| 国产精品嫩草影院com| 国产精品麻豆网站| 一区二区久久久久| 琪琪久久久久日韩精品| 国产专区综合网| 91亚洲精华国产精华精华液| 欧美视频中文一区二区三区在线观看| 欧美高清dvd| 日韩欧美aaaaaa| 亚洲国产高清不卡| 亚洲激情欧美激情| 五月天一区二区三区| 国模无码大尺度一区二区三区| 国产v日产∨综合v精品视频| 色婷婷亚洲综合| 日韩欧美高清在线| 中文在线一区二区| 亚洲成a人v欧美综合天堂下载| 免费欧美在线视频| 风流少妇一区二区| 在线观看日韩av先锋影音电影院| 日韩一二三区视频| 国产精品免费aⅴ片在线观看| 亚洲成av人片在线观看无码| 国产精品一区二区久激情瑜伽| 91在线精品一区二区| 91精品国产一区二区人妖| 国产亚洲一区二区三区在线观看| 亚洲日本va午夜在线影院| 蜜臀av亚洲一区中文字幕| aaa国产一区| 日韩欧美一区二区免费| 国产精品国产三级国产aⅴ原创 | 精品国产伦一区二区三区观看方式| 国产精品美女一区二区三区| 日韩精品电影在线| 不卡高清视频专区| 日韩视频中午一区| 亚洲欧美韩国综合色| 国内精品免费**视频| 欧美日韩一区三区| 国产精品视频一二三| 免费在线成人网| 色综合天天综合网国产成人综合天| 欧美一级二级三级蜜桃| 亚洲色图另类专区| 国产酒店精品激情| 91精品一区二区三区久久久久久| 亚洲欧洲日韩在线| 国产精品综合av一区二区国产馆| 91视频91自| 久久免费精品国产久精品久久久久| 亚洲国产精品久久艾草纯爱| av影院午夜一区| 久久精品夜色噜噜亚洲aⅴ| 天堂影院一区二区| 欧美亚洲国产一区二区三区va| 中文字幕精品在线不卡| 久久疯狂做爰流白浆xx| 欧美军同video69gay| 一区二区三区成人| 91视频观看免费| 国产精品久久久99| 国产精品中文字幕欧美| 欧美一二三区在线| 香蕉久久夜色精品国产使用方法| 色八戒一区二区三区| 亚洲视频在线一区二区| eeuss国产一区二区三区| 国产清纯美女被跳蛋高潮一区二区久久w| 视频一区欧美精品| 在线播放日韩导航| 午夜av一区二区三区| 欧美中文字幕亚洲一区二区va在线| 亚洲欧美国产77777| 91香蕉视频在线| 亚洲精品中文在线| 99视频有精品| 亚洲免费观看高清在线观看| 91色综合久久久久婷婷| 亚洲图片欧美激情| 99久久99久久久精品齐齐| 国产精品久久久久久妇女6080| 成人av高清在线| 亚洲视频一二三区| 一本一道波多野结衣一区二区| 亚洲精品中文在线观看| 欧美性生交片4| 日韩黄色片在线观看| 欧美一级xxx| 国模无码大尺度一区二区三区| 国产亚洲欧美日韩日本| 波多野结衣亚洲一区| 亚洲视频香蕉人妖| 欧美亚洲一区二区在线观看| 午夜精品久久久久久久久久久| 欧美一区二区免费视频| 精油按摩中文字幕久久| 国产午夜亚洲精品不卡 | 日韩一本二本av| 紧缚奴在线一区二区三区| 久久精品视频网| av中文一区二区三区| 亚洲午夜在线电影| 欧美大黄免费观看| 成人高清av在线| 亚洲一区二区欧美日韩 | 日韩午夜在线观看视频| 国产精品中文字幕欧美| 亚洲日本中文字幕区| 欧美精品自拍偷拍| 国产一区二区网址| 综合激情网...| 欧美一区二区三区四区在线观看| 精品一区二区三区的国产在线播放| 国产女人18水真多18精品一级做| 99精品久久免费看蜜臀剧情介绍| 亚洲国产日韩精品| 久久综合久久综合九色| 色猫猫国产区一区二在线视频| 日本亚洲视频在线| 国产精品三级视频| 欧美精品v日韩精品v韩国精品v| 国产成人综合精品三级| 亚洲线精品一区二区三区| 久久久综合视频| 在线观看国产日韩| 国产老女人精品毛片久久| 一区二区三区久久| 精品国产乱码久久久久久蜜臀| 99精品久久只有精品| 久久精品99国产精品日本| 中文字幕一区二区在线观看| 日韩三级精品电影久久久 | 国产成人午夜精品5599| 午夜精品一区二区三区电影天堂| 国产亚洲精品超碰| 91麻豆精品国产91久久久久| 99re这里只有精品视频首页| 蜜臀久久99精品久久久久宅男| 亚洲特级片在线| 国产午夜精品在线观看| 欧美理论片在线| 色综合久久88色综合天天| 国产精品一二三区在线| 日产欧产美韩系列久久99| 亚洲精品欧美综合四区|