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

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

?? ucos ii v2.9 ?

?? uCOSII_V2.9
?? 9 ?
字號:
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*                                             TIME MANAGEMENT
*
*                              (c) Copyright 1992-2009, Micrium, Weston, FL
*                                           All Rights Reserved
*
* File    : OS_TIME.C
* By      : Jean J. Labrosse
* Version : V2.91
*
* LICENSING TERMS:
* ---------------
*   uC/OS-II is provided in source form for FREE evaluation, for educational use or for peaceful research.
* If you plan on using  uC/OS-II  in a commercial product you need to contact Micri祄 to properly license
* its use in your product. We provide ALL the source code for your convenience and to help you experience
* uC/OS-II.   The fact that the  source is provided does  NOT  mean that you can use it without  paying a
* licensing fee.
*********************************************************************************************************
*/

#ifndef  OS_MASTER_FILE
#include <ucos_ii.h>
#endif

/*
*********************************************************************************************************
*                                       DELAY TASK 'n' TICKS
*
* Description: This function is called to delay execution of the currently running task until the
*              specified number of system ticks expires.  This, of course, directly equates to delaying
*              the current task for some time to expire.  No delay will result If the specified delay is
*              0.  If the specified delay is greater than 0 then, a context switch will result.
*
* Arguments  : ticks     is the time delay that the task will be suspended in number of clock 'ticks'.
*                        Note that by specifying 0, the task will not be delayed.
*
* Returns    : none
*********************************************************************************************************
*/

