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

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

?? croutine.h

?? Este é um rtos free para a familia arm7
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
	FreeRTOS V4.0.0 - Copyright (C) 2003-2006 Richard Barry.

	This file is part of the FreeRTOS distribution.

	FreeRTOS is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	FreeRTOS is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with FreeRTOS; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

	A special exception to the GPL can be applied should you wish to distribute
	a combined work that includes FreeRTOS, without being obliged to provide
	the source code for any proprietary components.  See the licensing section
	of http://www.FreeRTOS.org for full details of how and when the exception
	can be applied.

	***************************************************************************
	See http://www.FreeRTOS.org for documentation, latest information, license
	and contact details.  Please ensure to read the configuration and relevant
	port sections of the online documentation.
	***************************************************************************
*/
#ifndef CO_ROUTINE_H
#define CO_ROUTINE_H

#include "list.h"

/* Used to hide the implementation of the co-routine control block.  The 
control block structure however has to be included in the header due to 
the macro implementation of the co-routine functionality. */
typedef void * xCoRoutineHandle;

/* Defines the prototype to which co-routine functions must conform. */
typedef void (*crCOROUTINE_CODE)( xCoRoutineHandle, unsigned portBASE_TYPE );

typedef struct corCoRoutineControlBlock
{
	crCOROUTINE_CODE 		pxCoRoutineFunction;
	xListItem				xGenericListItem;	/*< List item used to place the CRCB in ready and blocked queues. */
	xListItem				xEventListItem;		/*< List item used to place the CRCB in event lists. */
	unsigned portBASE_TYPE 	uxPriority;			/*< The priority of the co-routine in relation to other co-routines. */
	unsigned portBASE_TYPE 	uxIndex;			/*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */
	unsigned portSHORT 		uxState;			/*< Used internally by the co-routine implementation. */
} corCRCB; /* Co-routine control block.  Note must be identical in size down to uxPriority with tskTCB. */

/**
 * croutine. h
 *<pre>
 portBASE_TYPE xCoRoutineCreate(
                                 crCOROUTINE_CODE pxCoRoutineCode,
                                 unsigned portBASE_TYPE uxPriority,
                                 unsigned portBASE_TYPE uxIndex
                               );</pre>
 *
 * Create a new co-routine and add it to the list of co-routines that are 
 * ready to run.
 *
 * @param pxCoRoutineCode Pointer to the co-routine function.  Co-routine 
 * functions require special syntax - see the co-routine section of the WEB 
 * documentation for more information.
 *
 * @param uxPriority The priority with respect to other co-routines at which 
 *  the co-routine will run.
 *
 * @param uxIndex Used to distinguish between different co-routines that
 * execute the same function.  See the example below and the co-routine section
 * of the WEB documentation for further information.
 *
 * @return pdPASS if the co-routine was successfully created and added to a ready
 * list, otherwise an error code defined with ProjDefs.h.
 *
 * Example usage:
   <pre>
 // Co-routine to be created.
 void vFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
 {
 // Variables in co-routines must be declared static if they must maintain value across a blocking call.
 // This may not be necessary for const variables.
 static const char cLedToFlash[ 2 ] = { 5, 6 };
 static const portTickType xTimeToDelay[ 2 ] = { 200, 400 };

     // Must start every co-routine with a call to crSTART();
     crSTART( xHandle );

     for( ;; )
     {
         // This co-routine just delays for a fixed period, then toggles
         // an LED.  Two co-routines are created using this function, so
         // the uxIndex parameter is used to tell the co-routine which
         // LED to flash and how long to delay.  This assumes xQueue has
         // already been created.
         vParTestToggleLED( cLedToFlash[ uxIndex ] );
         crDELAY( xHandle, uxFlashRates[ uxIndex ] );
     }

     // Must end every co-routine with a call to crEND();
     crEND();
 }

 // Function that creates two co-routines.
 void vOtherFunction( void )
 {
 unsigned char ucParameterToPass;
 xTaskHandle xHandle;
		
     // Create two co-routines at priority 0.  The first is given index 0
     // so (from the code above) toggles LED 5 every 200 ticks.  The second
     // is given index 1 so toggles LED 6 every 400 ticks.
     for( uxIndex = 0; uxIndex < 2; uxIndex++ )
     {
         xCoRoutineCreate( vFlashCoRoutine, 0, uxIndex );
     }  
 }
   </pre>
 * \defgroup xCoRoutineCreate xCoRoutineCreate
 * \ingroup Tasks
 */
portBASE_TYPE xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxIndex );


