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

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

?? croutine.h

?? freescale k40/k60 freertos-uip 例程
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
    FreeRTOS V6.0.4 - Copyright (C) 2010 Real Time Engineers Ltd.

    ***************************************************************************
    *                                                                         *
    * If you are:                                                             *
    *                                                                         *
    *    + New to FreeRTOS,                                                   *
    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
    *    + Looking for basic training,                                        *
    *    + Wanting to improve your FreeRTOS skills and productivity           *
    *                                                                         *
    * then take a look at the FreeRTOS eBook                                  *
    *                                                                         *
    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
    *                  http://www.FreeRTOS.org/Documentation                  *
    *                                                                         *
    * A pdf reference manual is also available.  Both are usually delivered   *
    * to your inbox within 20 minutes to two hours when purchased between 8am *
    * and 8pm GMT (although please allow up to 24 hours in case of            *
    * exceptional circumstances).  Thank you for your support!                *
    *                                                                         *
    ***************************************************************************

    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 (version 2) as published by the
    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
    ***NOTE*** The exception to the GPL is included to allow you to distribute
    a combined work that includes FreeRTOS without being obliged to provide the
    source code for proprietary components outside of the FreeRTOS kernel.
    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 and the FreeRTOS license exception along with FreeRTOS; if not it 
    can be viewed here: http://www.freertos.org/a00114.html and also obtained 
    by writing to Richard Barry, contact details for whom are available on the
    FreeRTOS WEB site.

    1 tab == 4 spaces!

    http://www.FreeRTOS.org - Documentation, latest information, license and
    contact details.

    http://www.SafeRTOS.com - A version that is certified for use in safety
    critical systems.

    http://www.OpenRTOS.com - Commercial support, development, porting,
    licensing and training services.
*/

#ifndef INC_FREERTOS_H
	#error "#include FreeRTOS.h" must appear in source files before "#include croutine.h"
#endif




#ifndef CO_ROUTINE_H
#define CO_ROUTINE_H

#include "list.h"

