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

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

?? croutine.h

?? 一個開源的Modbus協議棧
?? H
?? 第 1 頁 / 共 2 頁
字號:
        if( xResult != pdPASS )

        {

            // The message was not posted!

        }



        // Increment the number to be posted onto the queue.

        xNumberToPost++;



        // Delay for 100 ticks.

        crDELAY( xHandle, 100 );

    }



    // Co-routines must end with a call to crEND().

    crEND();

 }</pre>

 * \defgroup crQUEUE_SEND crQUEUE_SEND

 * \ingroup Tasks

 */

#define crQUEUE_SEND( xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult )			\

{																						\

	*pxResult = xQueueCRSend( pxQueue, pvItemToQueue, xTicksToWait );					\

	if( *pxResult == errQUEUE_BLOCKED )													\

	{																					\

		crSET_STATE0( xHandle );														\

		*pxResult = xQueueCRSend( pxQueue, pvItemToQueue, 0 );							\

	}																					\

	if( *pxResult == errQUEUE_YIELD )													\

	{																					\

		crSET_STATE1( xHandle );														\

		*pxResult = pdPASS;																\

	}																					\

}



/**

 * croutine. h

 * <pre>

  crQUEUE_RECEIVE(

                     xCoRoutineHandle xHandle,

                     xQueueHandle pxQueue,

                     void *pvBuffer,

                     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_RECEIVE 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 from which the data will be received.

 * The handle is obtained as the return value when the queue is created using

 * the xQueueCreate() API function.

 *

 * @param pvBuffer The buffer into which the received item is to be copied.

 * The number of bytes of each queued item is specified when the queue is

 * created.  This number of bytes is copied into pvBuffer.

 *

 * @param xTickToDelay The number of ticks that the co-routine should block

 * to wait for data to become available from the queue, should data 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 the

 * crQUEUE_SEND example).

 *

 * @param pxResult The variable pointed to by pxResult will be set to pdPASS if

 * data was successfully retrieved from the queue, otherwise it will be set to

 * an error code as defined within ProjDefs.h.

 *

 * Example usage:

 <pre>

 // A co-routine receives the number of an LED to flash from a queue.  It

 // blocks on the queue until the number is received.

 static void prvCoRoutineFlashWorkTask( 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 xResult;

 static unsigned portBASE_TYPE uxLEDToFlash;



    // All co-routines must start with a call to crSTART().

    crSTART( xHandle );



    for( ;; )

    {

        // Wait for data to become available on the queue.

        crQUEUE_RECEIVE( xHandle, xCoRoutineQueue, &uxLEDToFlash, portMAX_DELAY, &xResult );



        if( xResult == pdPASS )

        {

            // We received the LED to flash - flash it!

            vParTestToggleLED( uxLEDToFlash );

        }

    }



    crEND();

 }</pre>

 * \defgroup crQUEUE_RECEIVE crQUEUE_RECEIVE

 * \ingroup Tasks

 */

#define crQUEUE_RECEIVE( xHandle, pxQueue, pvBuffer, xTicksToWait, pxResult )			\

{																						\

	*pxResult = xQueueCRReceive( pxQueue, pvBuffer, xTicksToWait );						\

	if( *pxResult == errQUEUE_BLOCKED ) 												\

	{																					\

		crSET_STATE0( xHandle );														\

		*pxResult = xQueueCRReceive( pxQueue, pvBuffer, 0 );							\

	}																					\

	if( *pxResult == errQUEUE_YIELD )													\

	{																					\

		crSET_STATE1( xHandle );														\

		*pxResult = pdPASS;																\

	}																					\

}