/**
 * croutine. h
 *<pre>
 void vCoRoutineSchedule( void );</pre>
 *
 * Run a co-routine.
 * 
 * vCoRoutineSchedule() executes the highest priority co-routine that is able
 * to run.  The co-routine will execute until it either blocks, yields or is
 * preempted by a task.  Co-routines execute cooperatively so one 
 * co-routine cannot be preempted by another, but can be preempted by a task.
 *
 * If an application comprises of both tasks and co-routines then 
 * vCoRoutineSchedule should be called from the idle task (in an idle task 
 * hook).
 *
 * Example usage:
   <pre>
 // This idle task hook will schedule a co-routine each time it is called.
 // The rest of the idle task will execute between co-routine calls.
 void vApplicationIdleHook( void )
 {
	vCoRoutineSchedule();
 }

 // Alternatively, if you do not require any other part of the idle task to 
 // execute, the idle task hook can call vCoRoutineScheduler() within an
 // infinite loop.
 void vApplicationIdleHook( void )
 {
    for( ;; )
    {
        vCoRoutineSchedule();
    }
 }
 </pre>
 * \defgroup vCoRoutineSchedule vCoRoutineSchedule
 * \ingroup Tasks
 */
void vCoRoutineSchedule( void );

/**
 * croutine. h
 * <pre>
 crSTART( xCoRoutineHandle xHandle );</pre>
 *
 * This macro MUST always be called at the start of a co-routine function.
 *
 * Example usage:
   <pre>
 // Co-routine to be created.
 void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
 {
 // Variables in co-routines must be declared static if they must maintain value across a blocking call.
 static portLONG ulAVariable;

     // Must start every co-routine with a call to crSTART();
     crSTART( xHandle );

     for( ;; )
     {
          // Co-routine functionality goes here.
     }

     // Must end every co-routine with a call to crEND();
     crEND();
 }</pre>
 * \defgroup crSTART crSTART
 * \ingroup Tasks
 */
#define crSTART( pxCRCB ) switch( ( ( corCRCB * )pxCRCB )->uxState ) { case 0:

/**
 * croutine. h
 * <pre>
 crEND();</pre>
 *
 * This macro MUST always be called at the end of a co-routine function.
 *
 * Example usage:
   <pre>
 // Co-routine to be created.
 void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
 {
 // Variables in co-routines must be declared static if they must maintain value across a blocking call.
 static portLONG ulAVariable;

     // Must start every co-routine with a call to crSTART();
     crSTART( xHandle );

     for( ;; )
     {
          // Co-routine functionality goes here.
     }

     // Must end every co-routine with a call to crEND();
     crEND();
 }</pre>
 * \defgroup crSTART crSTART
 * \ingroup Tasks
 */
#define crEND() }

/*
 * These macros are intended for internal use by the co-routine implementation 
 * only.  The macros should not be used directly by application writers.
 */
#define crSET_STATE0( xHandle ) ( ( corCRCB * )xHandle)->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
#define crSET_STATE1( xHandle ) ( ( corCRCB * )xHandle)->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):

/**
 * croutine. h
 *<pre>
 crDELAY( xCoRoutineHandle xHandle, portTickType xTicksToDelay );</pre>
 *
 * Delay a co-routine for a fixed period of time.
 *
 * crDELAY can only be called from the co-routine function itself - not
 * from within a function called by the co-routine function.  This is because
 * co-routines do not maintain their own stack.
 *
 * @param xHandle The handle of the co-routine to delay.  This is the xHandle
 * parameter of the co-routine function.
 *
 * @param xTickToDelay The number of ticks that the co-routine should delay 
 * for.  The actual amount of time this equates to is defined by 
 * configTICK_RATE_HZ (set in FreeRTOSConfig.h).  The constant portTICK_RATE_MS
 * can be used to convert ticks to milliseconds.
 *
 * Example usage:
   <pre>
 // Co-routine to be created.
 void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
 {
 // Variables in co-routines must be declared static if they must maintain value across a blocking call.
 // This may not be necessary for const variables.
 // We are to delay for 200ms.
 static const xTickType xDelayTime = 200 / portTICK_RATE_MS;

     // Must start every co-routine with a call to crSTART();
     crSTART( xHandle );

     for( ;; )
     {
        // Delay for 200ms.
        crDELAY( xHandle, xDelayTime );

        // Do something here.
     }

     // Must end every co-routine with a call to crEND();
     crEND();
 }</pre>
 * \defgroup crDELAY crDELAY
 * \ingroup Tasks
 */
#define crDELAY( xHandle, xTicksToDelay )												\
	if( xTicksToDelay > 0 )																\
	{																					\
		vCoRoutineAddToDelayedList( xTicksToDelay, NULL );								\
	}																					\
	crSET_STATE0( xHandle );

