STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Data Structures | Macros | Typedefs | Functions
croutine.h File Reference
#include "list.h"

Go to the source code of this file.

Data Structures

struct  corCoRoutineControlBlock
 

Macros

#define crSTART(pxCRCB)   switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:
 
#define crEND()   }
 
#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 crDELAY(xHandle, xTicksToDelay)
 
#define crQUEUE_SEND(xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult)
 
#define crQUEUE_RECEIVE(xHandle, pxQueue, pvBuffer, xTicksToWait, pxResult)
 
#define crQUEUE_SEND_FROM_ISR(pxQueue, pvItemToQueue, xCoRoutinePreviouslyWoken)   xQueueCRSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( xCoRoutinePreviouslyWoken ) )
 
#define crQUEUE_RECEIVE_FROM_ISR(pxQueue, pvBuffer, pxCoRoutineWoken)   xQueueCRReceiveFromISR( ( pxQueue ), ( pvBuffer ), ( pxCoRoutineWoken ) )
 

Typedefs

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

Functions

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

Macro Definition Documentation

#define crDELAY (   xHandle,
  xTicksToDelay 
)
Value:
if( ( xTicksToDelay ) > 0 ) \
{ \
vCoRoutineAddToDelayedList( ( xTicksToDelay ), NULL ); \
} \
crSET_STATE0( ( xHandle ) );
#define NULL
Definition: usbd_def.h:53
void vCoRoutineAddToDelayedList(TickType_t xTicksToDelay, List_t *pxEventList)
#define crSET_STATE0(xHandle)
Definition: croutine.h:283

Definition at line 332 of file croutine.h.

#define crEND ( )    }

Definition at line 277 of file croutine.h.

#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:93
if(LCD_Lock==DISABLE)
Definition: lcd_log.c:249
#define pdPASS
Definition: projdefs.h:85
#define crSET_STATE1(xHandle)
Definition: croutine.h:284
#define errQUEUE_BLOCKED
Definition: projdefs.h:92
#define crSET_STATE0(xHandle)
Definition: croutine.h:283
BaseType_t xQueueCRReceive(QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksToWait)

Definition at line 514 of file croutine.h.

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

Definition at line 736 of file croutine.h.

#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:93
if(LCD_Lock==DISABLE)
Definition: lcd_log.c:249
#define pdPASS
Definition: projdefs.h:85
BaseType_t xQueueCRSend(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait)
#define crSET_STATE1(xHandle)
Definition: croutine.h:284
#define errQUEUE_BLOCKED
Definition: projdefs.h:92
#define crSET_STATE0(xHandle)
Definition: croutine.h:283

Definition at line 422 of file croutine.h.

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

Definition at line 623 of file croutine.h.

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

Definition at line 283 of file croutine.h.

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

Definition at line 284 of file croutine.h.

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

Definition at line 246 of file croutine.h.

Typedef Documentation

typedef void* CoRoutineHandle_t

Definition at line 86 of file croutine.h.

typedef void(* crCOROUTINE_CODE) (CoRoutineHandle_t, UBaseType_t)

Definition at line 89 of file croutine.h.

Function Documentation

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)