Classes | Macros | Typedefs | Functions
croutine.h File Reference
#include "list.h"
Include dependency graph for croutine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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)
 

Macro Definition Documentation

◆ crDELAY

#define crDELAY (   xHandle,
  xTicksToDelay 
)
Value:
if( ( xTicksToDelay ) > 0 ) \
{ \
vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL ); \
} \
crSET_STATE0( ( xHandle ) );
#define NULL
Definition: nm_bsp.h:52

Definition at line 291 of file croutine.h.

◆ crEND

#define crEND ( )    }

Definition at line 236 of file croutine.h.

◆ crQUEUE_RECEIVE

#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 errQUEUE_YIELD
Definition: projdefs.h:56
#define pdPASS
Definition: projdefs.h:48
#define errQUEUE_BLOCKED
Definition: projdefs.h:55
BaseType_t xQueueCRReceive(QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksToWait)

Definition at line 473 of file croutine.h.

◆ crQUEUE_RECEIVE_FROM_ISR

#define crQUEUE_RECEIVE_FROM_ISR (   pxQueue,
  pvBuffer,
  pxCoRoutineWoken 
)    xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) )

Definition at line 695 of file croutine.h.

◆ crQUEUE_SEND

#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 errQUEUE_YIELD
Definition: projdefs.h:56
#define pdPASS
Definition: projdefs.h:48
BaseType_t xQueueCRSend(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait)
#define errQUEUE_BLOCKED
Definition: projdefs.h:55

Definition at line 381 of file croutine.h.

◆ crQUEUE_SEND_FROM_ISR

#define crQUEUE_SEND_FROM_ISR (   pxQueue,
  pvItemToQueue,
  xCoRoutinePreviouslyWoken 
)    xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )

Definition at line 582 of file croutine.h.

◆ crSET_STATE0

#define crSET_STATE0 (   xHandle)    ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):

Definition at line 242 of file croutine.h.

◆ crSET_STATE1

#define crSET_STATE1 (   xHandle)    ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):

Definition at line 243 of file croutine.h.

◆ crSTART

#define crSTART (   pxCRCB)    switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:

Definition at line 205 of file croutine.h.

Typedef Documentation

◆ CoRoutineHandle_t

typedef void* CoRoutineHandle_t

Definition at line 45 of file croutine.h.

◆ CRCB_t

◆ crCOROUTINE_CODE

typedef void(* crCOROUTINE_CODE) (CoRoutineHandle_t, UBaseType_t)

Definition at line 48 of file croutine.h.

Function Documentation

◆ vCoRoutineAddToDelayedList()

void vCoRoutineAddToDelayedList ( TickType_t  xTicksToDelay,
List_t pxEventList 
)

◆ vCoRoutineSchedule()

void vCoRoutineSchedule ( void  )

◆ xCoRoutineCreate()

BaseType_t xCoRoutineCreate ( crCOROUTINE_CODE  pxCoRoutineCode,
UBaseType_t  uxPriority,
UBaseType_t  uxIndex 
)

◆ xCoRoutineRemoveFromEventList()

BaseType_t xCoRoutineRemoveFromEventList ( const List_t pxEventList)


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:59