/**
 * <pre>
 crQUEUE_SEND( 
                  xCoRoutineHandle xHandle, 
                  xQueueHandle pxQueue, 
                  void *pvItemToQueue, 
                  portTickType xTicksToWait, 
                  portBASE_TYPE *pxResult 
             )</pre>
 *
 * The macro's crQUEUE_SEND() and crQUEUE_RECEIVE() are the co-routine 
 * equivalent to the xQueueSend() and xQueueReceive() functions used by tasks.  
 *
 * crQUEUE_SEND and crQUEUE_RECEIVE can only be used from a co-routine whereas  
 * xQueueSend() and xQueueReceive() can only be used from tasks.
 *
 * crQUEUE_SEND can only be called from the co-routine function itself - not
 * from within a function called by the co-routine function.  This is because
 * co-routines do not maintain their own stack.
 *
 * See the co-routine section of the WEB documentation for information on 
 * passing data between tasks and co-routines and between ISR's and 
 * co-routines.
 *
 * @param xHandle The handle of the calling co-routine.  This is the xHandle
 * parameter of the co-routine function.
 *
 * @param pxQueue The handle of the queue on which the data will be posted.  
 * The handle is obtained as the return value when the queue is created using 
 * the xQueueCreate() API function.
 *
 * @param pvItemToQueue A pointer to the data being posted onto the queue.
 * The number of bytes of each queued item is specified when the queue is
 * created.  This number of bytes is copied from pvItemToQueue into the queue
 * itself.
 *
 * @param xTickToDelay The number of ticks that the co-routine should block 
 * to wait for space to become available on the queue, should space not be
 * available immediately. The actual amount of time this equates to is defined 
 * by configTICK_RATE_HZ (set in FreeRTOSConfig.h).  The constant 
 * portTICK_RATE_MS can be used to convert ticks to milliseconds (see example
 * below).
 *
 * @param pxResult The variable pointed to by pxResult will be set to pdPASS if
 * data was successfully posted onto the queue, otherwise it will be set to an 
 * error defined within ProjDefs.h.
 *
 * Example usage:
   <pre>
 // Co-routine function that blocks for a fixed period then posts a number onto
 // a queue.
 static void prvCoRoutineFlashTask( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
 {
 // Variables in co-routines must be declared static if they must maintain value across a blocking call.
 static portBASE_TYPE xNumberToPost = 0;
 static portBASE_TYPE xResult;

    // Co-routines must begin with a call to crSTART().
    crSTART( xHandle );

    for( ;; )
    {
        // This assumes the queue has already been created.
        crQUEUE_SEND( xHandle, xCoRoutineQueue, &xNumberToPost, NO_DELAY, &xResult );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美激情插| 免费成人在线视频观看| 欧美高清在线视频| 亚洲一区二区三区美女| 精品一区二区av| 欧美日韩免费不卡视频一区二区三区| 久久综合九色综合欧美98| 一区二区在线免费观看| 国产精品亚洲第一| 日韩午夜激情免费电影| 亚洲成av人影院在线观看网| 91视频国产观看| 国产精品久久久久aaaa| 老司机一区二区| 56国语精品自产拍在线观看| 一级女性全黄久久生活片免费| 国产精品影视在线| 精品福利一区二区三区| 视频一区二区中文字幕| 欧美日韩一级二级| 一级中文字幕一区二区| 在线观看免费视频综合| 亚洲免费观看高清在线观看| 成人av在线资源网站| 国产精品久线在线观看| 懂色av中文一区二区三区| 久久久久亚洲蜜桃| 成人一级黄色片| 国产精品高清亚洲| av男人天堂一区| 中文字幕欧美一区| av在线不卡网| 综合久久给合久久狠狠狠97色 | 欧美写真视频网站| 亚洲一卡二卡三卡四卡无卡久久| 日本道精品一区二区三区| 亚洲裸体在线观看| 欧美日本不卡视频| 蜜桃视频一区二区三区在线观看| 91精品国产色综合久久ai换脸 | 亚洲一区二区三区激情| 欧美色综合网站| 全国精品久久少妇| 久久久影视传媒| 97aⅴ精品视频一二三区| 亚洲精品写真福利| 欧美一区二区三区免费| 国产一区二区三区在线观看免费 | 99精品在线观看视频| 亚洲欧美日韩国产综合| 在线不卡的av| 国产大陆精品国产| 亚洲欧美日韩久久| 日韩欧美精品在线| av一二三不卡影片| 日本不卡免费在线视频| 国产偷国产偷亚洲高清人白洁| 波多野结衣亚洲| 亚洲午夜一二三区视频| 欧美本精品男人aⅴ天堂| 成人教育av在线| 一区二区三区在线视频观看 | 欧美色视频在线| 久久国产尿小便嘘嘘| 中文成人av在线| 欧美在线综合视频| 国产精品一二三四| 亚洲成av人片在www色猫咪| 日韩免费一区二区| av电影在线观看完整版一区二区| 亚洲一二三级电影| 中文欧美字幕免费| 日韩一区二区三区高清免费看看| 国产盗摄精品一区二区三区在线 | 亚洲精品久久嫩草网站秘色| 日韩欧美国产1| 91国偷自产一区二区开放时间 | 欧美日韩亚洲综合在线| 精品中文字幕一区二区| 亚洲精品日韩一| 久久久不卡网国产精品一区| 欧美日韩国产123区| 成人一区二区在线观看| 免费成人在线视频观看| 亚洲欧洲99久久| 久久影视一区二区| 678五月天丁香亚洲综合网| 色婷婷久久久久swag精品| 国产成人精品免费看| 免费观看30秒视频久久| 亚洲1区2区3区4区| 亚洲女同ⅹxx女同tv| 久久久一区二区| 日韩精品一区二| 91精品国产一区二区人妖| 成人免费视频app| 国产精品一区二区三区网站| 天堂av在线一区| 亚洲一区在线观看网站| 亚洲人成在线播放网站岛国 | gogogo免费视频观看亚洲一| 国模少妇一区二区三区| 日本大胆欧美人术艺术动态 | 日韩理论在线观看| 国产欧美一区二区三区鸳鸯浴| 欧美不卡视频一区| 日韩一区二区三区视频| 日韩欧美国产一区在线观看| 91精品国产91久久综合桃花| 欧美日本一区二区三区| 欧美老年两性高潮| 欧美浪妇xxxx高跟鞋交| 欧美久久久一区| 欧美一区二区性放荡片| 制服丝袜在线91| 日韩一区二区精品葵司在线| 欧美变态tickling挠脚心| 日韩免费看的电影| 精品国产乱码久久久久久1区2区 | 午夜视频久久久久久| 一区二区激情小说| 亚洲成av人影院| 久久99精品久久久| 狠狠色狠狠色合久久伊人| 国产精品1区2区| 成人动漫一区二区| 欧美亚洲国产一区在线观看网站 | 中文字幕五月欧美| 亚洲伦在线观看| 天使萌一区二区三区免费观看| 日韩精品欧美精品| 国产精品综合视频| 97se亚洲国产综合自在线| 欧美色图激情小说| 精品成人在线观看| 中文字幕在线视频一区| 一区二区三区日韩欧美| 免费看日韩精品| 成人激情综合网站| 欧美男女性生活在线直播观看| 久久―日本道色综合久久| 国产精品嫩草99a| 亚洲精品国产品国语在线app| 舔着乳尖日韩一区| 国产精品亚洲成人| 欧美色视频在线| 国产婷婷色一区二区三区在线| 一区二区三区免费| 国产精品一区在线观看你懂的| 北条麻妃国产九九精品视频| 欧美群妇大交群的观看方式| 国产亚洲成av人在线观看导航| 一区二区三区四区五区视频在线观看| 男女性色大片免费观看一区二区| av不卡免费在线观看| 日韩午夜中文字幕| 亚洲欧洲日韩在线| 久久超碰97中文字幕| 色天天综合色天天久久| 久久午夜电影网| 同产精品九九九| 91小视频在线免费看| 欧美一个色资源| 亚洲免费成人av| 国产精品123| 日韩欧美一级精品久久| 一区二区三区精品在线| 懂色av一区二区在线播放| 欧美久久久久久久久中文字幕| 中文字幕中文字幕中文字幕亚洲无线| 蜜臀99久久精品久久久久久软件| 99国产精品久久久久| 欧美成人乱码一区二区三区| 午夜精品久久久久久不卡8050| 波多野结衣视频一区| 久久精品视频在线看| 免费人成在线不卡| 欧美三级蜜桃2在线观看| 中文字幕一区二区三区精华液| 久久精品国产一区二区三 | 视频一区二区三区入口| 一本到不卡免费一区二区| 亚洲国产精品高清| 国产麻豆精品一区二区| 欧美一级日韩一级| 青草国产精品久久久久久| 欧美日韩国产一级| 亚洲成人免费影院| 欧美性大战久久久久久久蜜臀| 亚洲女同ⅹxx女同tv| 91在线码无精品| 亚洲视频免费在线| 色婷婷综合久久| 一区二区三区不卡视频在线观看| 91在线你懂得| 亚洲精品视频自拍| 欧美视频你懂的| 天天综合色天天综合色h| 欧美美女黄视频| 日韩精品乱码av一区二区|