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

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

?? os_time.c

?? 基于ARM的觸摸屏幕的驅動wangqu 一定能用
?? C
字號:
/*
*********************************************************************************************************
*                                                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    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃视频在线观看一区| 国产精品美女视频| 日韩不卡手机在线v区| 欧美一区二区日韩| 国产精品亚洲午夜一区二区三区| 久久青草国产手机看片福利盒子| 国产老肥熟一区二区三区| 欧美国产一区二区在线观看| 高清在线成人网| 亚洲女性喷水在线观看一区| 欧美久久婷婷综合色| 国内精品久久久久影院薰衣草| 国产偷国产偷精品高清尤物| fc2成人免费人成在线观看播放 | 91在线porny国产在线看| 亚洲乱码中文字幕综合| 7777精品伊人久久久大香线蕉| 久久福利资源站| 国产精品色在线| 在线中文字幕不卡| 美女视频黄久久| 欧美高清在线一区二区| 欧美日韩在线不卡| 国模无码大尺度一区二区三区| 中文字幕中文乱码欧美一区二区| 色狠狠色狠狠综合| 久久99国产精品成人| 综合久久综合久久| 欧美一区二区三区视频| 成人午夜在线播放| 午夜私人影院久久久久| 久久久久免费观看| 欧美丝袜丝交足nylons图片| 国产一区二区三区在线看麻豆| 1024亚洲合集| 精品国产麻豆免费人成网站| 91网页版在线| 国产一区福利在线| 亚洲一本大道在线| 国产欧美精品一区二区色综合 | 一区二区三区欧美亚洲| 精品欧美久久久| 在线观看视频欧美| 国产福利一区二区| 日韩黄色一级片| 一区二区三区精品久久久| 26uuuu精品一区二区| 欧美日本国产视频| 91麻豆国产精品久久| 国产精品1区2区| 日本不卡在线视频| 亚洲二区视频在线| 18欧美乱大交hd1984| 国产亚洲欧洲997久久综合| 欧美精品乱码久久久久久按摩| 国产aⅴ精品一区二区三区色成熟| 五月天亚洲精品| 亚洲精品国产视频| 中文字幕在线不卡| 欧美高清在线精品一区| 精品成人免费观看| 日韩女同互慰一区二区| 51精品久久久久久久蜜臀| 在线观看日韩国产| a在线播放不卡| 成人毛片在线观看| 国产99精品国产| 国产米奇在线777精品观看| 日韩电影免费在线| 日韩电影一区二区三区| 五月天丁香久久| 亚洲午夜激情网站| 亚洲中国最大av网站| 亚洲天堂精品在线观看| 亚洲天堂网中文字| 亚洲欧美日韩国产中文在线| 亚洲欧美偷拍另类a∨色屁股| 国产精品国产三级国产普通话三级 | 一区二区三区 在线观看视频| 国产精品久久久一本精品| 国产色婷婷亚洲99精品小说| 国产日韩欧美高清| 中文字幕不卡一区| 亚洲精品日韩一| 一区二区欧美视频| 亚洲成人资源网| 秋霞影院一区二区| 久久av资源站| 国产成人综合在线| 成人免费精品视频| 色婷婷精品久久二区二区蜜臂av | 欧美最新大片在线看| 欧美日韩一区二区在线视频| 欧美日韩在线不卡| 欧美一卡2卡3卡4卡| 欧美mv和日韩mv国产网站| 久久久三级国产网站| 中文字幕日本乱码精品影院| 亚洲色图在线看| 日韩精品1区2区3区| 国内精品视频666| 成人av网站大全| 欧美日韩你懂得| 久久久久久久久久久久久女国产乱| 久久色视频免费观看| 亚洲品质自拍视频| 日本一区中文字幕| 国产91精品精华液一区二区三区| 色综合久久久网| 91麻豆精品国产自产在线 | 色94色欧美sute亚洲线路二| 欧美日韩精品电影| 久久久久99精品国产片| 亚洲尤物视频在线| 国产精品一区二区视频| 色94色欧美sute亚洲线路二| 91精品国产色综合久久ai换脸| 久久日一线二线三线suv| 亚洲免费毛片网站| 九九国产精品视频| 91美女福利视频| 精品欧美一区二区久久| 一区二区三区影院| 国产精品一区二区无线| 欧美日韩精品系列| 国产日产亚洲精品系列| 性欧美大战久久久久久久久| 国产精品资源网站| 欧美男男青年gay1069videost| 2020国产精品自拍| 视频一区二区三区中文字幕| 福利电影一区二区三区| 欧美一区欧美二区| 亚洲女同ⅹxx女同tv| 国产一区美女在线| 91精品久久久久久久99蜜桃| 亚洲欧洲精品成人久久奇米网| 日韩高清一区二区| 色天天综合色天天久久| 国产日韩欧美高清| 理论电影国产精品| 欧美亚洲综合在线| 国产精品视频第一区| 国产一区二区免费看| 91麻豆精品国产91久久久久久| 亚洲欧洲韩国日本视频| 国产精品小仙女| 欧美精品一区二区三区视频| 日韩电影免费在线观看网站| 欧洲av一区二区嗯嗯嗯啊| 一区在线中文字幕| 国产成人免费网站| 精品久久久久久久久久久久久久久久久 | 国产不卡高清在线观看视频| 精品欧美黑人一区二区三区| 日韩av一区二区在线影视| 欧美午夜寂寞影院| 亚洲国产中文字幕在线视频综合| 成人av网站免费观看| 国产精品三级av| 波多野洁衣一区| 国产精品视频第一区| 成人精品免费看| 国产嫩草影院久久久久| 国产麻豆9l精品三级站| 亚洲精品一区二区三区在线观看| 久久综合综合久久综合| 日韩欧美亚洲一区二区| 美女脱光内衣内裤视频久久影院| 欧美高清dvd| 秋霞午夜av一区二区三区| 欧美精品 日韩| 日本中文字幕不卡| 欧美成人video| 国产乱一区二区| 国产精品免费久久久久| 不卡av在线网| 夜夜爽夜夜爽精品视频| 在线欧美日韩国产| 亚洲va在线va天堂| 欧美精品久久久久久久多人混战| 日韩国产精品久久久| 精品国产乱码久久久久久免费 | 亚洲精品美腿丝袜| 欧美亚洲另类激情小说| 免费xxxx性欧美18vr| 久久久久国产免费免费 | 91精品办公室少妇高潮对白| 亚洲综合一区二区三区| 欧美精品黑人性xxxx| 国产麻豆9l精品三级站| 亚洲另类色综合网站| 91精品免费观看| 成人免费黄色大片| 午夜精品爽啪视频| 久久精品欧美日韩| 在线中文字幕一区| 国产精品伊人色| 亚洲精品视频免费观看| 精品国产一区a|