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

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

?? os_cpu_c.c

?? 我現在需要看幾個論文。。今年馬上畢業。。急著用
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*
*                          (c) Copyright 1992-2003, Jean J. Labrosse, Weston, FL
*                                           All Rights Reserved
*                                      MC9S12DP256 Specific code
*                                       (MetroWerks C/C++ V4.2)
*
*
* File         : OS_CPU_C.C
* By   : Jean J. Labrosse
* Ported to MC9S12DP256 by Abderrahmane Assal
*********************************************************************************************************
*/

#include "includes.h"
/*
********************************************************************************************************************
*                                        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) Tasks do not have to be in NON-PAGED memory.That is why I added an extra byte in every task's 
*				  stack to save the PPAGE register that locate the memory page where the task is located. If a 
*                 context switch occurs, the proper page will be saved/restored by uC/OS-II.  This done automatically
*                 by the hardware provided that we add the option -CpPPAGE=0x30 as a compiler argument.  
*           
**********************************************************************************************************************
*/

void *OSTaskStkInit (void (*task)(void *pd), void *pdata, void *ptos, INT16U opt)
{
    INT16U *wstk;
    INT8U  *bstk;
	INT8U regPage;						/* regPage is used to save the PAGE register                   */
    INT16U *OffsetAddress;
    opt     = opt;                     /* 'opt' is not used, prevent warning                           */
    wstk    = (INT16U *)ptos;          /* Load stack pointer                                           */
    *--wstk = (INT16U)pdata;           /* Simulate call to function with argument                      */
	OffsetAddress = (INT16U*)&task;
	regPage = (INT8U)task;
    *--wstk = (INT16U)*OffsetAddress;
    *--wstk = (INT16U)*OffsetAddress;            /* Put pointer to task   on top of stack                        */

    *--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 = 0x80;                    /* CCR Register (Disable STOP instruction)                      */
    #if defined( __BANKED__) || defined(__LARGE__)
    *--bstk = regPage;  			   /* Save the PPAGE register in case of banked memory model (see note 6)      */                   
    #endif                  
            return ((void *)bstk);             /* Return pointer to new top-of-stack                           */
}

/*$PAGE*/

