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

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

?? os_core.c

?? protues仿真ARM ARM的I2C
?? C
?? 第 1 頁 / 共 5 頁
字號:
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                               EXIT ISR
*
* Description: This function is used to notify uC/OS-II that you have completed serviving an ISR.  When
*              the last nested ISR has completed, uC/OS-II will call the scheduler to determine whether
*              a new, high-priority task, is ready to run.
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) You MUST invoke OSIntEnter() and OSIntExit() in pair.  In other words, for every call
*                 to OSIntEnter() at the beginning of the ISR you MUST have a call to OSIntExit() at the
*                 end of the ISR.
*              2) Rescheduling is prevented when the scheduler is locked (see OS_SchedLock())
*********************************************************************************************************
*/

void  OSIntExit (void)
{
#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
    OS_CPU_SR  cpu_sr;
#endif
    
    
    if (OSRunning == TRUE) {
        OS_ENTER_CRITICAL();
        if (OSIntNesting > 0) {                            /* Prevent OSIntNesting from wrapping       */
            OSIntNesting--;
        }
        if (OSIntNesting == 0) {                           /* Reschedule only if all ISRs complete ... */
            if (OSLockNesting == 0) {                      /* ... and not locked.                      */
                OSIntExitY    = OSUnMapTbl[OSRdyGrp];          
                OSPrioHighRdy = (INT8U)((OSIntExitY << 3) + OSUnMapTbl[OSRdyTbl[OSIntExitY]]);
                if (OSPrioHighRdy != OSPrioCur) {          /* No Ctx Sw if current task is highest rdy */
                    OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy];
#if OS_TASK_PROFILE_EN > 0
                    OSTCBHighRdy->OSTCBCtxSwCtr++;         /* Inc. # of context switches to this task  */
#endif
                    OSCtxSwCtr++;                          /* Keep track of the number of ctx switches */
                    OSIntCtxSw();                          /* Perform interrupt level ctx switch       */
                }
            }
        }
        OS_EXIT_CRITICAL();
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                          PREVENT SCHEDULING
*
* Description: This function is used to prevent rescheduling to take place.  This allows your application
*              to prevent context switches until you are ready to permit context switching.
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) You MUST invoke OSSchedLock() and OSSchedUnlock() in pair.  In other words, for every
*                 call to OSSchedLock() you MUST have a call to OSSchedUnlock().
*********************************************************************************************************
*/

#if OS_SCHED_LOCK_EN > 0
void  OSSchedLock (void)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    
    
    if (OSRunning == TRUE) {                     /* Make sure multitasking is running                  */
        OS_ENTER_CRITICAL();
        if (OSLockNesting < 255u) {              /* Prevent OSLockNesting from wrapping back to 0      */
            OSLockNesting++;                     /* Increment lock nesting level                       */
        }
        OS_EXIT_CRITICAL();
    }
}
#endif    

/*$PAGE*/
/*
*********************************************************************************************************
*                                          ENABLE SCHEDULING
*
* Description: This function is used to re-allow rescheduling.
*
* Arguments  : none
*
* Returns    : none
*
* Notes      : 1) You MUST invoke OSSchedLock() and OSSchedUnlock() in pair.  In other words, for every
*                 call to OSSchedLock() you MUST have a call to OSSchedUnlock().
*********************************************************************************************************
*/

#if OS_SCHED_LOCK_EN > 0
void  OSSchedUnlock (void)
{
#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
    OS_CPU_SR  cpu_sr;
#endif    
    
    
    if (OSRunning == TRUE) {                                   /* Make sure multitasking is running    */
        OS_ENTER_CRITICAL();
        if (OSLockNesting > 0) {                               /* Do not decrement if already 0        */
            OSLockNesting--;                                   /* Decrement lock nesting level         */
            if (OSLockNesting == 0) {                          /* See if scheduler is enabled and ...  */
                if (OSIntNesting == 0) {                       /* ... not in an ISR                    */
                    OS_EXIT_CRITICAL();
                    OS_Sched();                                /* See if a HPT is ready                */
                } else {
                    OS_EXIT_CRITICAL();
                }
            } else {
                OS_EXIT_CRITICAL();
            }
        } else {
            OS_EXIT_CRITICAL();
        }
    }
}
#endif    

