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

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

?? os_time.c

?? ARM7TDMI軟件模擬器
?? C
字號(hào):
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*                                             TIME MANAGEMENT
*
*                          (c) Copyright 1992-2003, Jean J. Labrosse, Weston, FL
*                                           All Rights Reserved
*
* File    : OS_TIME.C
* By      : Jean J. Labrosse
* Version : V2.76
*********************************************************************************************************
*/

#ifndef  OS_MASTER_FILE
#include <ucos_ii.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)
{
    INT8U      y;
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;



    cpu_sr = 0;                                  /* Prevent compiler warning                           */
#endif    
    if (ticks > 0) {                             /* 0 means no delay!                                  */
        OS_ENTER_CRITICAL();
        y            =  OSTCBCur->OSTCBY;        /* Delay current task                                 */
        OSRdyTbl[y] &= ~OSTCBCur->OSTCBBitX;
        if (OSRdyTbl[y] == 0) {  
            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 OS_ARG_CHK_EN > 0
    if (hours == 0) {
        if (minutes == 0) {
            if (seconds == 0) {
                if (milli == 0) {
                    return (OS_TIME_ZERO_DLY);
                }
            }
        }
    }
    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);
    }
#endif
                                                 /* 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((INT16U)32768u);
        OSTimeDly((INT16U)32768u);
        loops--;
    }
    return (OS_NO_ERR);
}
#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.  
*
*              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 or has been assigned to a Mutex.
*********************************************************************************************************
*/

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



    cpu_sr = 0;                                                /* Prevent compiler warning             */
#endif    
    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) {
        OS_EXIT_CRITICAL();
        return (OS_TASK_NOT_EXIST);                            /* The task does not exist              */
    }
    if (ptcb == (OS_TCB *)1) {
        OS_EXIT_CRITICAL();
        return (OS_TASK_NOT_EXIST);                            /* The task does not exist              */
    }
    if (ptcb->OSTCBDly == 0) {                                 /* See if task is delayed               */
        OS_EXIT_CRITICAL();
        return (OS_TIME_NOT_DLY);                              /* Indicate that task was not delayed   */
    }

    ptcb->OSTCBDly = 0;                                        /* 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->OSTCBPendTO  = TRUE;                             /* Indicate PEND timeout                */
    } else {
        ptcb->OSTCBPendTO  = FALSE;
    }
    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_NO_ERR);
}
#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)
{
    INT32U     ticks;
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;



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



    cpu_sr = 0;                                  /* Prevent compiler warning                           */
#endif    
    OS_ENTER_CRITICAL();
    OSTime = ticks;
    OS_EXIT_CRITICAL();
}
#endif    

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久精k8| 一区二区在线观看不卡| 成人精品小蝌蚪| 日本精品裸体写真集在线观看| 国产一区二区在线电影| 麻豆专区一区二区三区四区五区| 性欧美大战久久久久久久久| 亚洲成国产人片在线观看| 亚洲老司机在线| 亚洲免费在线视频| 亚洲精品中文在线观看| 亚洲美女在线国产| 亚洲亚洲人成综合网络| 亚洲国产精品久久一线不卡| 亚洲国产乱码最新视频 | 中文字幕在线不卡视频| 国产精品丝袜黑色高跟| 国产精品美日韩| 最新热久久免费视频| 中文字幕一区二区三区视频| 中文字幕日韩一区| 一区二区三区高清不卡| 亚洲成av人片一区二区梦乃| 天堂成人免费av电影一区| 日韩成人一级大片| 国产精品一区二区免费不卡| 国产成人精品一区二区三区网站观看| 国产成人啪午夜精品网站男同| 成人午夜在线视频| 色老汉一区二区三区| 欧美日韩在线精品一区二区三区激情 | 波多野结衣精品在线| 99久久精品国产精品久久| 欧洲中文字幕精品| 欧美高清视频一二三区| 欧美mv日韩mv国产| 亚洲国产岛国毛片在线| 一区二区三区在线看| 午夜精品久久久久久久99水蜜桃| 秋霞国产午夜精品免费视频| 国产激情视频一区二区三区欧美| 99久久婷婷国产精品综合| 在线免费观看日本一区| 欧美成人精品二区三区99精品| 国产亚洲一区二区在线观看| 18欧美亚洲精品| 石原莉奈一区二区三区在线观看| 久久9热精品视频| 91麻豆精品一区二区三区| 91精品国产91热久久久做人人| 亚洲情趣在线观看| 三级精品在线观看| 国产成人av资源| 欧美网站大全在线观看| 精品国产欧美一区二区| 亚洲乱码日产精品bd| 另类小说欧美激情| 色婷婷综合在线| 日韩欧美亚洲国产另类| 亚洲乱码国产乱码精品精可以看| 美女被吸乳得到大胸91| 99精品久久只有精品| 日韩欧美在线观看一区二区三区| 一区二区中文字幕在线| 免费高清在线视频一区·| 91亚洲精品久久久蜜桃| 精品国产一区二区亚洲人成毛片| 亚洲黄色在线视频| 国产成人aaaa| 日韩美女在线视频| 有坂深雪av一区二区精品| 国产精品99久久久| 欧美男同性恋视频网站| 中文字幕中文字幕在线一区| 久久精品国产色蜜蜜麻豆| 色久综合一二码| 中文字幕av一区二区三区| 麻豆国产精品视频| 欧美日韩精品一区二区| 国产精品国产三级国产三级人妇| 捆绑紧缚一区二区三区视频 | 丝袜美腿高跟呻吟高潮一区| 成人一区二区视频| 中文字幕第一区第二区| 国产一区二区三区在线看麻豆| 91亚洲永久精品| 亚洲欧美日韩在线播放| 成人精品鲁一区一区二区| 精品剧情v国产在线观看在线| 婷婷久久综合九色国产成人| 91精品麻豆日日躁夜夜躁| 日韩成人一级大片| 亚洲r级在线视频| 欧美aaa在线| 欧美精品 日韩| 麻豆精品国产传媒mv男同 | 欧美一级欧美三级在线观看| 亚洲精品欧美在线| 色综合色狠狠天天综合色| 久久色在线观看| 国产主播一区二区| 26uuu色噜噜精品一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美性感一区二区三区| 综合欧美亚洲日本| 91免费观看在线| 亚洲女子a中天字幕| 色综合久久久久综合体| 成人欧美一区二区三区1314| 成人做爰69片免费看网站| 欧美国产丝袜视频| 丁香啪啪综合成人亚洲小说| 亚洲国产精品国自产拍av| 福利电影一区二区| 国产精品美女久久福利网站| 不卡在线观看av| 日韩美女啊v在线免费观看| 色哟哟精品一区| 亚洲午夜久久久久久久久电影院 | 北条麻妃一区二区三区| 亚洲欧洲日本在线| 欧亚一区二区三区| 亚洲成av人片在线| 欧美一级黄色片| 激情图片小说一区| 国产日韩欧美电影| www.性欧美| 亚洲午夜精品在线| 欧美一区二区高清| 国产真实精品久久二三区| 国产欧美一区二区三区鸳鸯浴| 丁香婷婷综合激情五月色| 亚洲男人都懂的| 欧美日韩在线播| 黄色日韩三级电影| 亚洲欧洲日产国码二区| 欧美在线不卡视频| 美腿丝袜亚洲一区| 国产欧美日韩综合| 91麻豆swag| 免费在线观看日韩欧美| 久久久久久97三级| 91蜜桃网址入口| 亚洲妇熟xx妇色黄| 久久综合久久99| 色噜噜狠狠成人网p站| 免费高清在线一区| 亚洲天堂福利av| 在线综合视频播放| 成人看片黄a免费看在线| 亚洲午夜免费电影| 亚洲视频一区二区在线观看| 91麻豆精品国产91久久久久久久久 | 久久99精品国产| 国产精品久久久久久福利一牛影视 | 国产精品久久国产精麻豆99网站| 欧美影院一区二区三区| 久久97超碰色| 亚洲精品成人天堂一二三| 日韩欧美国产小视频| av亚洲精华国产精华精华| 日韩av高清在线观看| 国产精品免费久久| 欧美区在线观看| 丁香婷婷综合网| 三级久久三级久久久| 久久久久国产精品厨房| 欧美日韩一级视频| 国产a区久久久| 亚洲国产综合91精品麻豆| 国产日产亚洲精品系列| 欧美丝袜自拍制服另类| 粉嫩一区二区三区在线看| 亚洲丝袜美腿综合| 精品嫩草影院久久| 欧美日韩激情一区二区三区| 国产乱子伦视频一区二区三区 | 视频一区国产视频| 国产欧美一区二区精品秋霞影院| 欧美三区在线视频| 成人a免费在线看| 亚洲卡通欧美制服中文| 日韩欧美一级二级三级久久久| aaa亚洲精品| 韩国v欧美v日本v亚洲v| 一区二区免费看| 欧美激情一二三区| 精品欧美一区二区久久| 97精品久久久久中文字幕| 视频一区中文字幕国产| 国产精品久久久久久久久免费相片| 777xxx欧美| 色综合咪咪久久| 色综合天天在线| 成人一区二区在线观看| 国产美女精品一区二区三区| 免费人成精品欧美精品| 亚洲一区二区三区免费视频| 亚洲女同女同女同女同女同69| 国产亚洲一区二区三区四区 |