/*
*********************************************************************************************************
*                                       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)
{
}
#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)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}
#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)
{
//asm stop;

}
#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

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



/********************************************************************************************************
;                                  SAVE THE CCR AND DISABLE INTERRUPTS
;                                                  &
;                                              RESTORE CCR
;
; Description : These function implements OS_CRITICAL_METHOD #3 
;
; Arguments   : The function prototypes for the two functions are:
;               1) OS_CPU_SR  OSCPUSaveSR(void)
;                             where OS_CPU_SR is the contents of the CCR register prior to disabling
;                             interrupts.
;               2) void       OSCPURestoreSR(OS_CPU_SR os_cpu_sr);
;                             'os_cpu_sr' the the value of the CCR to restore.
;
; Note(s)     : 1) It's assumed that the compiler uses the B register to pass a single 8-bit argument
;                  to and from an assembly language function.
;********************************************************************************************************/
void OSCPUSaveSR(OS_CPU_SR os_cpu_sr) 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品欧美日韩精品| 国产二区国产一区在线观看| 99在线精品视频| 亚洲天天做日日做天天谢日日欢| 色视频欧美一区二区三区| 日韩av在线播放中文字幕| 久久影视一区二区| 国产精品一卡二卡| 综合电影一区二区三区 | 美脚の诱脚舐め脚责91| 国产高清精品网站| 欧美日韩成人一区二区| 亚洲乱码一区二区三区在线观看| 丝袜亚洲另类丝袜在线| 久久精品男人天堂av| 成人av在线一区二区三区| 久久日一线二线三线suv| 一区二区高清免费观看影视大全| 日韩—二三区免费观看av| 国产精品亚洲视频| 欧美午夜一区二区| 精品少妇一区二区三区在线播放| 亚洲人成7777| 成人国产精品免费网站| 蜜桃视频第一区免费观看| 亚洲欧美激情一区二区| 精品国产精品网麻豆系列| 91最新地址在线播放| 国产精品亚洲第一| 三级在线观看一区二区| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲欧洲另类国产综合| 欧美一区二区人人喊爽| 色综合久久综合网欧美综合网| 国产在线视频一区二区三区| 天天综合日日夜夜精品| 亚洲激情五月婷婷| 欧美国产激情一区二区三区蜜月| 日韩一区二区三区在线视频| 欧美亚洲国产一区二区三区| 99re成人在线| 成人精品视频一区二区三区尤物| 激情综合五月天| 蜜臀av性久久久久av蜜臀妖精| 亚洲成人777| 亚洲午夜精品17c| 日韩理论电影院| 日韩一区欧美一区| 国产精品天美传媒| 国产午夜亚洲精品理论片色戒 | 欧美日韩国产小视频在线观看| 成人福利视频在线看| 国产一区二区剧情av在线| 蜜桃久久av一区| 蜜臀av国产精品久久久久| 天堂一区二区在线免费观看| 亚洲成a天堂v人片| 一区二区久久久久久| 一区二区三区中文字幕电影| 国产精品久久毛片| 日韩理论片在线| 亚洲综合图片区| 亚洲一区二区在线观看视频| 一区二区成人在线视频| 亚洲午夜在线视频| 亚洲国产精品久久一线不卡| 日韩中文字幕亚洲一区二区va在线 | 国产麻豆欧美日韩一区| 日韩av一二三| 久久精品国产精品亚洲红杏| 国产一区二区三区免费看 | 国产欧美1区2区3区| 国产三级一区二区三区| 日本一区二区三区dvd视频在线| 久久久久久久电影| 国产亚洲一区二区三区| 亚洲激情av在线| 美国毛片一区二区| 99视频在线精品| 在线综合+亚洲+欧美中文字幕| 久久精品一区蜜桃臀影院| 亚洲精品高清在线| 蜜芽一区二区三区| av激情亚洲男人天堂| 91精品国产麻豆国产自产在线 | 国产91综合网| av中文字幕一区| 51精品秘密在线观看| 国产精品污网站| 亚洲成人精品一区二区| 国产一区二区三区美女| 欧美亚洲自拍偷拍| 国产三级欧美三级日产三级99| 亚洲一区二区美女| 丁香六月综合激情| 欧美一二三四区在线| 亚洲欧美日韩一区二区| 国产精品一区三区| 91精品国产综合久久蜜臀| 国产精品情趣视频| 精品一区二区三区免费视频| 日本高清不卡aⅴ免费网站| 久久午夜免费电影| 午夜精品一区二区三区三上悠亚 | 国产乱妇无码大片在线观看| 欧美日韩在线免费视频| 国产精品久久777777| 精品午夜一区二区三区在线观看| 在线免费不卡视频| 国产精品久久网站| 国产精品自拍毛片| 日韩精品一区二区三区swag| 亚洲一区二区三区中文字幕| 波多野结衣在线一区| 国产亚洲一区字幕| 国产精品一区二区三区乱码| 91麻豆精品国产自产在线| 亚洲午夜成aⅴ人片| 91在线免费视频观看| 欧美激情在线一区二区三区| 国产呦精品一区二区三区网站| 欧美一区二区视频观看视频| 亚洲成人在线观看视频| 91视频国产观看| 自拍偷在线精品自拍偷无码专区| 国产成人精品影院| 国产色产综合产在线视频| 国产一区二区三区黄视频| 日韩美一区二区三区| 免费观看在线色综合| 日韩欧美中文字幕公布| 免费一级片91| 日韩精品影音先锋| 国内外精品视频| 久久久午夜电影| 国产精品18久久久久久久久久久久| 日韩一区和二区| 久久99国内精品| 精品久久久久久久人人人人传媒 | 婷婷开心激情综合| 91精品国产综合久久精品麻豆| 午夜成人免费视频| 91精品国产麻豆| 韩日欧美一区二区三区| 国产欧美视频一区二区三区| 成人午夜视频网站| 亚洲色图制服丝袜| 色婷婷亚洲精品| 婷婷久久综合九色国产成人| 欧美一级片在线| 激情文学综合丁香| 国产精品久久久久久久久免费丝袜| av成人老司机| 亚洲国产精品影院| 日韩三级精品电影久久久| 精品写真视频在线观看| 国产精品午夜电影| 在线亚洲高清视频| 免费成人小视频| 国产日韩v精品一区二区| 99久久综合精品| 婷婷成人激情在线网| 久久午夜电影网| 91在线视频观看| 日本最新不卡在线| 国产亚洲欧美日韩俺去了| 99在线热播精品免费| 日韩综合小视频| 国产欧美一区二区三区在线老狼| 久久久亚洲精品石原莉奈| 免费人成精品欧美精品 | 精品视频123区在线观看| 日本视频一区二区三区| 久久久久国产免费免费| 91免费看`日韩一区二区| 亚洲国产aⅴ成人精品无吗| 欧美va亚洲va| 色婷婷精品久久二区二区蜜臂av | 一区二区三区在线视频播放 | 久久久亚洲精品石原莉奈| 色噜噜狠狠成人网p站| 精油按摩中文字幕久久| 亚洲视频电影在线| 337p日本欧洲亚洲大胆精品| 91色婷婷久久久久合中文| 精品影院一区二区久久久| 玉米视频成人免费看| 久久精品一区二区| 欧美精品久久99久久在免费线| 高清在线观看日韩| 免费精品视频在线| 亚洲伊人伊色伊影伊综合网| 国产清纯美女被跳蛋高潮一区二区久久w| 欧美色手机在线观看| 国产成人亚洲综合a∨猫咪| 日本在线不卡视频| 亚洲欧美日韩国产中文在线| 久久精品一区二区三区不卡| 91麻豆精品久久久久蜜臀| 色综合中文综合网|