/**

 * croutine. h

 * <pre>

  crQUEUE_SEND_FROM_ISR(

                            xQueueHandle pxQueue,

                            void *pvItemToQueue,

                            portBASE_TYPE xCoRoutinePreviouslyWoken

                       )</pre>

 *

 * The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the

 * co-routine equivalent to the xQueueSendFromISR() and xQueueReceiveFromISR()

 * functions used by tasks.

 *

 * crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to

 * pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and

 * xQueueReceiveFromISR() can only be used to pass data between a task and and

 * ISR.

 *

 * crQUEUE_SEND_FROM_ISR can only be called from an ISR to send data to a queue

 * that is being used from within a co-routine.

 *

 * 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 xQueue The handle to the queue on which the item is to be posted.

 *

 * @param pvItemToQueue A pointer to the item that is to be placed on the

 * queue.  The size of the items the queue will hold was defined when the

 * queue was created, so this many bytes will be copied from pvItemToQueue

 * into the queue storage area.

 *

 * @param xCoRoutinePreviouslyWoken This is included so an ISR can post onto

 * the same queue multiple times from a single interrupt.  The first call

 * should always pass in pdFALSE.  Subsequent calls should pass in

 * the value returned from the previous call.

 *

 * @return pdTRUE if a co-routine was woken by posting onto the queue.  This is

 * used by the ISR to determine if a context switch may be required following

 * the ISR.

 *

 * Example usage:

 <pre>

 // A co-routine that blocks on a queue waiting for characters to be received.

 static void vReceivingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )

 {

 portCHAR cRxedChar;

 portBASE_TYPE xResult;



     // All co-routines must start with a call to crSTART().

     crSTART( xHandle );



     for( ;; )

     {

         // Wait for data to become available on the queue.  This assumes the

         // queue xCommsRxQueue has already been created!

         crQUEUE_RECEIVE( xHandle, xCommsRxQueue, &uxLEDToFlash, portMAX_DELAY, &xResult );



         // Was a character received?

         if( xResult == pdPASS )

         {

             // Process the character here.

         }

     }



     // All co-routines must end with a call to crEND().

     crEND();

 }



 // An ISR that uses a queue to send characters received on a serial port to

 // a co-routine.

 void vUART_ISR( void )

 {

 portCHAR cRxedChar;

 portBASE_TYPE xCRWokenByPost = pdFALSE;



     // We loop around reading characters until there are none left in the UART.

     while( UART_RX_REG_NOT_EMPTY() )

     {

         // Obtain the character from the UART.

         cRxedChar = UART_RX_REG;



         // Post the character onto a queue.  xCRWokenByPost will be pdFALSE

         // the first time around the loop.  If the post causes a co-routine

         // to be woken (unblocked) then xCRWokenByPost will be set to pdTRUE.

         // In this manner we can ensure that if more than one co-routine is

         // blocked on the queue only one is woken by this ISR no matter how

         // many characters are posted to the queue.

         xCRWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsRxQueue, &cRxedChar, xCRWokenByPost );

     }

 }</pre>

 * \defgroup crQUEUE_SEND_FROM_ISR crQUEUE_SEND_FROM_ISR

 * \ingroup Tasks

 */

#define crQUEUE_SEND_FROM_ISR( pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken ) xQueueCRSendFromISR( pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken )





/**

 * croutine. h

 * <pre>

  crQUEUE_SEND_FROM_ISR(

                            xQueueHandle pxQueue,

                            void *pvBuffer,

                            portBASE_TYPE * pxCoRoutineWoken

                       )</pre>

 *

 * The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the

 * co-routine equivalent to the xQueueSendFromISR() and xQueueReceiveFromISR()

 * functions used by tasks.

 *

 * crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() can only be used to

 * pass data between a co-routine and and ISR, whereas xQueueSendFromISR() and

 * xQueueReceiveFromISR() can only be used to pass data between a task and and

 * ISR.

 *

 * crQUEUE_RECEIVE_FROM_ISR can only be called from an ISR to receive data

 * from a queue that is being used from within a co-routine (a co-routine

 * posted to the queue).

 *

 * 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 xQueue The handle to the queue on which the item is to be posted.

 *

 * @param pvBuffer A pointer to a buffer into which the received item will be

 * placed.  The size of the items the queue will hold was defined when the

 * queue was created, so this many bytes will be copied from the queue into

 * pvBuffer.

 *

 * @param pxCoRoutineWoken A co-routine may be blocked waiting for space to become

 * available on the queue.  If crQUEUE_RECEIVE_FROM_ISR causes such a

 * co-routine to unblock *pxCoRoutineWoken will get set to pdTRUE, otherwise

 * *pxCoRoutineWoken will remain unchanged.

 *

 * @return pdTRUE an item was successfully received from the queue, otherwise

 * pdFALSE.

 *

 * Example usage:

 <pre>

 // A co-routine that posts a character to a queue then blocks for a fixed

 // period.  The character is incremented each time.

 static void vSendingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )

 {

 // cChar holds its value while this co-routine is blocked and must therefore

 // be declared static.

 static portCHAR cCharToTx = 'a';

 portBASE_TYPE xResult;



     // All co-routines must start with a call to crSTART().

     crSTART( xHandle );



     for( ;; )

     {

         // Send the next character to the queue.

         crQUEUE_SEND( xHandle, xCoRoutineQueue, &cCharToTx, NO_DELAY, &xResult );



         if( xResult == pdPASS )

         {

             // The character was successfully posted to the queue.

         }

		 else

		 {

			// Could not post the character to the queue.

		 }



         // Enable the UART Tx interrupt to cause an interrupt in this

		 // hypothetical UART.  The interrupt will obtain the character

		 // from the queue and send it.

		 ENABLE_RX_INTERRUPT();



		 // Increment to the next character then block for a fixed period.

		 // cCharToTx will maintain its value across the delay as it is

		 // declared static.

		 cCharToTx++;

		 if( cCharToTx > 'x' )

		 {

			cCharToTx = 'a';

		 }

		 crDELAY( 100 );

     }



     // All co-routines must end with a call to crEND().

     crEND();

 }



 // An ISR that uses a queue to receive characters to send on a UART.

 void vUART_ISR( void )

 {

 portCHAR cCharToTx;

 portBASE_TYPE xCRWokenByPost = pdFALSE;



     while( UART_TX_REG_EMPTY() )

     {

         // Are there any characters in the queue waiting to be sent?

		 // xCRWokenByPost will automatically be set to pdTRUE if a co-routine

		 // is woken by the post - ensuring that only a single co-routine is

		 // woken no matter how many times we go around this loop.

         if( crQUEUE_RECEIVE_FROM_ISR( pxQueue, &cCharToTx, &xCRWokenByPost ) )

		 {

			 SEND_CHARACTER( cCharToTx );

		 }

     }

 }</pre>

 * \defgroup crQUEUE_RECEIVE_FROM_ISR crQUEUE_RECEIVE_FROM_ISR

 * \ingroup Tasks

 */

