73 #ifndef INC_FREERTOS_H 74 #error "include FreeRTOS.h must appear in source files before include croutine.h" 86 typedef void * CoRoutineHandle_t;
89 typedef void (*crCOROUTINE_CODE)( CoRoutineHandle_t, UBaseType_t );
93 crCOROUTINE_CODE pxCoRoutineFunction;
96 UBaseType_t uxPriority;
173 BaseType_t xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex );
215 void vCoRoutineSchedule(
void );
246 #define crSTART( pxCRCB ) switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0: 283 #define crSET_STATE0( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2): 284 #define crSET_STATE1( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1): 332 #define crDELAY( xHandle, xTicksToDelay ) \ 333 if( ( xTicksToDelay ) > 0 ) \ 335 vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL ); \ 337 crSET_STATE0( ( xHandle ) ); 422 #define crQUEUE_SEND( xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult ) \ 424 *( pxResult ) = xQueueCRSend( ( pxQueue) , ( pvItemToQueue) , ( xTicksToWait ) ); \ 425 if( *( pxResult ) == errQUEUE_BLOCKED ) \ 427 crSET_STATE0( ( xHandle ) ); \ 428 *pxResult = xQueueCRSend( ( pxQueue ), ( pvItemToQueue ), 0 ); \ 430 if( *pxResult == errQUEUE_YIELD ) \ 432 crSET_STATE1( ( xHandle ) ); \ 433 *pxResult = pdPASS; \ 514 #define crQUEUE_RECEIVE( xHandle, pxQueue, pvBuffer, xTicksToWait, pxResult ) \ 516 *( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), ( xTicksToWait ) ); \ 517 if( *( pxResult ) == errQUEUE_BLOCKED ) \ 519 crSET_STATE0( ( xHandle ) ); \ 520 *( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), 0 ); \ 522 if( *( pxResult ) == errQUEUE_YIELD ) \ 524 crSET_STATE1( ( xHandle ) ); \ 525 *( pxResult ) = pdPASS; \ 623 #define crQUEUE_SEND_FROM_ISR( pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken ) xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) ) 736 #define crQUEUE_RECEIVE_FROM_ISR( pxQueue, pvBuffer, pxCoRoutineWoken ) xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) ) 747 void vCoRoutineAddToDelayedList( TickType_t xTicksToDelay,
List_t *pxEventList );
756 BaseType_t xCoRoutineRemoveFromEventList(
const List_t *pxEventList );
Definition: croutine.h:91