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

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

?? os_time.c

?? ucos-II 在arm7 lpc2106 proteus仿真顯示 lcd圖片 。。整個(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    

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美乱熟臀69xxxxxx| 成人在线一区二区三区| 久久夜色精品国产噜噜av| va亚洲va日韩不卡在线观看| 午夜免费欧美电影| 国产精品卡一卡二| 欧美一区二区久久| 日本国产一区二区| 国产精品1区2区| 蜜桃视频一区二区| 性久久久久久久| 一区二区三区资源| 成人免费小视频| 久久蜜臀精品av| 日韩一卡二卡三卡国产欧美| 欧美中文字幕一区二区三区| av在线不卡免费看| 国产99久久久国产精品免费看| 亚洲伊人色欲综合网| 中文字幕一区二区三| 中日韩免费视频中文字幕| 日本一区二区三区国色天香| 精品对白一区国产伦| 欧美mv日韩mv国产网站| 欧美白人最猛性xxxxx69交| 欧美三级在线视频| 91精品福利在线一区二区三区 | 亚洲国产美女搞黄色| 中文字幕一区免费在线观看| 一区二区三区四区中文字幕| 亚洲最新视频在线观看| 亚洲成av人影院| 视频一区欧美精品| 午夜av一区二区| 久久99精品久久久久婷婷| 国产一区二区三区在线观看免费| 国产91精品在线观看| 97精品久久久午夜一区二区三区| 色综合天天综合色综合av| 日本高清视频一区二区| 91精品免费在线| 久久色在线观看| 亚洲一区国产视频| 国产91在线|亚洲| 欧美影视一区在线| 久久久久久久久久久久电影| 亚洲女与黑人做爰| 美国毛片一区二区| 色综合天天综合狠狠| 欧美一级黄色录像| 国产精品免费人成网站| 图片区小说区国产精品视频 | 亚洲6080在线| 国产成人av影院| 91麻豆精品国产自产在线观看一区| 国产三级一区二区| 美女视频黄a大片欧美| 欧美在线视频你懂得| 国产精品久久三| 国产精品一区三区| 欧美一区二区视频网站| 中文字幕日韩av资源站| 国产乱码精品一区二区三| 欧美裸体bbwbbwbbw| 亚洲免费观看高清在线观看| 成人免费看黄yyy456| 久久久欧美精品sm网站| 精品一区二区三区在线观看 | 欧美一级高清片| 五月天亚洲婷婷| 欧美日韩激情一区二区三区| 一区二区三区资源| 欧美午夜电影网| 亚洲永久免费av| 欧美老人xxxx18| 日韩成人av影视| 久久影音资源网| 国产精品一区专区| 久久久精品欧美丰满| 国产乱人伦偷精品视频不卡| 国产欧美日韩亚州综合| 成人av电影在线播放| 中文字幕亚洲电影| 欧美日韩精品电影| 国产一区二区三区免费播放| 国产日韩一级二级三级| 国产一区二区三区精品视频| 国产欧美日韩另类一区| 91麻豆6部合集magnet| 一区二区在线观看视频| 在线一区二区三区四区| 麻豆精品新av中文字幕| 久久久欧美精品sm网站| 色婷婷国产精品| 一区二区三区不卡在线观看| 日韩欧美激情在线| 成人18视频日本| 麻豆国产精品777777在线| 久久久精品tv| 欧美日韩另类一区| 国产成人在线视频免费播放| 亚洲欧美韩国综合色| 91精品国产综合久久久久久久 | 欧美日韩综合一区| 懂色av一区二区夜夜嗨| 午夜激情一区二区三区| 日韩伦理电影网| 久久精品亚洲一区二区三区浴池| 欧美系列日韩一区| 91碰在线视频| 成人一区二区三区视频| 国产又黄又大久久| 成人av网在线| 青青草国产精品97视觉盛宴| 亚洲精选一二三| 中文字幕一区二区三区色视频| 精品99999| 精品奇米国产一区二区三区| 91精品国产色综合久久久蜜香臀| 色999日韩国产欧美一区二区| 成人午夜激情在线| 久久er99热精品一区二区| 亚洲国产精品久久不卡毛片| 一卡二卡欧美日韩| 一区二区三区日韩欧美精品| 欧美激情中文字幕一区二区| 久久精品视频免费| 久久久久久亚洲综合| 亚洲国产精华液网站w| 国产日韩影视精品| 亚洲欧洲精品一区二区三区不卡| 中文字幕综合网| 亚洲国产精品久久久久婷婷884| 亚洲午夜在线视频| 久久www免费人成看片高清| 国产精品亚洲一区二区三区妖精 | 一区视频在线播放| 一区二区三区免费看视频| 亚洲精品欧美在线| 日韩精品一级二级 | 色婷婷国产精品久久包臀| 欧美午夜片在线看| 日韩欧美一区在线| 亚洲欧洲日本在线| 日韩精品视频网站| 激情成人综合网| 在线精品国精品国产尤物884a| 精品国产露脸精彩对白| 亚洲免费观看高清在线观看| 日韩成人一级大片| 色偷偷成人一区二区三区91| 日韩手机在线导航| 亚洲成a人片综合在线| 盗摄精品av一区二区三区| 欧美网站大全在线观看| 国产日韩精品一区二区三区在线| 一区二区三区四区精品在线视频| 精品一区二区三区免费毛片爱| 成人福利视频网站| 欧美精品一区二区三区蜜桃视频| 亚洲国产欧美在线| 色哟哟日韩精品| 中文字幕一区二区三| 国产成人鲁色资源国产91色综| 日韩一区国产二区欧美三区| 亚洲电影在线播放| 91老师国产黑色丝袜在线| 欧美一级一级性生活免费录像| 日韩精品亚洲一区二区三区免费| 在线观看91视频| 亚洲国产精品一区二区久久 | 91精品国产综合久久精品性色| 亚洲精品高清在线观看| 色综合色综合色综合色综合色综合| 中文字幕精品在线不卡| 岛国av在线一区| 亚洲裸体在线观看| 欧美日韩国产免费一区二区 | 日韩一级片在线播放| 美美哒免费高清在线观看视频一区二区 | 同产精品九九九| 在线电影欧美成精品| 国产一区二三区好的| 国产日韩欧美高清| 91成人在线免费观看| 肉色丝袜一区二区| 国产校园另类小说区| 一本大道久久精品懂色aⅴ| 亚洲精品视频免费看| 欧美电影免费观看完整版| 成人免费视频app| 亚洲国产精品久久久久秋霞影院| 日韩女优av电影| 国产成人在线视频网址| 亚洲影院免费观看| 久久亚洲免费视频| 欧美日韩午夜影院| 99久久er热在这里只有精品15| 手机精品视频在线观看| 国产日韩av一区|