#define crQUEUE_RECEIVE_FROM_ISR( pxQueue, pvBuffer, pxCoRoutineWoken ) xQueueCRReceiveFromISR( pxQueue, pvBuffer, pxCoRoutineWoken )



/*

 * This function is intended for internal use by the co-routine macros only.

 * The macro nature of the co-routine implementation requires that the

 * prototype appears here.  The function should not be used by application

 * writers.

 *

 * Removes the current co-routine from its ready list and places it in the

 * appropriate delayed list.

 */

void vCoRoutineAddToDelayedList( portTickType xTicksToDelay, xList *pxEventList );



/*

 * This function is intended for internal use by the queue implementation only.

 * The function should not be used by application writers.

 *

 * Removes the highest priority co-routine from the event list and places it in

 * the pending ready list.

 */

signed portBASE_TYPE xCoRoutineRemoveFromEventList( const xList *pxEventList );





#endif /* CO_ROUTINE_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女www一区二区| 亚洲精品在线三区| 精品国产乱码久久久久久1区2区 | 欧美电影免费观看高清完整版在线| 亚洲精品日韩综合观看成人91| 欧美精品一区二区三区在线播放| 成人a级免费电影| 一区二区三区影院| 亚洲一区在线免费观看| 亚洲人成精品久久久久久| 精品久久国产97色综合| 久久综合狠狠综合久久激情| 亚洲一区二区三区精品在线| 夜夜夜精品看看| 久久男人中文字幕资源站| 精品国产sm最大网站免费看| 精品黑人一区二区三区久久| 在线观看一区二区视频| 在线观看91av| 国产美女一区二区三区| 日韩欧美久久一区| 国产亚洲精品aa午夜观看| 国产一区二区三区电影在线观看 | 毛片基地黄久久久久久天堂| 国产九色sp调教91| 91一区二区在线| 欧美自拍偷拍午夜视频| 亚洲女同一区二区| 亚洲乱码国产乱码精品精的特点| 欧美一二三四在线| 久久久久久麻豆| 精品三级av在线| 欧美日韩一卡二卡三卡 | 欧美日韩三级在线| 欧美另类变人与禽xxxxx| 91麻豆精品国产91久久久资源速度| 国内不卡的二区三区中文字幕 | 亚洲人被黑人高潮完整版| 欧美一区二区三区色| 久久精品人人爽人人爽| 欧美高清dvd| 欧美精品一区二区三区在线播放| 亚洲欧美日本在线| 中文字幕va一区二区三区| 久久综合九色综合欧美就去吻| 欧美日韩精品免费观看视频| 久久久久久久久久久久电影| 亚洲电影一级片| 亚洲精品videosex极品| 夜夜精品视频一区二区| 日韩成人午夜电影| 一区二区三区日韩欧美| 亚洲精品中文在线影院| 精品国产乱码久久久久久久久| 一区二区三区在线视频观看58| 国产综合色精品一区二区三区| 欧美日韩三级一区| 欧美精品久久一区| 亚洲小少妇裸体bbw| 成人免费av资源| 欧美中文字幕一区| 欧美一区二区三区色| 亚洲第一综合色| 成人动漫av在线| 99久久777色| 日韩一区二区三区视频在线观看| 99精品视频在线免费观看| 久久久国际精品| 国产综合色视频| 久久久久久一级片| 国产精品综合av一区二区国产馆| 99久久99久久综合| 国产精品高潮久久久久无| 成人性生交大片| 91视频一区二区| 色www精品视频在线观看| 在线视频观看一区| 亚洲国产精品国自产拍av| 国产一区在线看| 东方欧美亚洲色图在线| 国产日产精品1区| 亚洲不卡av一区二区三区| 国产高清久久久久| 国产片一区二区| 亚洲一区二区高清| 欧美日韩国产精品成人| 国产农村妇女毛片精品久久麻豆| 国产精品一品二品| 中文字幕欧美激情一区| 九九热在线视频观看这里只有精品| 欧美一区二区观看视频| 日韩欧美在线网站| 激情综合网天天干| 美日韩一区二区三区| 日本韩国欧美国产| 国产女人aaa级久久久级 | 欧美一区三区二区| 日韩二区在线观看| 精品99一区二区| 亚洲六月丁香色婷婷综合久久| 亚洲国产日韩精品| 日本不卡在线视频| 日韩一区二区电影网| 国产综合色在线| 综合色天天鬼久久鬼色| 欧美日韩国产综合草草| 国产91高潮流白浆在线麻豆| 亚洲欧美电影一区二区| 在线中文字幕一区| 激情综合色综合久久综合| 日本一二三不卡| 91精品国产欧美日韩| 亚洲男人的天堂在线观看| 91麻豆精品91久久久久久清纯| 一区二区三区精品久久久| 91麻豆福利精品推荐| 玖玖九九国产精品| 日韩欧美在线1卡| 久国产精品韩国三级视频| 亚洲人成影院在线观看| 精品久久久久99| 色综合激情五月| 国产精品无人区| 3d动漫精品啪啪1区2区免费| 99精品1区2区| 青娱乐精品在线视频| 亚洲欧洲av色图| 久久理论电影网| 韩国女主播一区| 亚洲6080在线| 亚洲精品老司机| 亚洲欧洲日韩在线| 精品久久一二三区| 丁香桃色午夜亚洲一区二区三区| 久久久99精品久久| 在线电影一区二区三区| 男人操女人的视频在线观看欧美| 亚洲激情av在线| 717成人午夜免费福利电影| 色综合久久久久综合99| 成人蜜臀av电影| 性久久久久久久| 亚洲午夜精品17c| 日韩一区二区视频在线观看| 欧美日韩精品专区| 欧洲人成人精品| 色八戒一区二区三区| 日本伊人精品一区二区三区观看方式| 亚洲视频一二三| 怡红院av一区二区三区| 91精品国产综合久久福利软件| 色综合婷婷久久| 久久99精品久久久久久动态图| 五月天激情综合| 五月婷婷另类国产| 日韩高清在线一区| 蜜桃久久久久久久| 亚洲人123区| 欧美mv和日韩mv的网站| 欧美tickling网站挠脚心| 日韩欧美激情四射| 欧美精品一区二区三区在线| 精品三级av在线| 在线免费不卡电影| 欧美日韩久久一区| 日韩精品一区二区三区中文精品| 日韩三级免费观看| 欧美怡红院视频| 国产精品资源网| 人人超碰91尤物精品国产| 国产精品久久久久久一区二区三区| 国产精品久久久久久亚洲毛片 | 精品无码三级在线观看视频| 国产精品国产三级国产普通话三级 | 欧美日韩一二三| 欧美一区二区三区色| 中文字幕+乱码+中文字幕一区| 亚洲视频香蕉人妖| 亚洲丰满少妇videoshd| 亚洲精品一线二线三线无人区| 久久久久久久电影| 3d成人动漫网站| 精品视频1区2区3区| 精品日韩欧美一区二区| 欧美国产精品专区| 亚洲成人免费观看| 亚洲裸体在线观看| 久久久精品国产免费观看同学| 国产精品久久久久影院| 亚洲一区二区高清| 亚洲欧美色一区| 国产精品不卡在线观看| 欧美日韩国产高清一区二区三区 | 国产精品久久久久aaaa| 日本久久一区二区三区| 国产乱码字幕精品高清av| 久久精品国产77777蜜臀| av在线这里只有精品| 欧美一区二区不卡视频| 欧美高清视频在线高清观看mv色露露十八 |