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

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

?? os_time.c

?? Samsung ARM7 s3c44b0 + uC-OSii + uC-GUI 完美的綜合到了一起
?? C
字號(hào):
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*                                             TIME MANAGEMENT
*
*                          (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
*                                           All Rights Reserved
*
* File : OS_TIME.C
* By   : Jean J. Labrosse
*********************************************************************************************************
*/

#ifndef  OS_MASTER_FILE
#include "includes.h"
#endif

/*
*********************************************************************************************************
*                                DELAY TASK 'n' TICKS   (n from 0 to 65535)
*
* 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 (INT16U ticks)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    


    if (ticks > 0) {                                                      /* 0 means no delay!         */
        OS_ENTER_CRITICAL();
        if ((OSRdyTbl[OSTCBCur->OSTCBY] &= ~OSTCBCur->OSTCBBitX) == 0) {  /* Delay current task        */
            OSRdyGrp &= ~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)
*              milli     specifies the number of milliseconds (max. 999)
*
* Returns    : OS_NO_ERR
*              OS_TIME_INVALID_MINUTES
*              OS_TIME_INVALID_SECONDS
*              OS_TIME_INVALID_MS
*              OS_TIME_ZERO_DLY
*
* 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 > 0
INT8U  OSTimeDlyHMSM (INT8U hours, INT8U minutes, INT8U seconds, INT16U milli)
{
    INT32U ticks;
    INT16U loops;


    if (hours > 0 || minutes > 0 || seconds > 0 || milli > 0) {
        if (minutes > 59) {
            return (OS_TIME_INVALID_MINUTES);    /* Validate arguments to be within range              */
        }
        if (seconds > 59) {
            return (OS_TIME_INVALID_SECONDS);
        }
        if (milli > 999) {
            return (OS_TIME_INVALID_MILLI);
        }
                                                 /* Compute the total number of clock ticks required.. */
                                                 /* .. (rounded to the nearest tick)                   */
        ticks = ((INT32U)hours * 3600L + (INT32U)minutes * 60L + (INT32U)seconds) * OS_TICKS_PER_SEC
              + OS_TICKS_PER_SEC * ((INT32U)milli + 500L / OS_TICKS_PER_SEC) / 1000L;
        loops = (INT16U)(ticks / 65536L);        /* Compute the integral number of 65536 tick delays   */
        ticks = ticks % 65536L;                  /* Obtain  the fractional number of ticks             */
        OSTimeDly((INT16U)ticks);
        while (loops > 0) {
            OSTimeDly(32768);
            OSTimeDly(32768);
            loops--;
        }
        return (OS_NO_ERR);
    }
    return (OS_TIME_ZERO_DLY);
}
#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 MUST NOT call this function to resume a
*              task that is waiting for an event with timeout.  This situation would make the task look
*              like a timeout occurred (unless you desire this effect).  Also, you cannot resume a task
*              that has called OSTimeDlyHMSM() with a combined time that exceeds 65535 clock ticks.  In
*              other words, if the clock tick runs at 100 Hz then, you will not be able to resume a
*              delayed task that called OSTimeDlyHMSM(0, 10, 55, 350) or higher.
*
*                  (10 Minutes * 60 + 55 Seconds + 0.35) * 100 ticks/second.
*
* Arguments  : prio      specifies the priority of the task to resume
*
* Returns    : OS_NO_ERR                 Task has been resumed
*              OS_PRIO_INVALID           if the priority you specify is higher that the maximum allowed
*                                        (i.e. >= OS_LOWEST_PRIO)
*              OS_TIME_NOT_DLY           Task is not waiting for time to expire
*              OS_TASK_NOT_EXIST         The desired task has not been created
*********************************************************************************************************
*/

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


    if (prio >= OS_LOWEST_PRIO) {
        return (OS_PRIO_INVALID);
    }
    OS_ENTER_CRITICAL();
    ptcb = (OS_TCB *)OSTCBPrioTbl[prio];                   /* Make sure that task exist                */
    if (ptcb != (OS_TCB *)0) {
        if (ptcb->OSTCBDly != 0) {                         /* See if task is delayed                   */
            ptcb->OSTCBDly  = 0;                           /* Clear the time delay                     */
            if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY) {  /* See if task is ready to run  */
                OSRdyGrp               |= ptcb->OSTCBBitY;             /* Make task ready to run       */
                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_NO_ERR);
        } else {
            OS_EXIT_CRITICAL();
            return (OS_TIME_NOT_DLY);                      /* Indicate that task was not delayed       */
        }
    }
    OS_EXIT_CRITICAL();
    return (OS_TASK_NOT_EXIST);                            /* The task does not exist                  */
}
#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 > 0
INT32U  OSTimeGet (void)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    INT32U     ticks;


    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 > 0
