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

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

?? os_time.c

?? 基于LPC2478硬件平臺(tái)的IAP和遠(yuǎn)程WEB應(yīng)用。 系統(tǒng)共分為三個(gè)部分
?? 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一区二区三区免费野_久草精品视频
成人国产精品免费观看视频| 久久久综合精品| 亚洲国产精品久久一线不卡| 欧美日韩综合在线免费观看| 亚洲电影中文字幕在线观看| 制服丝袜亚洲精品中文字幕| 蜜臀91精品一区二区三区| 精品日韩一区二区三区免费视频| 久久疯狂做爰流白浆xx| 久久久久久9999| 99精品欧美一区二区蜜桃免费| 亚洲欧美另类小说视频| 亚洲女性喷水在线观看一区| 在线观看视频91| 日韩av在线播放中文字幕| 久久这里只有精品视频网| www.欧美日韩| 午夜电影一区二区| 久久综合中文字幕| 91美女片黄在线观看91美女| 调教+趴+乳夹+国产+精品| 国产亚洲综合在线| 欧美视频一区二区在线观看| 麻豆freexxxx性91精品| 1024亚洲合集| 制服丝袜激情欧洲亚洲| 9色porny自拍视频一区二区| 香蕉久久夜色精品国产使用方法 | 精品欧美一区二区三区精品久久| 国产乱人伦偷精品视频免下载| 1024成人网| 精品久久久久久久久久久院品网| 91美女片黄在线观看91美女| 六月婷婷色综合| 亚洲欧美偷拍三级| 久久婷婷成人综合色| 欧美日韩在线播放三区| 成人小视频免费在线观看| 免费看日韩精品| 亚洲九九爱视频| 久久久国产综合精品女国产盗摄| 欧美日韩精品是欧美日韩精品| 成人av在线播放网站| 九九九精品视频| 亚洲aⅴ怡春院| 国产精品久久久久久亚洲伦| 欧美大片拔萝卜| 精品视频在线免费| 91丨九色丨国产丨porny| 国产揄拍国内精品对白| 青青草精品视频| 亚洲高清不卡在线| 亚洲人123区| 日本一二三不卡| 久久综合色鬼综合色| 欧美一区日本一区韩国一区| 色综合一区二区| 99精品偷自拍| av网站免费线看精品| 国产成人啪午夜精品网站男同| 欧美aⅴ一区二区三区视频| 一区二区在线看| 亚洲视频一二三区| 中文字幕欧美国产| 精品在线播放午夜| 性做久久久久久免费观看| 一二三四社区欧美黄| 综合自拍亚洲综合图不卡区| 中文av一区特黄| 国产亚洲精品精华液| 精品国产1区二区| 欧美哺乳videos| 精品国产乱码久久久久久久久| 日韩美女在线视频| 日韩一区二区三区四区五区六区 | 97se亚洲国产综合自在线不卡 | 欧洲精品在线观看| 91视频在线观看| 色婷婷激情一区二区三区| 91污在线观看| 欧洲另类一二三四区| 欧美日韩激情一区二区| 欧美一区二区视频观看视频| 欧美一区二区人人喊爽| 日韩美女在线视频| 日本一区二区免费在线观看视频 | av亚洲精华国产精华精华| 波多野结衣亚洲一区| 91在线观看免费视频| 色婷婷久久久久swag精品| 欧美性色欧美a在线播放| 欧美日韩一二三区| 精品国产百合女同互慰| 国产日韩v精品一区二区| 亚洲视频香蕉人妖| 午夜久久久久久电影| 另类综合日韩欧美亚洲| 国产99久久久国产精品潘金| 99re在线视频这里只有精品| 欧美视频你懂的| 欧美成人一区二区三区在线观看| 国产午夜久久久久| 中文字幕一区二区三区不卡| 亚洲国产视频在线| 久久av中文字幕片| 91污片在线观看| 日韩欧美一级片| 国产精品久久久久精k8| 亚洲成人高清在线| 国产精品自拍av| 欧洲av一区二区嗯嗯嗯啊| 日韩欧美中文一区| 亚洲色图一区二区三区| 琪琪一区二区三区| 不卡av免费在线观看| 欧美日韩免费观看一区三区| 国产日韩欧美精品综合| 亚洲福利视频一区二区| 欧美一区二区精品久久911| 亚洲精品一线二线三线无人区| 亚洲视频免费在线观看| 青青草成人在线观看| 91香蕉视频黄| 久久免费美女视频| 五月激情综合婷婷| 成人毛片老司机大片| 欧美一三区三区四区免费在线看| 国产精品久久久久久久岛一牛影视| 三级影片在线观看欧美日韩一区二区| 国产精品1区2区3区| 欧美日韩一区二区三区在线看| 国产无人区一区二区三区| 日本不卡一区二区三区| 91一区一区三区| 亚洲国产高清不卡| 久久99日本精品| 欧美色涩在线第一页| 国产精品久久久久影院| 久久国产精品第一页| 欧美另类变人与禽xxxxx| 亚洲天天做日日做天天谢日日欢 | 欧美国产日韩精品免费观看| 免费在线欧美视频| 欧美日韩国产另类不卡| 亚洲色图欧洲色图婷婷| 国产成人免费在线观看不卡| 精品久久国产老人久久综合| 亚洲1区2区3区视频| 欧美综合欧美视频| 中文字幕一区二区三区视频| 国产成人在线视频免费播放| 欧美一区日韩一区| 秋霞午夜av一区二区三区| 欧美日产在线观看| 亚洲一二三四久久| 欧美午夜精品久久久| 一区二区三区在线视频免费| 99精品国产视频| 亚洲天堂av一区| jiyouzz国产精品久久| 国产精品你懂的| av在线不卡免费看| 亚洲欧洲另类国产综合| av成人动漫在线观看| 中文字幕日本不卡| 99麻豆久久久国产精品免费优播| 亚洲欧洲在线观看av| av电影天堂一区二区在线观看| 中文字幕人成不卡一区| 色综合中文字幕| 亚洲在线观看免费| 337p亚洲精品色噜噜狠狠| 蜜臀av在线播放一区二区三区| 日韩视频免费观看高清完整版| 九色综合狠狠综合久久| 久久久久久日产精品| 成熟亚洲日本毛茸茸凸凹| 国产精品午夜春色av| 91免费观看国产| 午夜激情久久久| 精品国产三级a在线观看| 国产大陆a不卡| 亚洲男人天堂一区| 欧美色中文字幕| 久久99精品久久久久久久久久久久| 久久一夜天堂av一区二区三区| 亚洲精品一区二区三区影院 | 亚洲男女毛片无遮挡| 91成人在线精品| 日韩av一区二区三区| 久久婷婷久久一区二区三区| av欧美精品.com| 日韩av网站免费在线| 国产午夜亚洲精品羞羞网站| 99久久免费视频.com| 丝袜亚洲精品中文字幕一区| 2024国产精品| 日本精品视频一区二区三区| 蜜芽一区二区三区| 亚洲欧洲日本在线|