/*$PAGE*/
/*
*********************************************************************************************************
*                                          START MULTITASKING
*
* Description: This function is used to start the multitasking process which lets uC/OS-II manages the
*              task that you have created.  Before you can call OSStart(), you MUST have called OSInit()
*              and you MUST have created at least one task.
*
* Arguments  : none
*
* Returns    : none
*
* Note       : OSStartHighRdy() MUST:
*                 a) Call OSTaskSwHook() then,
*                 b) Set OSRunning to TRUE.
*                 c) Load the context of the task pointed to by OSTCBHighRdy.
*                 d_ Execute the task.
*********************************************************************************************************
*/

void  OSStart (void)
{
    INT8U y;
    INT8U x;


    if (OSRunning == FALSE) {
        y             = OSUnMapTbl[OSRdyGrp];        /* Find highest priority's task priority number   */
        x             = OSUnMapTbl[OSRdyTbl[y]];
        OSPrioHighRdy = (INT8U)((y << 3) + x);
        OSPrioCur     = OSPrioHighRdy;
        OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy]; /* Point to highest priority task ready to run    */
        OSTCBCur      = OSTCBHighRdy;
        OSStartHighRdy();                            /* Execute target specific code to start task     */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                        STATISTICS INITIALIZATION
*
* Description: This function is called by your application to establish CPU usage by first determining
*              how high a 32-bit counter would count to in 1 second if no other tasks were to execute
*              during that time.  CPU usage is then determined by a low priority task which keeps track
*              of this 32-bit counter every second but this time, with other tasks running.  CPU usage is
*              determined by:
*
*                                             OSIdleCtr
*                 CPU Usage (%) = 100 * (1 - ------------)
*                                            OSIdleCtrMax
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

#if OS_TASK_STAT_EN > 0
void  OSStatInit (void)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    
    
    OSTimeDly(2);                                /* Synchronize with clock tick                        */
    OS_ENTER_CRITICAL();
    OSIdleCtr    = 0L;                           /* Clear idle counter                                 */
    OS_EXIT_CRITICAL();
    OSTimeDly(OS_TICKS_PER_SEC / 10);            /* Determine MAX. idle counter value for 1/10 second  */
    OS_ENTER_CRITICAL();
    OSIdleCtrMax = OSIdleCtr;                    /* Store maximum idle counter count in 1/10 second    */
    OSStatRdy    = TRUE;
    OS_EXIT_CRITICAL();
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                         PROCESS SYSTEM TICK
*
* Description: This function is used to signal to uC/OS-II the occurrence of a 'system tick' (also known
*              as a 'clock tick').  This function should be called by the ticker ISR but, can also be
*              called by a high priority task.
*
* Arguments  : none
*
* Returns    : none
*********************************************************************************************************
*/

void  OSTimeTick (void)
{
#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register     */
    OS_CPU_SR  cpu_sr;
#endif    
    OS_TCB    *ptcb;
    BOOLEAN    step;


#if OS_TIME_TICK_HOOK_EN > 0
    OSTimeTickHook();                                      /* Call user definable hook                     */
#endif    
#if OS_TIME_GET_SET_EN > 0   
    OS_ENTER_CRITICAL();                                   /* Update the 32-bit tick counter               */
    OSTime++;
    OS_EXIT_CRITICAL();
#endif
    if (OSRunning == TRUE) {    
#if OS_TICK_STEP_EN > 0
        switch (OSTickStepState) {                         /* Determine whether we need to process a tick  */
            case OS_TICK_STEP_DIS:                         /* Yes, stepping is disabled                    */
                 step = TRUE;
                 break;
        
            case OS_TICK_STEP_WAIT:                        /* No,  waiting for uC/OS-View to set ...       */
                 step = FALSE;                             /*      .. OSTickStepState to OS_TICK_STEP_ONCE */
                 break;

            case OS_TICK_STEP_ONCE:                        /* Yes, process tick once and wait for next ... */
                 step            = TRUE;                   /*      ... step command from uC/OS-View        */
                 OSTickStepState = OS_TICK_STEP_WAIT;
                 break;  

            default:                                       /* Invalid case, correct situation              */
                 step            = TRUE;
                 OSTickStepState = OS_TICK_STEP_DIS;
                 break;
        }
#else
        step = TRUE;
#endif
        if (step == TRUE) {
            ptcb = OSTCBList;                              /* Point at first TCB in TCB list               */
            while (ptcb->OSTCBPrio != OS_IDLE_PRIO) {      /* Go through all TCBs in TCB list              */
                OS_ENTER_CRITICAL();
                if (ptcb->OSTCBDly != 0) {                 /* Delayed or waiting for event with TO         */
                    if (--ptcb->OSTCBDly == 0) {           /* Decrement nbr of ticks to end of delay       */
                        if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY) { /* Is task suspended?    */
                            OSRdyGrp               |= ptcb->OSTCBBitY; /* No,  Make task R-to-R (timed out)*/
                            OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
                        } else {                           /* Yes, Leave 1 tick to prevent loosing the ... */
                            ptcb->OSTCBDly = 1;            /* ... task when the suspension is removed.     */
                        }
                    }
                }
                ptcb = ptcb->OSTCBNext;                    /* Point at next TCB in TCB list                */
                OS_EXIT_CRITICAL();
            }
        }
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                             GET VERSION
*
* Description: This function is used to return the version number of uC/OS-II.  The returned value
*              corresponds to uC/OS-II's version number multiplied by 100.  In other words, version 2.00
*              would be returned as 200.
*
* Arguments  : none
*
* Returns    : the version number of uC/OS-II multiplied by 100.
*********************************************************************************************************
*/

INT16U  OSVersion (void)
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频永久免费| 亚洲一区二区精品视频| 亚洲在线观看免费| 紧缚奴在线一区二区三区| 99久久免费视频.com| 日韩一级片网站| 五月天一区二区三区| 一本高清dvd不卡在线观看| 久久久精品天堂| 久久精品国产99国产| 欧美视频在线播放| 亚洲综合丝袜美腿| 9色porny自拍视频一区二区| 26uuu欧美日本| 另类综合日韩欧美亚洲| 制服丝袜国产精品| 五月天亚洲精品| 欧美在线观看一二区| 亚洲日本中文字幕区| 99精品视频中文字幕| 中文字幕亚洲在| 99视频精品全部免费在线| 久久久久久久久97黄色工厂| 九九九久久久精品| 日韩免费电影一区| 精品一区二区三区不卡| 精品久久人人做人人爱| 国内外成人在线视频| 久久这里只有精品视频网| 精品一区二区三区在线视频| 日韩精品在线网站| 国产精品主播直播| 精品国产乱码久久久久久浪潮 | 亚洲国产欧美在线| 99视频精品在线| 一区二区三区成人| 欧洲一区在线电影| 亚洲五月六月丁香激情| 欧美日韩不卡一区二区| 日韩高清不卡在线| 91精品国产一区二区三区香蕉| 日韩国产高清影视| 日韩免费一区二区三区在线播放| 石原莉奈一区二区三区在线观看| 欧美午夜免费电影| 美国毛片一区二区| 久久综合视频网| 波多野结衣一区二区三区| 综合自拍亚洲综合图不卡区| 日本高清不卡一区| 免费看黄色91| 欧美高清在线一区二区| 在线观看亚洲一区| 精品一区二区三区免费| 日本一区二区三区四区在线视频 | 国产精品原创巨作av| 国产精品乱人伦| 欧美在线你懂的| 激情五月激情综合网| 国产精品乱子久久久久| 欧美日韩卡一卡二| 国产激情偷乱视频一区二区三区 | 日本美女视频一区二区| 久久婷婷国产综合精品青草 | proumb性欧美在线观看| 亚洲成年人网站在线观看| 日韩写真欧美这视频| 99久久er热在这里只有精品15| 亚洲成人免费av| 日本一区二区三区四区| 在线成人免费观看| av在线免费不卡| 久久丁香综合五月国产三级网站| 亚洲同性gay激情无套| 日韩欧美亚洲国产精品字幕久久久| 成人短视频下载| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲欧美综合色| 26uuu亚洲综合色| 欧美午夜不卡在线观看免费| 国产精品一区二区91| 午夜精品一区二区三区电影天堂| 国产精品私人影院| 精品久久久久久无| 欧美日韩国产a| 9久草视频在线视频精品| 激情久久久久久久久久久久久久久久| 亚洲人吸女人奶水| 中文一区一区三区高中清不卡| 欧美日韩夫妻久久| 一本久久a久久精品亚洲| 国产在线不卡一区| 免费在线观看一区| 日韩avvvv在线播放| 亚洲一区在线观看免费 | 精品国产露脸精彩对白| 欧美无乱码久久久免费午夜一区| 成人免费高清在线观看| 狠狠色综合播放一区二区| 日韩电影在线免费观看| 亚洲午夜久久久久中文字幕久| 亚洲视频资源在线| 国产精品拍天天在线| 久久综合给合久久狠狠狠97色69| 在线综合+亚洲+欧美中文字幕| 欧美在线免费观看视频| 一本色道**综合亚洲精品蜜桃冫| 99vv1com这只有精品| 波多野结衣中文字幕一区| 成人免费观看男女羞羞视频| 国产成人免费在线观看不卡| 国产福利不卡视频| 国产精品白丝av| 国产成人综合网| 粗大黑人巨茎大战欧美成人| 成人免费看的视频| 91在线看国产| 欧美最新大片在线看| 色悠悠久久综合| 欧美日韩免费电影| 日韩欧美国产一区在线观看| 日韩欧美电影一二三| 2019国产精品| 国产三级久久久| 中文字幕乱码日本亚洲一区二区| 中国av一区二区三区| 亚洲精品视频一区| 视频一区在线播放| 国产一区二区主播在线| 国产成人免费视频| 色婷婷综合久久久久中文一区二区| 91成人国产精品| 日韩写真欧美这视频| 国产日产欧美一区| 亚洲欧美日韩国产另类专区| 午夜国产不卡在线观看视频| 蜜臂av日日欢夜夜爽一区| 国产一区免费电影| 色综合久久久网| 日韩视频免费观看高清完整版| 久久伊人蜜桃av一区二区| 亚洲欧美怡红院| 日韩高清电影一区| 成人三级在线视频| 欧美另类一区二区三区| 久久久久久久精| 亚洲男人都懂的| 久久精品999| 色婷婷精品久久二区二区蜜臀av| 日韩欧美国产精品| 国产精品久久久久久久久久免费看 | 日韩欧美国产成人一区二区| 欧美韩日一区二区三区四区| 午夜精品久久久久久久久 | 蜜臀av亚洲一区中文字幕| 国产成人亚洲精品青草天美 | www.亚洲色图| 5566中文字幕一区二区电影| 中文字幕欧美国产| 首页欧美精品中文字幕| 99久久国产免费看| 日韩免费电影一区| 亚洲国产精品一区二区www在线 | 日本一区二区视频在线观看| 石原莉奈在线亚洲二区| 91在线精品一区二区| 久久九九影视网| 偷拍日韩校园综合在线| 波多野结衣亚洲| 精品国产三级a在线观看| 亚洲一区二区视频在线观看| 国产精品一二一区| 日韩一区二区中文字幕| 亚洲人成影院在线观看| 成人午夜激情在线| 日韩欧美国产一区二区在线播放| 亚洲综合成人网| 色综合久久天天综合网| 中文字幕免费观看一区| 精品在线视频一区| 欧美日韩国产高清一区| 亚洲一区二区三区不卡国产欧美| 成人高清视频在线观看| 欧美videos中文字幕| 喷水一区二区三区| 5858s免费视频成人| 亚洲国产三级在线| 欧美三区在线观看| 一区二区三区免费| 在线免费av一区| 亚洲视频免费在线观看| www.欧美日韩| 国产精品免费久久久久| 国产91在线看| 国产精品久线观看视频| 成人动漫av在线| 国产精品久久久久久久久动漫 | 7777精品伊人久久久大香线蕉的 | 亚洲精品久久久久久国产精华液| 99r精品视频|