void  OSTimeSet (INT32U ticks)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    


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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美最猛黑人xxxxx猛交| 免费成人av在线播放| 国产成人亚洲精品狼色在线| 日韩三级视频在线观看| 日韩中文字幕亚洲一区二区va在线 | 亚洲精品中文字幕乱码三区| 成人激情动漫在线观看| 一区在线播放视频| 一本久久综合亚洲鲁鲁五月天| 国产精品久久三区| av男人天堂一区| 一区二区三区丝袜| 欧美日韩在线一区二区| 日精品一区二区三区| 精品动漫一区二区三区在线观看| 狠狠色丁香婷综合久久| 中文字幕欧美日韩一区| 一本色道亚洲精品aⅴ| 亚洲一级二级在线| 91精品国产综合久久久久久久| 老司机午夜精品| 国产色综合一区| 99亚偷拍自图区亚洲| 亚洲国产日韩a在线播放性色| 欧美精品高清视频| 国产一区二区三区黄视频 | 午夜精品久久久久久久99水蜜桃| 欧美日高清视频| 精品一区二区三区在线观看| 国产女人18水真多18精品一级做| 97久久超碰国产精品电影| 亚洲成人tv网| 国产亚洲精品aa| 色94色欧美sute亚洲线路一ni| 午夜影视日本亚洲欧洲精品| 欧美精品一区二区高清在线观看| 波多野结衣在线一区| 亚洲成av人片一区二区梦乃| 久久久久久99精品| 欧美伊人精品成人久久综合97| 青青草原综合久久大伊人精品| 国产精品丝袜黑色高跟| 欧美日韩国产一区| 成人免费视频视频在线观看免费| 亚洲一区二区三区美女| 久久精品这里都是精品| 欧美猛男gaygay网站| 大陆成人av片| 麻豆精品一区二区| 伊人夜夜躁av伊人久久| 久久伊99综合婷婷久久伊| 日本高清免费不卡视频| 国产一区在线观看视频| 亚洲成人你懂的| 亚洲视频一二三区| 久久尤物电影视频在线观看| 欧美日韩国产三级| 97aⅴ精品视频一二三区| 国产美女视频一区| 捆绑调教一区二区三区| 午夜精品福利在线| 亚洲激情自拍视频| 中文字幕第一区第二区| 欧美一级一区二区| 欧美三级在线播放| 99re成人在线| eeuss鲁片一区二区三区在线观看| 麻豆精品在线看| 免费美女久久99| 日韩高清一区二区| 亚洲成av人片一区二区三区| 亚洲免费观看在线视频| 中文字幕精品—区二区四季| 久久久久国产一区二区三区四区| 日韩午夜激情视频| 91麻豆精品国产综合久久久久久| 色婷婷久久久综合中文字幕| www.66久久| 99久久伊人久久99| 成人av片在线观看| 成人手机在线视频| av在线不卡观看免费观看| 成人小视频在线观看| 成人国产在线观看| www.亚洲在线| 99久久综合精品| 一本色道a无线码一区v| 91丨国产丨九色丨pron| 91丨porny丨最新| 色诱视频网站一区| 欧美性受xxxx黑人xyx性爽| 欧美性色aⅴ视频一区日韩精品| 欧洲在线/亚洲| 欧美日韩和欧美的一区二区| 3atv在线一区二区三区| 91精品婷婷国产综合久久性色 | 99久久99久久综合| 不卡视频一二三四| 色哟哟国产精品| 欧美专区亚洲专区| 欧美男女性生活在线直播观看| 欧美日韩色一区| 欧美一级理论片| 久久综合丝袜日本网| 久久久精品蜜桃| 国产精品久久久久三级| 亚洲自拍偷拍av| 秋霞电影一区二区| 国产精品一区二区久久不卡| caoporn国产精品| 欧美日韩综合在线免费观看| 91麻豆精品国产91久久久资源速度 | 国产精品免费丝袜| 亚洲永久免费av| 蜜桃视频一区二区三区| 成人精品免费看| 在线观看国产日韩| 精品sm捆绑视频| 综合激情成人伊人| 日本系列欧美系列| 成人精品一区二区三区中文字幕 | 国产精品福利一区二区| 艳妇臀荡乳欲伦亚洲一区| 日本最新不卡在线| 国产a久久麻豆| 欧美日韩在线亚洲一区蜜芽| 2017欧美狠狠色| 亚洲美女视频一区| 美女爽到高潮91| 91在线精品一区二区| 欧美不卡视频一区| 日本在线观看不卡视频| 不卡欧美aaaaa| 91精品国产黑色紧身裤美女| 中文文精品字幕一区二区| 午夜国产精品影院在线观看| 国产mv日韩mv欧美| 日韩色在线观看| 亚洲自拍偷拍欧美| 成人小视频在线观看| 欧美精选午夜久久久乱码6080| 久久久欧美精品sm网站| 香港成人在线视频| av电影在线不卡| 久久亚洲影视婷婷| 午夜欧美一区二区三区在线播放| 成人性生交大合| 日韩一区二区在线看片| 一区二区三区资源| 国产成人精品影视| 日韩精品一区二区三区四区| 亚洲午夜在线观看视频在线| 波多野结衣在线aⅴ中文字幕不卡| 欧美tickle裸体挠脚心vk| 香蕉久久夜色精品国产使用方法 | 久久精品视频免费观看| 同产精品九九九| 国产欧美日韩精品a在线观看| 日韩电影免费在线观看网站| 日本精品免费观看高清观看| 国产目拍亚洲精品99久久精品| 美女免费视频一区| 欧美一区二区美女| 亚洲国产成人av| 欧美性视频一区二区三区| 亚洲综合一区二区三区| 91亚洲精品久久久蜜桃| 成人免费在线视频| av色综合久久天堂av综合| 国产精品久久久久影院| 精品亚洲欧美一区| www欧美成人18+| 国产乱码一区二区三区| 国产亚洲欧美日韩俺去了| 国产精一品亚洲二区在线视频| 久久综合久久久久88| 国内成人精品2018免费看| 精品国产免费一区二区三区香蕉| 蜜臀久久99精品久久久画质超高清 | 偷拍自拍另类欧美| 欧美久久久久中文字幕| 日韩一区精品字幕| 日韩亚洲欧美成人一区| 久久99精品一区二区三区三区| 日韩欧美国产一二三区| 九一久久久久久| 亚洲国产精华液网站w| 91香蕉视频污| 丝袜亚洲另类欧美| 欧美xxxxxxxxx| 豆国产96在线|亚洲| 波多野结衣在线一区| 亚洲欧洲在线观看av| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲丝袜美腿综合| 欧美性xxxxx极品少妇| 日韩福利电影在线观看| 欧美精品一区二区三区蜜桃| 成人免费的视频| 亚洲二区在线观看|