void  OSTimeDly (INT32U ticks)
{
    INT8U      y;
#if OS_CRITICAL_METHOD == 3u                     /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0u;
#endif



    if (OSIntNesting > 0u) {                     /* See if trying to call from an ISR                  */
        return;
    }
    if (OSLockNesting > 0u) {                    /* See if called with scheduler locked                */
        return;
    }
    if (ticks > 0u) {                            /* 0 means no delay!                                  */
        OS_ENTER_CRITICAL();
        y            =  OSTCBCur->OSTCBY;        /* Delay current task                                 */
        OSRdyTbl[y] &= (OS_PRIO)~OSTCBCur->OSTCBBitX;
        if (OSRdyTbl[y] == 0u) {
            OSRdyGrp &= (OS_PRIO)~OSTCBCur->OSTCBBitY;
        }
        OSTCBCur->OSTCBDly = ticks;              /* Load ticks in TCB                                  */
        OS_EXIT_CRITICAL();
        OS_Sched();                              /* Find next task to run!                             */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                     DELAY TASK FOR SPECIFIED TIME
*
* Description: This function is called to delay execution of the currently running task until some time
*              expires.  This call allows you to specify the delay time in HOURS, MINUTES, SECONDS and
*              MILLISECONDS instead of ticks.
*
* Arguments  : hours     specifies the number of hours that the task will be delayed (max. is 255)
*              minutes   specifies the number of minutes (max. 59)
*              seconds   specifies the number of seconds (max. 59)
*              ms        specifies the number of milliseconds (max. 999)
*
* Returns    : OS_ERR_NONE
*              OS_ERR_TIME_INVALID_MINUTES
*              OS_ERR_TIME_INVALID_SECONDS
*              OS_ERR_TIME_INVALID_MS
*              OS_ERR_TIME_ZERO_DLY
*              OS_ERR_TIME_DLY_ISR
*
* Note(s)    : The resolution on the milliseconds depends on the tick rate.  For example, you can't do
*              a 10 mS delay if the ticker interrupts every 100 mS.  In this case, the delay would be
*              set to 0.  The actual delay is rounded to the nearest tick.
*********************************************************************************************************
*/

#if OS_TIME_DLY_HMSM_EN > 0u
INT8U  OSTimeDlyHMSM (INT8U   hours,
                      INT8U   minutes,
                      INT8U   seconds,
                      INT16U  ms)
{
    INT32U ticks;


    if (OSIntNesting > 0u) {                     /* See if trying to call from an ISR                  */
        return (OS_ERR_TIME_DLY_ISR);
    }
    if (OSLockNesting > 0u) {                    /* See if called with scheduler locked                */
        return (OS_ERR_SCHED_LOCKED);
    }
#if OS_ARG_CHK_EN > 0u
    if (hours == 0u) {
        if (minutes == 0u) {
            if (seconds == 0u) {
                if (ms == 0u) {
                    return (OS_ERR_TIME_ZERO_DLY);
                }
            }
        }
    }
    if (minutes > 59u) {
        return (OS_ERR_TIME_INVALID_MINUTES);    /* Validate arguments to be within range              */
    }
    if (seconds > 59u) {
        return (OS_ERR_TIME_INVALID_SECONDS);
    }
    if (ms > 999u) {
        return (OS_ERR_TIME_INVALID_MS);
    }
#endif
                                                 /* Compute the total number of clock ticks required.. */
                                                 /* .. (rounded to the nearest tick)                   */
    ticks = ((INT32U)hours * 3600uL + (INT32U)minutes * 60uL + (INT32U)seconds) * OS_TICKS_PER_SEC
          + OS_TICKS_PER_SEC * ((INT32U)ms + 500uL / OS_TICKS_PER_SEC) / 1000uL;
    OSTimeDly(ticks);
    return (OS_ERR_NONE);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                         RESUME A DELAYED TASK
*
* Description: This function is used resume a task that has been delayed through a call to either
*              OSTimeDly() or OSTimeDlyHMSM().  Note that you can call this function to resume a
*              task that is waiting for an event with timeout.  This would make the task look
*              like a timeout occurred.
*
* Arguments  : prio                      specifies the priority of the task to resume
*
* Returns    : OS_ERR_NONE               Task has been resumed
*              OS_ERR_PRIO_INVALID       if the priority you specify is higher that the maximum allowed
*                                        (i.e. >= OS_LOWEST_PRIO)
*              OS_ERR_TIME_NOT_DLY       Task is not waiting for time to expire
*              OS_ERR_TASK_NOT_EXIST     The desired task has not been created or has been assigned to a Mutex.
*********************************************************************************************************
*/

#if OS_TIME_DLY_RESUME_EN > 0u
INT8U  OSTimeDlyResume (INT8U prio)
{
    OS_TCB    *ptcb;
#if OS_CRITICAL_METHOD == 3u                                   /* Storage for CPU status register      */
    OS_CPU_SR  cpu_sr = 0u;
#endif



    if (prio >= OS_LOWEST_PRIO) {
        return (OS_ERR_PRIO_INVALID);
    }
    OS_ENTER_CRITICAL();
    ptcb = OSTCBPrioTbl[prio];                                 /* Make sure that task exist            */
    if (ptcb == (OS_TCB *)0) {
        OS_EXIT_CRITICAL();
        return (OS_ERR_TASK_NOT_EXIST);                        /* The task does not exist              */
    }
    if (ptcb == OS_TCB_RESERVED) {
        OS_EXIT_CRITICAL();
        return (OS_ERR_TASK_NOT_EXIST);                        /* The task does not exist              */
    }
    if (ptcb->OSTCBDly == 0u) {                                /* See if task is delayed               */
        OS_EXIT_CRITICAL();
        return (OS_ERR_TIME_NOT_DLY);                          /* Indicate that task was not delayed   */
    }

    ptcb->OSTCBDly = 0u;                                       /* Clear the time delay                 */
    if ((ptcb->OSTCBStat & OS_STAT_PEND_ANY) != OS_STAT_RDY) {
        ptcb->OSTCBStat     &= ~OS_STAT_PEND_ANY;              /* Yes, Clear status flag               */
        ptcb->OSTCBStatPend  =  OS_STAT_PEND_TO;               /* Indicate PEND timeout                */
    } else {
        ptcb->OSTCBStatPend  =  OS_STAT_PEND_OK;
    }
    if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY) {  /* Is task suspended?                   */
        OSRdyGrp               |= ptcb->OSTCBBitY;             /* No,  Make ready                      */
        OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
        OS_EXIT_CRITICAL();
        OS_Sched();                                            /* See if this is new highest priority  */
    } else {
        OS_EXIT_CRITICAL();                                    /* Task may be suspended                */
    }
    return (OS_ERR_NONE);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                         GET CURRENT SYSTEM TIME
*
* Description: This function is used by your application to obtain the current value of the 32-bit
*              counter which keeps track of the number of clock ticks.
*
* Arguments  : none
*
* Returns    : The current value of OSTime
*********************************************************************************************************
*/

#if OS_TIME_GET_SET_EN > 0u
INT32U  OSTimeGet (void)
{
    INT32U     ticks;
#if OS_CRITICAL_METHOD == 3u                     /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0u;
#endif



    OS_ENTER_CRITICAL();
    ticks = OSTime;
    OS_EXIT_CRITICAL();
    return (ticks);
}
#endif

/*
*********************************************************************************************************
*                                            SET SYSTEM CLOCK
*
* Description: This function sets the 32-bit counter which keeps track of the number of clock ticks.
*
* Arguments  : ticks      specifies the new value that OSTime needs to take.
*
* Returns    : none
*********************************************************************************************************
*/

#if OS_TIME_GET_SET_EN > 0u
void  OSTimeSet (INT32U ticks)
{
#if OS_CRITICAL_METHOD == 3u                     /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr = 0u;
#endif



    OS_ENTER_CRITICAL();
    OSTime = ticks;
    OS_EXIT_CRITICAL();
}
#endif
	 	   	  		 			 	    		   		 		 	 	 			 	    		   	 			 	  	 		 				 		  			 		 					 	  	  		      		  	   		      		  	 		 	      		   		 		  	 		 	      		  		  		  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人性视频免费网站| 国产精品久久久久精k8| 亚洲天堂久久久久久久| 毛片一区二区三区| 91免费版pro下载短视频| 精品乱人伦一区二区三区| 一区二区三区高清在线| 国产成人综合亚洲网站| 欧美一卡在线观看| 一区二区三区小说| 99久久精品99国产精品| 精品sm捆绑视频| 午夜av区久久| 欧美吻胸吃奶大尺度电影| 国产精品视频一二三区| 国产在线一区二区| 日韩天堂在线观看| 亚洲成人av在线电影| 在线观看视频91| 综合在线观看色| 91论坛在线播放| 国产精品国产a级| 粉嫩绯色av一区二区在线观看| 精品99一区二区| 激情久久五月天| 日韩精品影音先锋| 激情欧美一区二区| 久久毛片高清国产| 精品一区二区三区视频在线观看 | www.av精品| 久久影院午夜论| 韩国成人在线视频| 国产日韩精品久久久| 国产精品白丝jk白祙喷水网站| 国产亚洲va综合人人澡精品| 国产一区在线看| 日本一区二区免费在线观看视频 | 国产精品无人区| 丰满亚洲少妇av| 成人欧美一区二区三区在线播放| 93久久精品日日躁夜夜躁欧美| 国产精品嫩草影院av蜜臀| 99这里都是精品| 亚洲精品写真福利| 欧美日韩一区二区三区四区五区| 亚洲成人一区在线| 日韩欧美中文一区二区| 国产一区二区三区| 国产精品午夜久久| 91麻豆精品在线观看| 亚洲午夜在线视频| 精品91自产拍在线观看一区| 国产久卡久卡久卡久卡视频精品| 国产精品国产三级国产aⅴ入口 | 亚洲成人黄色影院| 欧美大度的电影原声| 国产精品一区二区果冻传媒| 中文字幕一区二区三区在线不卡 | 色8久久精品久久久久久蜜| 亚洲电影中文字幕在线观看| 精品88久久久久88久久久| 成人黄色网址在线观看| 日韩在线观看一区二区| 久久久不卡影院| 欧美日韩精品一区二区在线播放| 久久国产福利国产秒拍| 亚洲视频网在线直播| av激情亚洲男人天堂| 午夜私人影院久久久久| 国产亚洲制服色| 欧美日韩国产另类一区| 盗摄精品av一区二区三区| 午夜精品久久久久久久久| 久久亚洲综合色| 欧美日韩国产成人在线91| 国产精品1区二区.| 三级一区在线视频先锋| 国产精品久久精品日日| 欧美刺激午夜性久久久久久久| eeuss影院一区二区三区| 男人的天堂久久精品| 中文字幕视频一区二区三区久| 欧美一二三四区在线| 色综合久久久久综合体桃花网| 精品一区中文字幕| 亚洲成国产人片在线观看| 国产精品福利在线播放| 亚洲精品一区二区三区影院| 欧美日韩成人高清| 一本一道久久a久久精品综合蜜臀| 黑人精品欧美一区二区蜜桃| 舔着乳尖日韩一区| 一区二区三区四区中文字幕| 日本一区二区综合亚洲| 日韩情涩欧美日韩视频| 欧美午夜一区二区三区| av一本久道久久综合久久鬼色| 国精品**一区二区三区在线蜜桃| 午夜视频一区在线观看| 亚洲一区二区偷拍精品| 亚洲男同1069视频| 国产精品成人午夜| 国产精品亲子伦对白| 国产欧美精品区一区二区三区| 精品国产乱子伦一区| 欧美男生操女生| 7799精品视频| 欧美老女人在线| 91精品国产丝袜白色高跟鞋| 欧美日韩成人一区二区| 3d成人h动漫网站入口| 在线观看日韩电影| 欧美亚洲禁片免费| 欧美日韩国产免费一区二区 | 日韩视频在线你懂得| 91精品国产欧美一区二区18| 9191久久久久久久久久久| 欧美美女一区二区在线观看| 欧美午夜精品一区二区三区| 在线观看国产91| 欧美久久久久久久久久| 欧美精品免费视频| 欧美成人欧美edvon| 精品国产乱码久久久久久蜜臀 | 亚洲人被黑人高潮完整版| 亚洲欧洲综合另类| 亚洲动漫第一页| 麻豆精品精品国产自在97香蕉 | 蜜桃一区二区三区在线观看| 伦理电影国产精品| 国产一区二三区好的| 国产一区二区三区免费看| 成人免费毛片a| 日本韩国一区二区三区视频| 欧美人xxxx| 666欧美在线视频| 精品国产一区二区三区四区四| 久久久久久久久久美女| 欧美韩国日本不卡| 亚洲高清一区二区三区| 免费亚洲电影在线| 懂色av噜噜一区二区三区av| 色综合久久久久久久久| 日韩一本二本av| 国产精品久久久久久久久搜平片 | 成人精品国产一区二区4080| 在线观看网站黄不卡| 欧美一区二区三区免费| 国产精品水嫩水嫩| 日韩一区精品字幕| 成人午夜精品一区二区三区| 欧美色涩在线第一页| 久久先锋影音av鲁色资源网| 亚洲欧美日韩中文播放| 免费黄网站欧美| 91女人视频在线观看| 日韩三级电影网址| 亚洲精品国产成人久久av盗摄 | 亚洲不卡一区二区三区| 国产精品中文字幕欧美| 欧美视频一区在线观看| 精品av综合导航| 午夜精品福利视频网站| 不卡的av电影| 欧美精品一区二区久久婷婷| 亚洲自拍与偷拍| 粉嫩aⅴ一区二区三区四区| 欧美一区二区三区四区五区| 日韩一区有码在线| 国产专区欧美精品| 欧美高清性hdvideosex| 亚洲视频中文字幕| 国产精品一区一区| 日韩欧美资源站| 亚洲成人av电影| 色哟哟一区二区| 欧美国产一区二区| 国产一区二区三区免费在线观看| 欧美日韩成人在线一区| 亚洲欧美日韩国产综合在线| 国产高清久久久| 精品美女一区二区| 美女爽到高潮91| 91精品欧美福利在线观看| 亚洲福利一区二区三区| 色悠久久久久综合欧美99| 国产精品毛片久久久久久| 国产最新精品精品你懂的| 精品毛片乱码1区2区3区| 男女男精品视频网| 日韩欧美亚洲国产另类| 石原莉奈在线亚洲三区| 在线播放亚洲一区| 亚洲国产一区视频| 欧美日韩电影一区| 午夜精品久久久久久久99水蜜桃 | 97精品超碰一区二区三区| 国产偷v国产偷v亚洲高清| 国产成人av在线影院| 国产女人水真多18毛片18精品视频|