Microchip® Advanced Software Framework

freertos-10.0.0/Source/include/croutine.h File Reference
#include "list.h"

Data Structures

struct  corCoRoutineControlBlock
 

Macros

#define crDELAY(xHandle, xTicksToDelay)
 
#define crEND()   }
 
#define crQUEUE_RECEIVE(xHandle, pxQueue, pvBuffer, xTicksToWait, pxResult)
 
#define crQUEUE_RECEIVE_FROM_ISR(pxQueue, pvBuffer, pxCoRoutineWoken)   xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) )
 
#define crQUEUE_SEND(xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult)
 
#define crQUEUE_SEND_FROM_ISR(pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken)   xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )
 
#define crSET_STATE0(xHandle)   ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
 
#define crSET_STATE1(xHandle)   ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):
 
#define crSTART(pxCRCB)   switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:
 

Typedefs

typedef void * CoRoutineHandle_t
 
typedef struct
corCoRoutineControlBlock 
CRCB_t
 
typedef void(* crCOROUTINE_CODE )(CoRoutineHandle_t, UBaseType_t)
 

Functions

void vCoRoutineAddToDelayedList (TickType_t xTicksToDelay, List_t *pxEventList)
 
void vCoRoutineSchedule (void)
 
BaseType_t xCoRoutineCreate (crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex)
 
BaseType_t xCoRoutineRemoveFromEventList (const List_t *pxEventList)
 

#define crDELAY (   xHandle,
  xTicksToDelay 
)
Value:
if( ( xTicksToDelay ) > 0 ) \
{ \
vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL ); \
} \
crSET_STATE0( ( xHandle ) );
#define crSET_STATE0(xHandle)
Definition: freertos-10.0.0/Source/include/croutine.h:242
void vCoRoutineAddToDelayedList(portTickType xTicksToDelay, xList *pxEventList)
Definition: freertos-7.0.0/source/croutine.c:188
#define NULL
Definition: src/include/lwip/def.h:47
#define crEND ( )    }
#define crQUEUE_RECEIVE (   xHandle,
  pxQueue,
  pvBuffer,
  xTicksToWait,
  pxResult 
)
Value:
{ \
*( 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; \
} \
}
#define crSET_STATE0(xHandle)
Definition: freertos-10.0.0/Source/include/croutine.h:242
#define crSET_STATE1(xHandle)
Definition: freertos-10.0.0/Source/include/croutine.h:243
#define pdPASS
Definition: freertos-7.3.0/source/include/projdefs.h:78
#define errQUEUE_BLOCKED
Definition: freertos-7.3.0/source/include/projdefs.h:86
signed portBASE_TYPE xQueueCRReceive(xQueueHandle pxQueue, void *pvBuffer, portTickType xTicksToWait)
if(memp!=NULL)
Definition: src/core/memp.c:407
#define errQUEUE_YIELD
Definition: freertos-7.3.0/source/include/projdefs.h:87
#define crQUEUE_RECEIVE_FROM_ISR (   pxQueue,
  pvBuffer,
  pxCoRoutineWoken 
)    xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) )
#define crQUEUE_SEND (   xHandle,
  pxQueue,
  pvItemToQueue,
  xTicksToWait,
  pxResult 
)
Value:
{ \
*( 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; \
} \
}
#define crSET_STATE0(xHandle)
Definition: freertos-10.0.0/Source/include/croutine.h:242
#define crSET_STATE1(xHandle)
Definition: freertos-10.0.0/Source/include/croutine.h:243
#define pdPASS
Definition: freertos-7.3.0/source/include/projdefs.h:78
#define errQUEUE_BLOCKED
Definition: freertos-7.3.0/source/include/projdefs.h:86
signed portBASE_TYPE xQueueCRSend(xQueueHandle pxQueue, const void *pvItemToQueue, portTickType xTicksToWait)
if(memp!=NULL)
Definition: src/core/memp.c:407
#define errQUEUE_YIELD
Definition: freertos-7.3.0/source/include/projdefs.h:87
#define crQUEUE_SEND_FROM_ISR (   pxQueue,
  pvItemToQueue,
  xCoRoutinePreviouslyWoken 
)    xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )
#define crSET_STATE0 (   xHandle)    ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
#define crSET_STATE1 (   xHandle)    ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):
#define crSTART (   pxCRCB)    switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:

typedef void* CoRoutineHandle_t
typedef void(* crCOROUTINE_CODE)(CoRoutineHandle_t, UBaseType_t)

void vCoRoutineAddToDelayedList ( TickType_t  xTicksToDelay,
List_t pxEventList 
)
BaseType_t xCoRoutineCreate ( crCOROUTINE_CODE  pxCoRoutineCode,
UBaseType_t  uxPriority,
UBaseType_t  uxIndex 
)