69 #ifndef INC_FREERTOS_H
70 #error "include FreeRTOS.h must appear in source files before include croutine.h"
242 #define crSTART( pxCRCB ) switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:
279 #define crSET_STATE0( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
280 #define crSET_STATE1( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):
328 #define crDELAY( xHandle, xTicksToDelay ) \
329 if( ( xTicksToDelay ) > 0 ) \
331 vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL ); \
333 crSET_STATE0( ( xHandle ) );
418 #define crQUEUE_SEND( xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult ) \
420 *( pxResult ) = xQueueCRSend( ( pxQueue) , ( pvItemToQueue) , ( xTicksToWait ) ); \
421 if( *( pxResult ) == errQUEUE_BLOCKED ) \
423 crSET_STATE0( ( xHandle ) ); \
424 *pxResult = xQueueCRSend( ( pxQueue ), ( pvItemToQueue ), 0 ); \
426 if( *pxResult == errQUEUE_YIELD ) \
428 crSET_STATE1( ( xHandle ) ); \
429 *pxResult = pdPASS; \
510 #define crQUEUE_RECEIVE( xHandle, pxQueue, pvBuffer, xTicksToWait, pxResult ) \
512 *( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), ( xTicksToWait ) ); \
513 if( *( pxResult ) == errQUEUE_BLOCKED ) \
515 crSET_STATE0( ( xHandle ) ); \
516 *( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), 0 ); \
518 if( *( pxResult ) == errQUEUE_YIELD ) \
520 crSET_STATE1( ( xHandle ) ); \
521 *( pxResult ) = pdPASS; \
619 #define crQUEUE_SEND_FROM_ISR( pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken ) xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )
732 #define crQUEUE_RECEIVE_FROM_ISR( pxQueue, pvBuffer, pxCoRoutineWoken ) xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) )
BaseType_t xCoRoutineCreate(crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex)
void(* crCOROUTINE_CODE)(CoRoutineHandle_t, UBaseType_t)
crCOROUTINE_CODE pxCoRoutineFunction
unsigned long UBaseType_t
ListItem_t xEventListItem
void vCoRoutineSchedule(void)
void vCoRoutineAddToDelayedList(TickType_t xTicksToDelay, List_t *pxEventList)
BaseType_t xCoRoutineRemoveFromEventList(const List_t *pxEventList)
ListItem_t xGenericListItem
struct corCoRoutineControlBlock CRCB_t