Microchip® Advanced Software Framework

freertos-7.3.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)   ( ( corCRCB * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
 
#define crSET_STATE1(xHandle)   ( ( corCRCB * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):
 
#define crSTART(pxCRCB)   switch( ( ( corCRCB * )( pxCRCB ) )->uxState ) { case 0:
 

Typedefs

typedef struct
corCoRoutineControlBlock 
corCRCB
 
typedef void(* crCOROUTINE_CODE )(xCoRoutineHandle, unsigned portBASE_TYPE)
 
typedef void * xCoRoutineHandle
 

Functions

void vCoRoutineAddToDelayedList (portTickType xTicksToDelay, xList *pxEventList)
 
void vCoRoutineSchedule (void)
 
signed portBASE_TYPE xCoRoutineCreate (crCOROUTINE_CODE pxCoRoutineCode, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxIndex)
 
signed portBASE_TYPE xCoRoutineRemoveFromEventList (const xList *pxEventList)
 

#define crDELAY (   xHandle,
  xTicksToDelay 
)
Value:
if( ( xTicksToDelay ) > 0 ) \
{ \
vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL ); \
} \
crSET_STATE0( ( xHandle ) );
void vCoRoutineAddToDelayedList(portTickType xTicksToDelay, xList *pxEventList)
Definition: freertos-7.5.2/Source/croutine.c:193
#define crSET_STATE0(xHandle)
Definition: freertos-7.3.0/source/include/croutine.h:282
#define NULL
Definition: nm_bsp.h:64
#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_STATE1(xHandle)
Definition: freertos-7.3.0/source/include/croutine.h:283
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
#define crSET_STATE0(xHandle)
Definition: freertos-7.3.0/source/include/croutine.h:282
#define errQUEUE_YIELD
Definition: freertos-7.5.2/Source/include/projdefs.h:83
#define errQUEUE_BLOCKED
Definition: freertos-7.5.2/Source/include/projdefs.h:82
#define pdPASS
Definition: freertos-7.5.2/Source/include/projdefs.h:74
signed portBASE_TYPE xQueueCRReceive(xQueueHandle xQueue, void *pvBuffer, portTickType xTicksToWait)
#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_STATE1(xHandle)
Definition: freertos-7.3.0/source/include/croutine.h:283
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
signed portBASE_TYPE xQueueCRSend(xQueueHandle xQueue, const void *pvItemToQueue, portTickType xTicksToWait)
#define crSET_STATE0(xHandle)
Definition: freertos-7.3.0/source/include/croutine.h:282
#define errQUEUE_YIELD
Definition: freertos-7.5.2/Source/include/projdefs.h:83
#define errQUEUE_BLOCKED
Definition: freertos-7.5.2/Source/include/projdefs.h:82
#define pdPASS
Definition: freertos-7.5.2/Source/include/projdefs.h:74
#define crQUEUE_SEND_FROM_ISR (   pxQueue,
  pvItemToQueue,
  xCoRoutinePreviouslyWoken 
)    xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )
#define crSET_STATE0 (   xHandle)    ( ( corCRCB * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
#define crSET_STATE1 (   xHandle)    ( ( corCRCB * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):
#define crSTART (   pxCRCB)    switch( ( ( corCRCB * )( pxCRCB ) )->uxState ) { case 0:

typedef void(* crCOROUTINE_CODE)(xCoRoutineHandle, unsigned portBASE_TYPE)
typedef void* xCoRoutineHandle

void vCoRoutineSchedule ( void  )
signed portBASE_TYPE xCoRoutineRemoveFromEventList ( const xList pxEventList)