#ifdef __cplusplus
extern "C" {
#endif

/* 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 short 		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
 */
signed 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 long 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 long 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久人人超碰精品| 日韩二区在线观看| 亚洲成人久久影院| 国产老肥熟一区二区三区| 91成人看片片| 国产精品久久久久久亚洲毛片| 午夜伊人狠狠久久| 色八戒一区二区三区| 国产婷婷色一区二区三区在线| 石原莉奈在线亚洲三区| 色综合 综合色| 中文字幕一区二区在线播放 | 欧美日本韩国一区二区三区视频| 久久夜色精品国产噜噜av| 午夜精品久久久久久久久| 91小视频免费观看| 国产精品国产三级国产专播品爱网| 精品在线播放午夜| 日韩欧美亚洲国产另类| 亚洲成人1区2区| 在线观看日产精品| 亚洲综合一区二区| 欧美在线一区二区三区| 亚洲综合免费观看高清完整版在线| 国产不卡高清在线观看视频| 精品国产三级电影在线观看| 久久精品噜噜噜成人av农村| 日韩三级在线免费观看| 日韩二区三区四区| 欧美变态口味重另类| 日本v片在线高清不卡在线观看| 欧美日韩精品电影| 午夜伦理一区二区| 日韩欧美中文一区二区| 久久国产精品一区二区| 精品国产露脸精彩对白| 国产精品一色哟哟哟| 中文字幕不卡在线| 91国内精品野花午夜精品| 午夜在线电影亚洲一区| 欧美一区二区三区日韩视频| 麻豆国产精品一区二区三区| 精品1区2区在线观看| 国产精品99久久久久久久vr| 国产精品美女久久久久aⅴ| 91玉足脚交白嫩脚丫在线播放| 亚洲欧美aⅴ...| 在线电影国产精品| 国产九色精品成人porny | 国产美女视频91| 中文字幕av一区二区三区| 9色porny自拍视频一区二区| 夜夜亚洲天天久久| 精品日韩成人av| www.综合网.com| 香蕉av福利精品导航| 精品国内片67194| 91丝袜美腿高跟国产极品老师 | 欧美xxxxx裸体时装秀| 国产成人精品免费看| 一区二区欧美视频| 亚洲精品一区在线观看| 99久久精品国产一区二区三区| 亚洲成av人在线观看| 精品黑人一区二区三区久久| 一本大道久久a久久精品综合| 免费人成黄页网站在线一区二区| 国产欧美精品一区| 欧美日本国产视频| fc2成人免费人成在线观看播放| 亚洲一区二区精品3399| 久久精品一区四区| 9191成人精品久久| 99精品在线免费| 国产乱国产乱300精品| 亚洲国产日韩一区二区| 国产精品入口麻豆九色| 欧美一区二区日韩一区二区| av不卡免费电影| 国产一区美女在线| 日本成人在线不卡视频| 亚洲天堂av一区| 国产亚洲精品超碰| 91精品国产综合久久久蜜臀图片 | 国产精品国产自产拍高清av| 日韩一级免费一区| 欧美视频一区在线| 99精品久久久久久| 国产91精品欧美| 理论电影国产精品| 日日夜夜一区二区| 亚洲精品国久久99热| 国产精品久久久久久亚洲伦| 精品国产三级a在线观看| 欧美一区二区成人6969| 欧美视频一区二| 欧美中文字幕不卡| 一本色道久久综合亚洲91| 99久久久无码国产精品| 成人精品视频一区二区三区 | 国产精品视频在线看| 欧美精品一区二区三区在线播放 | 日韩高清一区在线| 视频在线观看一区二区三区| 亚洲午夜国产一区99re久久| 亚洲欧美一区二区三区国产精品| 国产欧美日韩精品一区| 国产欧美日韩不卡免费| 国产精品三级视频| 中文字幕一区免费在线观看| 18欧美乱大交hd1984| 久久成人免费电影| 日韩av一二三| 日韩不卡一二三区| 美洲天堂一区二卡三卡四卡视频| 日产国产高清一区二区三区| 日韩不卡一二三区| 韩国成人在线视频| 国产老女人精品毛片久久| 国产成人日日夜夜| 99riav久久精品riav| 91麻豆免费看| 欧美高清性hdvideosex| 欧美一级高清片| 国产亚洲精品超碰| 最新国产成人在线观看| 亚洲国产美女搞黄色| 日本不卡在线视频| 国产高清不卡二三区| 波多野结衣在线一区| 日本精品一区二区三区高清 | 欧美亚洲国产一区二区三区| 欧美人伦禁忌dvd放荡欲情| 欧美一级黄色录像| 中文字幕国产精品一区二区| 亚洲综合一区二区| 麻豆精品视频在线| 成人综合婷婷国产精品久久免费| 不卡av电影在线播放| 欧美日韩国产在线观看| 欧美mv和日韩mv国产网站| 国产蜜臀97一区二区三区| 尤物在线观看一区| 狠狠色丁香久久婷婷综合_中| 高清beeg欧美| 欧美日韩国产系列| 亚洲国产精品黑人久久久| 亚洲一区在线观看免费| 国内外精品视频| 91黄色激情网站| 欧美激情中文不卡| 天天操天天干天天综合网| 国产大陆精品国产| 欧美日本高清视频在线观看| 中文字幕成人网| 久久精品国产99久久6| 色综合视频在线观看| 久久嫩草精品久久久精品一| 亚洲高清免费在线| www.日韩av| 精品国产1区2区3区| 亚洲va欧美va人人爽| 高清av一区二区| 亚洲精品一线二线三线| 亚洲成av人在线观看| 91色乱码一区二区三区| 2017欧美狠狠色| 青青草国产成人av片免费| 日本精品一区二区三区四区的功能| 久久综合九色综合97婷婷女人| 无码av中文一区二区三区桃花岛| 国产福利一区二区| 亚洲精品一区二区三区香蕉| 五月天激情综合| 欧美三级三级三级爽爽爽| 亚洲欧洲在线观看av| 丁香六月久久综合狠狠色| 欧美成人官网二区| 日韩高清不卡在线| 欧美日韩一区二区在线观看视频| 亚洲欧洲日产国产综合网| 国产成人亚洲精品青草天美| 精品久久久久久无| 日本午夜一本久久久综合| 欧美偷拍一区二区| 亚洲伦在线观看| 91麻豆精品秘密| 亚洲图片另类小说| 91在线码无精品| 亚洲男女一区二区三区| 99精品视频在线观看免费| 国产精品久久久久久一区二区三区| 高清国产一区二区三区| 久久精品免费在线观看| 国产成人综合视频| 亚洲国产精品传媒在线观看| 成人午夜碰碰视频| 国产精品久久久久久久裸模| av在线这里只有精品| 亚洲人妖av一区二区|