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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? os_cpu_c.c

?? uCOS-II example for MC9S12DPxxx
?? C
字號:
/*
*********************************************************************************************************
*                                               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_APP_HOOKS_EN > 0
    App_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)
{
#if OS_APP_HOOKS_EN > 0
    App_TaskDelHook(ptcb);
#else
    (void)ptcb;                                                         /* Prevent compiler warning                                 */
#endif
}
#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)
{
#if OS_APP_HOOKS_EN > 0
    App_TaskIdleHook();
#endif
}
#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)
{
#if OS_APP_HOOKS_EN > 0
    App_TaskStatHook();
#endif
}
#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_APP_HOOKS_EN > 0
    App_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)
{
#if OS_APP_HOOKS_EN > 0
    App_TCBInitHook(ptcb);
#else
    (void)ptcb;                                                         /* Prevent compiler warning                                 */
#endif
}
#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_APP_HOOKS_EN > 0
    App_TimeTickHook();
#endif

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产wwwccc36天堂| 日本丶国产丶欧美色综合| 欧美精品九九99久久| 一区二区三区在线看| 日本福利一区二区| 亚洲gay无套男同| 欧美区视频在线观看| 免费人成在线不卡| 亚洲精品一区在线观看| 成人免费av网站| 成人免费一区二区三区视频 | 亚洲电影中文字幕在线观看| 91.com在线观看| 国产乱妇无码大片在线观看| 亚洲欧美视频一区| 欧美一区二区国产| 色噜噜狠狠成人中文综合| 婷婷久久综合九色国产成人| www一区二区| 欧美性感一区二区三区| 久久99九九99精品| 最新中文字幕一区二区三区| 日韩一级高清毛片| 色综合一个色综合| 国产福利一区二区三区视频在线| 日韩一区在线播放| 欧美大片顶级少妇| 91理论电影在线观看| 狠狠色丁香久久婷婷综合_中| 亚洲女爱视频在线| 综合久久综合久久| 国产性天天综合网| 久久婷婷综合激情| 欧美一区二区三区视频免费 | 日韩一级二级三级精品视频| 不卡一区二区在线| 国产电影一区二区三区| 免费高清在线视频一区·| 一区二区国产视频| 亚洲精品乱码久久久久久黑人| 日本一区二区久久| 久久精品视频一区| 久久久av毛片精品| 久久精品视频一区| 国产精品久久久久影院老司| 久久久久9999亚洲精品| 久久久久久久电影| 国产精品久久久久天堂| 亚洲国产高清在线| 国产精品久久久久久久岛一牛影视 | 色av成人天堂桃色av| 欧美在线观看视频一区二区| 色综合久久综合| 欧美日韩一区二区三区视频| 欧美日韩午夜在线视频| 在线播放中文字幕一区| 欧美电影免费观看高清完整版| 欧美一区二区三区四区在线观看| 欧美一区欧美二区| 久久综合九色综合久久久精品综合 | 国产日产欧美一区| 亚洲欧美日韩国产综合| 亚洲高清一区二区三区| 激情综合色综合久久| 国产91丝袜在线观看| 在线免费观看不卡av| 久久人人爽人人爽| 午夜视频在线观看一区| 国产精品一区久久久久| 91一区一区三区| 日韩免费看的电影| 亚洲午夜影视影院在线观看| 国产精品一区二区久激情瑜伽| 欧美日免费三级在线| 久久精品夜色噜噜亚洲a∨| 亚洲成av人片在线观看无码| 国产精品一二三四五| 欧美无乱码久久久免费午夜一区| 久久午夜免费电影| 日韩av网站免费在线| 在线视频国内一区二区| 中文字幕不卡在线播放| 青青草国产成人99久久| 在线看一区二区| 亚洲美女精品一区| 欧美成人精品3d动漫h| 日韩精品亚洲一区二区三区免费| 色综合欧美在线| 亚洲欧洲日产国码二区| av午夜一区麻豆| 中文字幕亚洲欧美在线不卡| 成人激情小说乱人伦| 亚洲欧美在线观看| 色哟哟一区二区三区| 亚洲午夜久久久久中文字幕久| www.欧美.com| 亚洲激情成人在线| 欧美日韩免费高清一区色橹橹 | 中文在线一区二区| 99riav一区二区三区| 亚洲欧美在线视频| 欧美体内she精高潮| 日韩福利电影在线观看| 久久一区二区视频| 成人黄色在线网站| 亚洲成人精品影院| 欧美成人三级电影在线| 成人黄色软件下载| 亚洲第一二三四区| 日韩久久精品一区| 成人激情免费电影网址| 一区二区激情小说| 久久久久亚洲蜜桃| 欧美三级日韩三级| 国产一级精品在线| 天天色天天爱天天射综合| 久久亚区不卡日本| 欧美调教femdomvk| 成人av电影免费在线播放| 亚洲人成在线观看一区二区| 日韩精品中文字幕一区| av一本久道久久综合久久鬼色| 日韩电影在线观看一区| 亚洲欧美另类图片小说| 久久久久久久久97黄色工厂| 91精品中文字幕一区二区三区| 成人性视频网站| 精品一区二区在线视频| 日韩综合在线视频| 亚洲精品国产精品乱码不99| 久久综合久久99| 日韩精品专区在线| 日韩欧美一区二区不卡| 欧美三级在线视频| 精品视频在线看| 欧美亚洲国产一区二区三区va | 欧美在线免费观看视频| 色国产精品一区在线观看| 成人免费va视频| av成人动漫在线观看| 国产麻豆成人精品| www.欧美日韩| 91福利资源站| 欧美三级电影网| 欧美电影影音先锋| 91精品黄色片免费大全| 欧美疯狂性受xxxxx喷水图片| 欧美日韩免费视频| 日韩欧美国产精品一区| 26uuu成人网一区二区三区| 欧美成人vr18sexvr| 精品蜜桃在线看| 国产目拍亚洲精品99久久精品| 国产亚洲短视频| 亚洲免费资源在线播放| 亚洲国产精品久久人人爱蜜臀| 亚洲国产日韩精品| 国内一区二区在线| 9人人澡人人爽人人精品| 在线中文字幕不卡| 精品免费视频一区二区| 亚洲色欲色欲www在线观看| 日韩国产在线一| 国产精品一区在线| 欧美日韩国产成人在线91| 亚洲精品在线免费播放| 亚洲啪啪综合av一区二区三区| 亚洲国产一区二区三区青草影视| 麻豆一区二区99久久久久| 99国产精品视频免费观看| 91精品国产综合久久久久久漫画| 欧美国产丝袜视频| 久久精品国产秦先生| 一本一本久久a久久精品综合麻豆| 日韩欧美精品在线视频| 亚洲三级免费电影| 国产不卡在线播放| 69堂亚洲精品首页| 亚洲精品国产第一综合99久久| 国产麻豆成人精品| 国产婷婷色一区二区三区| 久久国内精品自在自线400部| 日本二三区不卡| 亚洲免费观看高清完整版在线 | 精品一区二区三区免费| 日韩一级欧美一级| 日韩国产欧美三级| 欧美精品在欧美一区二区少妇| 亚洲精品高清在线| 99精品视频一区| 亚洲毛片av在线| 欧美日韩黄视频| 日本不卡免费在线视频| 欧美精品乱码久久久久久| 日本一区中文字幕| 精品va天堂亚洲国产| 国产酒店精品激情| 久久综合色鬼综合色| 东方欧美亚洲色图在线| 国产精品成人免费精品自在线观看|