]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/include/croutine.h
Replace use of legacy portTYPE macros from old demos and standard demo files.
[freertos] / FreeRTOS / Demo / RL78_E2Studio_GCC / src / FreeRTOS_Source / include / croutine.h
index 361bd1ea1a496d61a1df9088422c5df44774bdb8..4e5514e68b53e10cf9013d4108561385240a69a4 100644 (file)
@@ -88,10 +88,10 @@ extern "C" {
 /* Used to hide the implementation of the co-routine control block.  The\r
 control block structure however has to be included in the header due to\r
 the macro implementation of the co-routine functionality. */\r
-typedef void * xCoRoutineHandle;\r
+typedef void * CoRoutineHandle_t;\r
 \r
 /* Defines the prototype to which co-routine functions must conform. */\r
-typedef void (*crCOROUTINE_CODE)( xCoRoutineHandle, unsigned portBASE_TYPE );\r
+typedef void (*crCOROUTINE_CODE)( CoRoutineHandle_t, unsigned portBASE_TYPE );\r
 \r
 typedef struct corCoRoutineControlBlock\r
 {\r
@@ -101,7 +101,7 @@ typedef struct corCoRoutineControlBlock
        unsigned portBASE_TYPE  uxPriority;                     /*< The priority of the co-routine in relation to other co-routines. */\r
        unsigned portBASE_TYPE  uxIndex;                        /*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */\r
        unsigned short          uxState;                        /*< Used internally by the co-routine implementation. */\r
-} corCRCB; /* Co-routine control block.  Note must be identical in size down to uxPriority with tskTCB. */\r
+} CRCB_t; /* Co-routine control block.  Note must be identical in size down to uxPriority with tskTCB. */\r
 \r
 /**\r
  * croutine. h\r
@@ -132,7 +132,7 @@ typedef struct corCoRoutineControlBlock
  * Example usage:\r
    <pre>\r
  // Co-routine to be created.\r
- void vFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  // Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
  // This may not be necessary for const variables.\r
@@ -222,14 +222,14 @@ void vCoRoutineSchedule( void );
 /**\r
  * croutine. h\r
  * <pre>\r
- crSTART( xCoRoutineHandle xHandle );</pre>\r
+ crSTART( CoRoutineHandle_t xHandle );</pre>\r
  *\r
  * This macro MUST always be called at the start of a co-routine function.\r
  *\r
  * Example usage:\r
    <pre>\r
  // Co-routine to be created.\r
- void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vACoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  // Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
  static long ulAVariable;\r
@@ -248,7 +248,7 @@ void vCoRoutineSchedule( void );
  * \defgroup crSTART crSTART\r
  * \ingroup Tasks\r
  */\r
-#define crSTART( pxCRCB ) switch( ( ( corCRCB * )( pxCRCB ) )->uxState ) { case 0:\r
+#define crSTART( pxCRCB ) switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:\r
 \r
 /**\r
  * croutine. h\r
@@ -260,7 +260,7 @@ void vCoRoutineSchedule( void );
  * Example usage:\r
    <pre>\r
  // Co-routine to be created.\r
- void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vACoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  // Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
  static long ulAVariable;\r
@@ -285,13 +285,13 @@ void vCoRoutineSchedule( void );
  * These macros are intended for internal use by the co-routine implementation\r
  * only.  The macros should not be used directly by application writers.\r
  */\r
-#define crSET_STATE0( xHandle ) ( ( corCRCB * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):\r
-#define crSET_STATE1( xHandle ) ( ( corCRCB * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):\r
+#define crSET_STATE0( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):\r
+#define crSET_STATE1( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):\r
 \r
 /**\r
  * croutine. h\r
  *<pre>\r
- crDELAY( xCoRoutineHandle xHandle, portTickType xTicksToDelay );</pre>\r
+ crDELAY( CoRoutineHandle_t xHandle, portTickType xTicksToDelay );</pre>\r
  *\r
  * Delay a co-routine for a fixed period of time.\r
  *\r
@@ -310,7 +310,7 @@ void vCoRoutineSchedule( void );
  * Example usage:\r
    <pre>\r
  // Co-routine to be created.\r
- void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vACoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  // Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
  // This may not be necessary for const variables.\r
@@ -344,7 +344,7 @@ void vCoRoutineSchedule( void );
 /**\r
  * <pre>\r
  crQUEUE_SEND(\r
-                  xCoRoutineHandle xHandle,\r
+                  CoRoutineHandle_t xHandle,\r
                   xQueueHandle pxQueue,\r
                   void *pvItemToQueue,\r
                   portTickType xTicksToWait,\r
@@ -392,7 +392,7 @@ void vCoRoutineSchedule( void );
    <pre>\r
  // Co-routine function that blocks for a fixed period then posts a number onto\r
  // a queue.\r
- static void prvCoRoutineFlashTask( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void prvCoRoutineFlashTask( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  // Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
  static portBASE_TYPE xNumberToPost = 0;\r
@@ -443,7 +443,7 @@ void vCoRoutineSchedule( void );
  * croutine. h\r
  * <pre>\r
   crQUEUE_RECEIVE(\r
-                     xCoRoutineHandle xHandle,\r
+                     CoRoutineHandle_t xHandle,\r
                      xQueueHandle pxQueue,\r
                      void *pvBuffer,\r
                      portTickType xTicksToWait,\r
@@ -490,7 +490,7 @@ void vCoRoutineSchedule( void );
  <pre>\r
  // A co-routine receives the number of an LED to flash from a queue.  It\r
  // blocks on the queue until the number is received.\r
- static void prvCoRoutineFlashWorkTask( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void prvCoRoutineFlashWorkTask( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  // Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
  static portBASE_TYPE xResult;\r
@@ -575,7 +575,7 @@ void vCoRoutineSchedule( void );
  * Example usage:\r
  <pre>\r
  // A co-routine that blocks on a queue waiting for characters to be received.\r
- static void vReceivingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void vReceivingCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  char cRxedChar;\r
  portBASE_TYPE xResult;\r
@@ -673,7 +673,7 @@ void vCoRoutineSchedule( void );
  <pre>\r
  // A co-routine that posts a character to a queue then blocks for a fixed\r
  // period.  The character is incremented each time.\r
- static void vSendingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void vSendingCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
  {\r
  // cChar holds its value while this co-routine is blocked and must therefore\r
  // be declared static.\r