firmware
IEM Firmware Documentation
Loading...
Searching...
No Matches
crSTART
Collaboration diagram for crSTART:

croutine. h

#define crSTART(pxCRCB)
Definition croutine.h:214
void * CoRoutineHandle_t
Definition croutine.h:47

This macro MUST always be called at the start of a co-routine function.

Example usage:

// Co-routine to be created.
void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )
{
// Variables in co-routines must be declared static if they must maintain value across a blocking call.
static int32_t ulAVariable;
// Must start every co-routine with a call to crSTART();
crSTART( xHandle );
for( ;; )
{
// Co-routine functionality goes here.
}
// Must end every co-routine with a call to crEND();
crEND();
}
#define crEND()
Definition croutine.h:249
unsigned long UBaseType_t
Definition portmacro.h:60

croutine. h

This macro MUST always be called at the end of a co-routine function.

Example usage:

// Co-routine to be created.
void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex )
{
// Variables in co-routines must be declared static if they must maintain value across a blocking call.
static int32_t ulAVariable;
// Must start every co-routine with a call to crSTART();
crSTART( xHandle );
for( ;; )
{
// Co-routine functionality goes here.
}
// Must end every co-routine with a call to crEND();
crEND();
}