Skip to content

Group xCoRoutineCreate

Modules > xCoRoutineCreate

More...

Detailed Description

croutine. h

Create a new co-routine and add it to the list of co-routines that are ready to run.

Parameters:

  • pxCoRoutineCode Pointer to the co-routine function. Co-routine functions require special syntax - see the co-routine section of the WEB documentation for more information.
  • uxPriority The priority with respect to other co-routines at which the co-routine will run.
  • uxIndex Used to distinguish between different co-routines that execute the same function. See the example below and the co-routine section of the WEB documentation for further information.

Returns:

pdPASS if the co-routine was successfully created and added to a ready list, otherwise an error code defined with ProjDefs.h.

Example usage: