Go to the documentation of this file.
32 #ifndef INC_FREERTOS_H
33 #error "include FreeRTOS.h must appear in source files before include croutine.h"
205 #define crSTART( pxCRCB ) switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:
242 #define crSET_STATE0( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
243 #define crSET_STATE1( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):
291 #define crDELAY( xHandle, xTicksToDelay ) \
292 if( ( xTicksToDelay ) > 0 ) \
294 vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL ); \
296 crSET_STATE0( ( xHandle ) );
381 #define crQUEUE_SEND( xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult ) \
383 *( pxResult ) = xQueueCRSend( ( pxQueue) , ( pvItemToQueue) , ( xTicksToWait ) ); \
384 if( *( pxResult ) == errQUEUE_BLOCKED ) \
386 crSET_STATE0( ( xHandle ) ); \
387 *pxResult = xQueueCRSend( ( pxQueue ), ( pvItemToQueue ), 0 ); \
389 if( *pxResult == errQUEUE_YIELD ) \
391 crSET_STATE1( ( xHandle ) ); \
392 *pxResult = pdPASS; \
473 #define crQUEUE_RECEIVE( xHandle, pxQueue, pvBuffer, xTicksToWait, pxResult ) \
475 *( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), ( xTicksToWait ) ); \
476 if( *( pxResult ) == errQUEUE_BLOCKED ) \
478 crSET_STATE0( ( xHandle ) ); \
479 *( pxResult ) = xQueueCRReceive( ( pxQueue) , ( pvBuffer ), 0 ); \
481 if( *( pxResult ) == errQUEUE_YIELD ) \
483 crSET_STATE1( ( xHandle ) ); \
484 *( pxResult ) = pdPASS; \
582 #define crQUEUE_SEND_FROM_ISR( pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken ) xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )
695 #define crQUEUE_RECEIVE_FROM_ISR( pxQueue, pvBuffer, pxCoRoutineWoken ) xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) )
#define listSET_LIST_ITEM_OWNER(pxListItem, pxOwner)
Definition: list.h:180
void * CoRoutineHandle_t
Definition: croutine.h:45
void vListInitialise(List_t *const pxList)
Definition: list.c:38
uint16_t uxState
Definition: croutine.h:57
#define configMAX_CO_ROUTINE_PRIORITIES
Definition: FreeRTOSConfig.h:21
#define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY
Definition: projdefs.h:54
void vCoRoutineAddToDelayedList(TickType_t xTicksToDelay, List_t *pxEventList)
UBaseType_t uxListRemove(ListItem_t *const pxItemToRemove)
Definition: list.c:171
#define listGET_OWNER_OF_HEAD_ENTRY(pxList)
Definition: list.h:307
#define pdPASS
Definition: projdefs.h:48
uint32_t TickType_t
Definition: portmacro.h:64
void *configLIST_VOLATILE pvContainer
Definition: list.h:147
BaseType_t xCoRoutineCreate(crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex)
Definition: croutine.h:51
#define listGET_LIST_ITEM_VALUE(pxListItem)
Definition: list.h:208
#define listSET_LIST_ITEM_VALUE(pxListItem, xValue)
Definition: list.h:198
UBaseType_t uxIndex
Definition: croutine.h:56
ListItem_t xEventListItem
Definition: croutine.h:54
#define pdFALSE
Definition: projdefs.h:45
void vListInsertEnd(List_t *const pxList, ListItem_t *const pxNewListItem)
Definition: list.c:75
unsigned long UBaseType_t
Definition: portmacro.h:58
#define portDISABLE_INTERRUPTS()
Definition: portmacro.h:105
#define listLIST_IS_EMPTY(pxList)
Definition: list.h:250
void vListInsert(List_t *const pxList, ListItem_t *const pxNewListItem)
Definition: list.c:104
ListItem_t xGenericListItem
Definition: croutine.h:53
#define portENABLE_INTERRUPTS()
Definition: portmacro.h:106
UBaseType_t uxPriority
Definition: croutine.h:55
crCOROUTINE_CODE pxCoRoutineFunction
Definition: croutine.h:52
long BaseType_t
Definition: portmacro.h:57
#define pdTRUE
Definition: projdefs.h:46
TickType_t xTaskGetTickCount(void) PRIVILEGED_FUNCTION
Definition: tasks.c:2214
void vCoRoutineSchedule(void)
#define listGET_OWNER_OF_NEXT_ENTRY(pxTCB, pxList)
Definition: list.h:277
void(* crCOROUTINE_CODE)(CoRoutineHandle_t, UBaseType_t)
Definition: croutine.h:48
struct corCoRoutineControlBlock CRCB_t
BaseType_t xCoRoutineRemoveFromEventList(const List_t *pxEventList)
void vListInitialiseItem(ListItem_t *const pxItem)
Definition: list.c:63
void * pvPortMalloc(size_t xWantedSize)
Definition: heap_1.c:71