]> git.sur5r.net Git - freertos/blobdiff - Source/include/queue.h
Remove unnecessary ';' characters from a couple of macro definitions in the IAR MSP43...
[freertos] / Source / include / queue.h
index 19112253fe2836905dd951007dadc5198a715e04..7cc021c79d252cf9020ef04208cd2bbab3f413f8 100644 (file)
@@ -1,52 +1,54 @@
 /*\r
-       FreeRTOS.org V5.4.0 - Copyright (C) 2003-2009 Richard Barry.\r
-\r
-       This file is part of the FreeRTOS.org distribution.\r
-\r
-       FreeRTOS.org is free software; you can redistribute it and/or modify it\r
-       under the terms of the GNU General Public License (version 2) as published\r
-       by the Free Software Foundation and modified by the FreeRTOS exception.\r
-       **NOTE** The exception to the GPL is included to allow you to distribute a\r
-       combined work that includes FreeRTOS.org without being obliged to provide\r
-       the source code for any proprietary components.  Alternative commercial\r
-       license and support terms are also available upon request.  See the \r
-       licensing section of http://www.FreeRTOS.org for full details.\r
-\r
-       FreeRTOS.org is distributed in the hope that it will be useful, but WITHOUT\r
-       ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
-       FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
-       more details.\r
-\r
-       You should have received a copy of the GNU General Public License along\r
-       with FreeRTOS.org; if not, write to the Free Software Foundation, Inc., 59\r
-       Temple Place, Suite 330, Boston, MA  02111-1307  USA.\r
-\r
-\r
-       ***************************************************************************\r
-       *                                                                         *\r
-       * Get the FreeRTOS eBook!  See http://www.FreeRTOS.org/Documentation      *\r
-       *                                                                         *\r
-       * This is a concise, step by step, 'hands on' guide that describes both   *\r
-       * general multitasking concepts and FreeRTOS specifics. It presents and   *\r
-       * explains numerous examples that are written using the FreeRTOS API.     *\r
-       * Full source code for all the examples is provided in an accompanying    *\r
-       * .zip file.                                                              *\r
-       *                                                                         *\r
-       ***************************************************************************\r
-\r
-       1 tab == 4 spaces!\r
-\r
-       Please ensure to read the configuration and relevant port sections of the\r
-       online documentation.\r
-\r
-       http://www.FreeRTOS.org - Documentation, latest information, license and\r
-       contact details.\r
-\r
-       http://www.SafeRTOS.com - A version that is certified for use in safety\r
-       critical systems.\r
-\r
-       http://www.OpenRTOS.com - Commercial support, development, porting,\r
-       licensing and training services.\r
+    FreeRTOS V6.1.0 - Copyright (C) 2010 Real Time Engineers Ltd.\r
+\r
+    ***************************************************************************\r
+    *                                                                         *\r
+    * If you are:                                                             *\r
+    *                                                                         *\r
+    *    + New to FreeRTOS,                                                   *\r
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *\r
+    *    + Looking for basic training,                                        *\r
+    *    + Wanting to improve your FreeRTOS skills and productivity           *\r
+    *                                                                         *\r
+    * then take a look at the FreeRTOS books - available as PDF or paperback  *\r
+    *                                                                         *\r
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *\r
+    *                  http://www.FreeRTOS.org/Documentation                  *\r
+    *                                                                         *\r
+    * A pdf reference manual is also available.  Both are usually delivered   *\r
+    * to your inbox within 20 minutes to two hours when purchased between 8am *\r
+    * and 8pm GMT (although please allow up to 24 hours in case of            *\r
+    * exceptional circumstances).  Thank you for your support!                *\r
+    *                                                                         *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+    ***NOTE*** The exception to the GPL is included to allow you to distribute\r
+    a combined work that includes FreeRTOS without being obliged to provide the\r
+    source code for proprietary components outside of the FreeRTOS kernel.\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
+    more details. You should have received a copy of the GNU General Public \r
+    License and the FreeRTOS license exception along with FreeRTOS; if not it \r
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+    by writing to Richard Barry, contact details for whom are available on the\r
+    FreeRTOS WEB site.\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    http://www.FreeRTOS.org - Documentation, latest information, license and\r
+    contact details.\r
+\r
+    http://www.SafeRTOS.com - A version that is certified for use in safety\r
+    critical systems.\r
+\r
+    http://www.OpenRTOS.com - Commercial support, development, porting,\r
+    licensing and training services.\r
 */\r
 \r
 #ifndef INC_FREERTOS_H\r
 #ifdef __cplusplus\r
 extern "C" {\r
 #endif\r
+\r
+\r
+#include "mpu_wrappers.h"\r
+\r
+\r
 typedef void * xQueueHandle;\r
 \r
+\r
 /* For internal use only. */\r
 #define        queueSEND_TO_BACK       ( 0 )\r
 #define        queueSEND_TO_FRONT      ( 1 )\r
@@ -73,9 +81,9 @@ typedef void * xQueueHandle;
  * queue. h\r
  * <pre>\r
  xQueueHandle xQueueCreate(\r
-                              unsigned portBASE_TYPE uxQueueLength,\r
-                              unsigned portBASE_TYPE uxItemSize\r
-                          );\r
+                                                         unsigned portBASE_TYPE uxQueueLength,\r
+                                                         unsigned portBASE_TYPE uxItemSize\r
+                                                 );\r
  * </pre>\r
  *\r
  * Creates a new queue instance.  This allocates the storage required by the\r
@@ -96,30 +104,30 @@ typedef void * xQueueHandle;
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  };\r
 \r
  void vATask( void *pvParameters )\r
  {\r
  xQueueHandle xQueue1, xQueue2;\r
 \r
-    // Create a queue capable of containing 10 unsigned long values.\r
-    xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
-    if( xQueue1 == 0 )\r
-    {\r
-        // Queue was not created and must not be used.\r
-    }\r
-\r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-    if( xQueue2 == 0 )\r
-    {\r
-        // Queue was not created and must not be used.\r
-    }\r
-\r
-    // ... Rest of task code.\r
+       // Create a queue capable of containing 10 unsigned long values.\r
+       xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
+       if( xQueue1 == 0 )\r
+       {\r
+               // Queue was not created and must not be used.\r
+       }\r
+\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+       if( xQueue2 == 0 )\r
+       {\r
+               // Queue was not created and must not be used.\r
+       }\r
+\r
+       // ... Rest of task code.\r
  }\r
  </pre>\r
  * \defgroup xQueueCreate xQueueCreate\r
@@ -131,10 +139,10 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueSendToToFront(\r
-                                   xQueueHandle xQueue,\r
-                                   const void * pvItemToQueue,\r
-                                   portTickType xTicksToWait\r
-                               );\r
+                                                                  xQueueHandle xQueue,\r
+                                                                  const        void    *       pvItemToQueue,\r
+                                                                  portTickType xTicksToWait\r
+                                                          );\r
  * </pre>\r
  *\r
  * This is a macro that calls xQueueGenericSend().\r
@@ -154,7 +162,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  * @param xTicksToWait The maximum amount of time the task should block\r
  * waiting for space to become available on the queue, should it already\r
  * be full.  The call will return immediately if this is set to 0 and the\r
- * queue is full.  The time is defined in tick periods so the constant \r
+ * queue is full.  The time is defined in tick periods so the constant\r
  * portTICK_RATE_MS should be used to convert to real time if this is required.\r
  *\r
  * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.\r
@@ -163,43 +171,43 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  } xMessage;\r
 \r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
 \r
  void vATask( void *pvParameters )\r
  {\r
  xQueueHandle xQueue1, xQueue2;\r
  struct AMessage *pxMessage;\r
 \r
-    // Create a queue capable of containing 10 unsigned long values.\r
-    xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
-\r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-\r
-    // ...\r
-\r
-    if( xQueue1 != 0 )\r
-    {\r
-        // Send an unsigned long.  Wait for 10 ticks for space to become\r
-        // available if necessary.\r
-        if( xQueueSendToFront( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )\r
-        {\r
-            // Failed to post the message, even after 10 ticks.\r
-        }\r
-    }\r
-\r
-    if( xQueue2 != 0 )\r
-    {\r
-        // Send a pointer to a struct AMessage object.  Don't block if the\r
-        // queue is already full.\r
-        pxMessage = & xMessage;\r
-        xQueueSendToFront( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );\r
-    }\r
+       // Create a queue capable of containing 10 unsigned long values.\r
+       xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
+\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+\r
+       // ...\r
+\r
+       if( xQueue1 != 0 )\r
+       {\r
+               // Send an unsigned long.  Wait for 10 ticks for space to become\r
+               // available if necessary.\r
+               if( xQueueSendToFront( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )\r
+               {\r
+                       // Failed to post the message, even after 10 ticks.\r
+               }\r
+       }\r
+\r
+       if( xQueue2 != 0 )\r
+       {\r
+               // Send a pointer to a struct AMessage object.  Don't block if the\r
+               // queue is already full.\r
+               pxMessage = & xMessage;\r
+               xQueueSendToFront( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );\r
+       }\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -213,10 +221,10 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueSendToBack(\r
-                                   xQueueHandle xQueue,\r
-                                   const void * pvItemToQueue,\r
-                                   portTickType xTicksToWait\r
-                               );\r
+                                                                  xQueueHandle xQueue,\r
+                                                                  const        void    *       pvItemToQueue,\r
+                                                                  portTickType xTicksToWait\r
+                                                          );\r
  * </pre>\r
  *\r
  * This is a macro that calls xQueueGenericSend().\r
@@ -236,7 +244,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  * @param xTicksToWait The maximum amount of time the task should block\r
  * waiting for space to become available on the queue, should it already\r
  * be full.  The call will return immediately if this is set to 0 and the queue\r
- * is full.  The  time is defined in tick periods so the constant \r
+ * is full.  The  time is defined in tick periods so the constant\r
  * portTICK_RATE_MS should be used to convert to real time if this is required.\r
  *\r
  * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.\r
@@ -245,43 +253,43 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  } xMessage;\r
 \r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
 \r
  void vATask( void *pvParameters )\r
  {\r
  xQueueHandle xQueue1, xQueue2;\r
  struct AMessage *pxMessage;\r
 \r
-    // Create a queue capable of containing 10 unsigned long values.\r
-    xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
-\r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-\r
-    // ...\r
-\r
-    if( xQueue1 != 0 )\r
-    {\r
-        // Send an unsigned long.  Wait for 10 ticks for space to become\r
-        // available if necessary.\r
-        if( xQueueSendToBack( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )\r
-        {\r
-            // Failed to post the message, even after 10 ticks.\r
-        }\r
-    }\r
-\r
-    if( xQueue2 != 0 )\r
-    {\r
-        // Send a pointer to a struct AMessage object.  Don't block if the\r
-        // queue is already full.\r
-        pxMessage = & xMessage;\r
-        xQueueSendToBack( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );\r
-    }\r
+       // Create a queue capable of containing 10 unsigned long values.\r
+       xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
+\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+\r
+       // ...\r
+\r
+       if( xQueue1 != 0 )\r
+       {\r
+               // Send an unsigned long.  Wait for 10 ticks for space to become\r
+               // available if necessary.\r
+               if( xQueueSendToBack( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )\r
+               {\r
+                       // Failed to post the message, even after 10 ticks.\r
+               }\r
+       }\r
+\r
+       if( xQueue2 != 0 )\r
+       {\r
+               // Send a pointer to a struct AMessage object.  Don't block if the\r
+               // queue is already full.\r
+               pxMessage = & xMessage;\r
+               xQueueSendToBack( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );\r
+       }\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -295,10 +303,10 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueSend(\r
-                              xQueueHandle xQueue,\r
-                              const void * pvItemToQueue,\r
-                              portTickType xTicksToWait\r
-                         );\r
+                                                         xQueueHandle xQueue,\r
+                                                         const void * pvItemToQueue,\r
+                                                         portTickType xTicksToWait\r
+                                                );\r
  * </pre>\r
  *\r
  * This is a macro that calls xQueueGenericSend().  It is included for\r
@@ -320,7 +328,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  * @param xTicksToWait The maximum amount of time the task should block\r
  * waiting for space to become available on the queue, should it already\r
  * be full.  The call will return immediately if this is set to 0 and the\r
- * queue is full.  The time is defined in tick periods so the constant \r
+ * queue is full.  The time is defined in tick periods so the constant\r
  * portTICK_RATE_MS should be used to convert to real time if this is required.\r
  *\r
  * @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.\r
@@ -329,43 +337,43 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  } xMessage;\r
 \r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
 \r
  void vATask( void *pvParameters )\r
  {\r
  xQueueHandle xQueue1, xQueue2;\r
  struct AMessage *pxMessage;\r
 \r
-    // Create a queue capable of containing 10 unsigned long values.\r
-    xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
-\r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-\r
-    // ...\r
-\r
-    if( xQueue1 != 0 )\r
-    {\r
-        // Send an unsigned long.  Wait for 10 ticks for space to become\r
-        // available if necessary.\r
-        if( xQueueSend( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )\r
-        {\r
-            // Failed to post the message, even after 10 ticks.\r
-        }\r
-    }\r
-\r
-    if( xQueue2 != 0 )\r
-    {\r
-        // Send a pointer to a struct AMessage object.  Don't block if the\r
-        // queue is already full.\r
-        pxMessage = & xMessage;\r
-        xQueueSend( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );\r
-    }\r
+       // Create a queue capable of containing 10 unsigned long values.\r
+       xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
+\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+\r
+       // ...\r
+\r
+       if( xQueue1 != 0 )\r
+       {\r
+               // Send an unsigned long.  Wait for 10 ticks for space to become\r
+               // available if necessary.\r
+               if( xQueueSend( xQueue1, ( void * ) &ulVar, ( portTickType ) 10 ) != pdPASS )\r
+               {\r
+                       // Failed to post the message, even after 10 ticks.\r
+               }\r
+       }\r
+\r
+       if( xQueue2 != 0 )\r
+       {\r
+               // Send a pointer to a struct AMessage object.  Don't block if the\r
+               // queue is already full.\r
+               pxMessage = & xMessage;\r
+               xQueueSend( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0 );\r
+       }\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -404,7 +412,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
  * @param xTicksToWait The maximum amount of time the task should block\r
  * waiting for space to become available on the queue, should it already\r
  * be full.  The call will return immediately if this is set to 0 and the\r
- * queue is full.  The time is defined in tick periods so the constant \r
+ * queue is full.  The time is defined in tick periods so the constant\r
  * portTICK_RATE_MS should be used to convert to real time if this is required.\r
  *\r
  * @param xCopyPosition Can take the value queueSEND_TO_BACK to place the\r
@@ -417,43 +425,43 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  } xMessage;\r
 \r
- unsigned portLONG ulVar = 10UL;\r
+ unsigned long ulVar = 10UL;\r
 \r
  void vATask( void *pvParameters )\r
  {\r
  xQueueHandle xQueue1, xQueue2;\r
  struct AMessage *pxMessage;\r
 \r
-    // Create a queue capable of containing 10 unsigned long values.\r
-    xQueue1 = xQueueCreate( 10, sizeof( unsigned portLONG ) );\r
-\r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-\r
-    // ...\r
-\r
-    if( xQueue1 != 0 )\r
-    {\r
-        // Send an unsigned long.  Wait for 10 ticks for space to become\r
-        // available if necessary.\r
-        if( xQueueGenericSend( xQueue1, ( void * ) &ulVar, ( portTickType ) 10, queueSEND_TO_BACK ) != pdPASS )\r
-        {\r
-            // Failed to post the message, even after 10 ticks.\r
-        }\r
-    }\r
-\r
-    if( xQueue2 != 0 )\r
-    {\r
-        // Send a pointer to a struct AMessage object.  Don't block if the\r
-        // queue is already full.\r
-        pxMessage = & xMessage;\r
-        xQueueGenericSend( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0, queueSEND_TO_BACK );\r
-    }\r
+       // Create a queue capable of containing 10 unsigned long values.\r
+       xQueue1 = xQueueCreate( 10, sizeof( unsigned long ) );\r
+\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+\r
+       // ...\r
+\r
+       if( xQueue1 != 0 )\r
+       {\r
+               // Send an unsigned long.  Wait for 10 ticks for space to become\r
+               // available if necessary.\r
+               if( xQueueGenericSend( xQueue1, ( void * ) &ulVar, ( portTickType ) 10, queueSEND_TO_BACK ) != pdPASS )\r
+               {\r
+                       // Failed to post the message, even after 10 ticks.\r
+               }\r
+       }\r
+\r
+       if( xQueue2 != 0 )\r
+       {\r
+               // Send a pointer to a struct AMessage object.  Don't block if the\r
+               // queue is already full.\r
+               pxMessage = & xMessage;\r
+               xQueueGenericSend( xQueue2, ( void * ) &pxMessage, ( portTickType ) 0, queueSEND_TO_BACK );\r
+       }\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -467,10 +475,10 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueuePeek(\r
-                             xQueueHandle xQueue,\r
-                             void *pvBuffer,\r
-                             portTickType xTicksToWait\r
-                         );</pre>\r
+                                                        xQueueHandle xQueue,\r
+                                                        void *pvBuffer,\r
+                                                        portTickType xTicksToWait\r
+                                                );</pre>\r
  *\r
  * This is a macro that calls the xQueueGenericReceive() function.\r
  *\r
@@ -492,7 +500,7 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  *\r
  * @param xTicksToWait The maximum amount of time the task should block\r
  * waiting for an item to receive should the queue be empty at the time\r
- * of the call.    The time is defined in tick periods so the constant\r
+ * of the call.         The time is defined in tick periods so the constant\r
  * portTICK_RATE_MS should be used to convert to real time if this is required.\r
  * xQueuePeek() will return immediately if xTicksToWait is 0 and the queue\r
  * is empty.\r
@@ -504,8 +512,8 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  } xMessage;\r
 \r
  xQueueHandle xQueue;\r
@@ -515,20 +523,20 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  {\r
  struct AMessage *pxMessage;\r
 \r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-    if( xQueue == 0 )\r
-    {\r
-        // Failed to create the queue.\r
-    }\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+       if( xQueue == 0 )\r
+       {\r
+               // Failed to create the queue.\r
+       }\r
 \r
-    // ...\r
+       // ...\r
 \r
-    // Send a pointer to a struct AMessage object.  Don't block if the\r
-    // queue is already full.\r
-    pxMessage = & xMessage;\r
-    xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );\r
+       // Send a pointer to a struct AMessage object.  Don't block if the\r
+       // queue is already full.\r
+       pxMessage = & xMessage;\r
+       xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -538,16 +546,16 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  {\r
  struct AMessage *pxRxedMessage;\r
 \r
-    if( xQueue != 0 )\r
-    {\r
-        // Peek a message on the created queue.  Block for 10 ticks if a\r
-        // message is not immediately available.\r
-        if( xQueuePeek( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )\r
-        {\r
-            // pcRxedMessage now points to the struct AMessage variable posted\r
-            // by vATask, but the item still remains on the queue.\r
-        }\r
-    }\r
+       if( xQueue != 0 )\r
+       {\r
+               // Peek a message on the created queue.  Block for 10 ticks if a\r
+               // message is not immediately available.\r
+               if( xQueuePeek( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )\r
+               {\r
+                       // pcRxedMessage now points to the struct AMessage variable posted\r
+                       // by vATask, but the item still remains on the queue.\r
+               }\r
+       }\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -561,10 +569,10 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueReceive(\r
-                                 xQueueHandle xQueue,\r
-                                 void *pvBuffer,\r
-                                 portTickType xTicksToWait\r
-                            );</pre>\r
+                                                                xQueueHandle xQueue,\r
+                                                                void *pvBuffer,\r
+                                                                portTickType xTicksToWait\r
+                                                       );</pre>\r
  *\r
  * This is a macro that calls the xQueueGenericReceive() function.\r
  *\r
@@ -585,9 +593,9 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  *\r
  * @param xTicksToWait The maximum amount of time the task should block\r
  * waiting for an item to receive should the queue be empty at the time\r
- * of the call.    xQueueReceive() will return immediately if xTicksToWait\r
- * is zero and the queue is empty.  The time is defined in tick periods so the \r
- * constant portTICK_RATE_MS should be used to convert to real time if this is \r
+ * of the call.         xQueueReceive() will return immediately if xTicksToWait\r
+ * is zero and the queue is empty.  The time is defined in tick periods so the\r
+ * constant portTICK_RATE_MS should be used to convert to real time if this is\r
  * required.\r
  *\r
  * @return pdTRUE if an item was successfully received from the queue,\r
@@ -597,8 +605,8 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  } xMessage;\r
 \r
  xQueueHandle xQueue;\r
@@ -608,20 +616,20 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  {\r
  struct AMessage *pxMessage;\r
 \r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-    if( xQueue == 0 )\r
-    {\r
-        // Failed to create the queue.\r
-    }\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+       if( xQueue == 0 )\r
+       {\r
+               // Failed to create the queue.\r
+       }\r
 \r
-    // ...\r
+       // ...\r
 \r
-    // Send a pointer to a struct AMessage object.  Don't block if the\r
-    // queue is already full.\r
-    pxMessage = & xMessage;\r
-    xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );\r
+       // Send a pointer to a struct AMessage object.  Don't block if the\r
+       // queue is already full.\r
+       pxMessage = & xMessage;\r
+       xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -631,16 +639,16 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  {\r
  struct AMessage *pxRxedMessage;\r
 \r
-    if( xQueue != 0 )\r
-    {\r
-        // Receive a message on the created queue.  Block for 10 ticks if a\r
-        // message is not immediately available.\r
-        if( xQueueReceive( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )\r
-        {\r
-            // pcRxedMessage now points to the struct AMessage variable posted\r
-            // by vATask.\r
-        }\r
-    }\r
+       if( xQueue != 0 )\r
+       {\r
+               // Receive a message on the created queue.  Block for 10 ticks if a\r
+               // message is not immediately available.\r
+               if( xQueueReceive( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )\r
+               {\r
+                       // pcRxedMessage now points to the struct AMessage variable posted\r
+                       // by vATask.\r
+               }\r
+       }\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -655,11 +663,11 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueGenericReceive(\r
-                                       xQueueHandle xQueue,\r
-                                       void *pvBuffer,\r
-                                       portTickType xTicksToWait\r
-                                       portBASE_TYPE xJustPeek\r
-                                    );</pre>\r
+                                                                          xQueueHandle xQueue,\r
+                                                                          void *pvBuffer,\r
+                                                                          portTickType xTicksToWait\r
+                                                                          portBASE_TYPE        xJustPeek\r
+                                                                       );</pre>\r
  *\r
  * It is preferred that the macro xQueueReceive() be used rather than calling\r
  * this function directly.\r
@@ -679,7 +687,7 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  *\r
  * @param xTicksToWait The maximum amount of time the task should block\r
  * waiting for an item to receive should the queue be empty at the time\r
- * of the call.    The time is defined in tick periods so the constant\r
+ * of the call.         The time is defined in tick periods so the constant\r
  * portTICK_RATE_MS should be used to convert to real time if this is required.\r
  * xQueueGenericReceive() will return immediately if the queue is empty and\r
  * xTicksToWait is 0.\r
@@ -696,8 +704,8 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
    <pre>\r
  struct AMessage\r
  {\r
-    portCHAR ucMessageID;\r
-    portCHAR ucData[ 20 ];\r
+       char ucMessageID;\r
+       char ucData[ 20 ];\r
  } xMessage;\r
 \r
  xQueueHandle xQueue;\r
@@ -707,20 +715,20 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  {\r
  struct AMessage *pxMessage;\r
 \r
-    // Create a queue capable of containing 10 pointers to AMessage structures.\r
-    // These should be passed by pointer as they contain a lot of data.\r
-    xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
-    if( xQueue == 0 )\r
-    {\r
-        // Failed to create the queue.\r
-    }\r
+       // Create a queue capable of containing 10 pointers to AMessage structures.\r
+       // These should be passed by pointer as they contain a lot of data.\r
+       xQueue = xQueueCreate( 10, sizeof( struct AMessage * ) );\r
+       if( xQueue == 0 )\r
+       {\r
+               // Failed to create the queue.\r
+       }\r
 \r
-    // ...\r
+       // ...\r
 \r
-    // Send a pointer to a struct AMessage object.  Don't block if the\r
-    // queue is already full.\r
-    pxMessage = & xMessage;\r
-    xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );\r
+       // Send a pointer to a struct AMessage object.  Don't block if the\r
+       // queue is already full.\r
+       pxMessage = & xMessage;\r
+       xQueueSend( xQueue, ( void * ) &pxMessage, ( portTickType ) 0 );\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -730,16 +738,16 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const
  {\r
  struct AMessage *pxRxedMessage;\r
 \r
-    if( xQueue != 0 )\r
-    {\r
-        // Receive a message on the created queue.  Block for 10 ticks if a\r
-        // message is not immediately available.\r
-        if( xQueueGenericReceive( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )\r
-        {\r
-            // pcRxedMessage now points to the struct AMessage variable posted\r
-            // by vATask.\r
-        }\r
-    }\r
+       if( xQueue != 0 )\r
+       {\r
+               // Receive a message on the created queue.  Block for 10 ticks if a\r
+               // message is not immediately available.\r
+               if( xQueueGenericReceive( xQueue, &( pxRxedMessage ), ( portTickType ) 10 ) )\r
+               {\r
+                       // pcRxedMessage now points to the struct AMessage variable posted\r
+                       // by vATask.\r
+               }\r
+       }\r
 \r
        // ... Rest of task code.\r
  }\r
@@ -782,10 +790,10 @@ void vQueueDelete( xQueueHandle xQueue );
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueSendToFrontFromISR(\r
-                                         xQueueHandle pxQueue,\r
-                                         const void *pvItemToQueue,\r
-                                         portBASE_TYPE *pxHigherPriorityTaskWoken\r
-                                      );\r
+                                                                                xQueueHandle pxQueue,\r
+                                                                                const void *pvItemToQueue,\r
+                                                                                portBASE_TYPE *pxHigherPriorityTaskWoken\r
+                                                                         );\r
  </pre>\r
  *\r
  * This is a macro that calls xQueueGenericSendFromISR().\r
@@ -818,28 +826,28 @@ void vQueueDelete( xQueueHandle xQueue );
    <pre>\r
  void vBufferISR( void )\r
  {\r
portCHAR cIn;\r
char cIn;\r
  portBASE_TYPE xHigherPrioritTaskWoken;\r
 \r
-    // We have not woken a task at the start of the ISR.\r
-    xHigherPriorityTaskWoken = pdFALSE;\r
+       // We have not woken a task at the start of the ISR.\r
+       xHigherPriorityTaskWoken = pdFALSE;\r
 \r
-    // Loop until the buffer is empty.\r
-    do\r
-    {\r
-        // Obtain a byte from the buffer.\r
-        cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );                                           \r
+       // Loop until the buffer is empty.\r
+       do\r
+       {\r
+               // Obtain a byte from the buffer.\r
+               cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );\r
 \r
-        // Post the byte.  \r
-        xQueueSendToFrontFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );\r
+               // Post the byte.\r
+               xQueueSendToFrontFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );\r
 \r
-    } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
+       } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
 \r
-    // Now the buffer is empty we can switch context if necessary.\r
-    if( xHigherPriorityTaskWoken )\r
-    {\r
-        taskYIELD ();\r
-    }\r
+       // Now the buffer is empty we can switch context if necessary.\r
+       if( xHigherPriorityTaskWoken )\r
+       {\r
+               taskYIELD ();\r
+       }\r
  }\r
  </pre>\r
  *\r
@@ -853,10 +861,10 @@ void vQueueDelete( xQueueHandle xQueue );
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueSendToBackFromISR(\r
-                                         xQueueHandle pxQueue,\r
-                                         const void *pvItemToQueue,\r
-                                         portBASE_TYPE *pxHigherPriorityTaskWoken\r
-                                      );\r
+                                                                                xQueueHandle pxQueue,\r
+                                                                                const void *pvItemToQueue,\r
+                                                                                portBASE_TYPE *pxHigherPriorityTaskWoken\r
+                                                                         );\r
  </pre>\r
  *\r
  * This is a macro that calls xQueueGenericSendFromISR().\r
@@ -889,28 +897,28 @@ void vQueueDelete( xQueueHandle xQueue );
    <pre>\r
  void vBufferISR( void )\r
  {\r
portCHAR cIn;\r
char cIn;\r
  portBASE_TYPE xHigherPriorityTaskWoken;\r
 \r
-    // We have not woken a task at the start of the ISR.\r
-    xHigherPriorityTaskWoken = pdFALSE;\r
+       // We have not woken a task at the start of the ISR.\r
+       xHigherPriorityTaskWoken = pdFALSE;\r
 \r
-    // Loop until the buffer is empty.\r
-    do\r
-    {\r
-        // Obtain a byte from the buffer.\r
-        cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );                                           \r
+       // Loop until the buffer is empty.\r
+       do\r
+       {\r
+               // Obtain a byte from the buffer.\r
+               cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );\r
 \r
-        // Post the byte.\r
-        xQueueSendToBackFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );\r
+               // Post the byte.\r
+               xQueueSendToBackFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );\r
 \r
-    } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
+       } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
 \r
-    // Now the buffer is empty we can switch context if necessary.\r
-    if( xHigherPriorityTaskWoken )\r
-    {\r
-        taskYIELD ();\r
-    }\r
+       // Now the buffer is empty we can switch context if necessary.\r
+       if( xHigherPriorityTaskWoken )\r
+       {\r
+               taskYIELD ();\r
+       }\r
  }\r
  </pre>\r
  *\r
@@ -923,10 +931,10 @@ void vQueueDelete( xQueueHandle xQueue );
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueSendFromISR(\r
-                                     xQueueHandle pxQueue,\r
-                                     const void *pvItemToQueue,\r
-                                     portBASE_TYPE *pxHigherPriorityTaskWoken\r
-                                );\r
+                                                                        xQueueHandle pxQueue,\r
+                                                                        const void *pvItemToQueue,\r
+                                                                        portBASE_TYPE *pxHigherPriorityTaskWoken\r
+                                                               );\r
  </pre>\r
  *\r
  * This is a macro that calls xQueueGenericSendFromISR().  It is included\r
@@ -962,29 +970,29 @@ void vQueueDelete( xQueueHandle xQueue );
    <pre>\r
  void vBufferISR( void )\r
  {\r
portCHAR cIn;\r
char cIn;\r
  portBASE_TYPE xHigherPriorityTaskWoken;\r
 \r
-    // We have not woken a task at the start of the ISR.\r
-    xHigherPriorityTaskWoken = pdFALSE;\r
+       // We have not woken a task at the start of the ISR.\r
+       xHigherPriorityTaskWoken = pdFALSE;\r
 \r
-    // Loop until the buffer is empty.\r
-    do\r
-    {\r
-        // Obtain a byte from the buffer.\r
-        cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );                                           \r
+       // Loop until the buffer is empty.\r
+       do\r
+       {\r
+               // Obtain a byte from the buffer.\r
+               cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );\r
 \r
-        // Post the byte.  \r
-        xQueueSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );\r
+               // Post the byte.\r
+               xQueueSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken );\r
 \r
-    } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
+       } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
 \r
-    // Now the buffer is empty we can switch context if necessary.\r
-    if( xHigherPriorityTaskWoken )\r
-    {\r
-        // Actual macro used here is port specific.\r
-        taskYIELD_FROM_ISR ();\r
-    }\r
+       // Now the buffer is empty we can switch context if necessary.\r
+       if( xHigherPriorityTaskWoken )\r
+       {\r
+               // Actual macro used here is port specific.\r
+               taskYIELD_FROM_ISR ();\r
+       }\r
  }\r
  </pre>\r
  *\r
@@ -997,11 +1005,11 @@ void vQueueDelete( xQueueHandle xQueue );
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueGenericSendFromISR(\r
-                                           xQueueHandle pxQueue,\r
-                                           const void *pvItemToQueue,\r
-                                           portBASE_TYPE *pxHigherPriorityTaskWoken,\r
-                                                                                  portBASE_TYPE xCopyPosition\r
-                                       );\r
+                                                                                  xQueueHandle pxQueue,\r
+                                                                                  const        void    *pvItemToQueue,\r
+                                                                                  portBASE_TYPE        *pxHigherPriorityTaskWoken,\r
+                                                                                  portBASE_TYPE        xCopyPosition\r
+                                                                          );\r
  </pre>\r
  *\r
  * It is preferred that the macros xQueueSendFromISR(),\r
@@ -1040,29 +1048,29 @@ void vQueueDelete( xQueueHandle xQueue );
    <pre>\r
  void vBufferISR( void )\r
  {\r
portCHAR cIn;\r
char cIn;\r
  portBASE_TYPE xHigherPriorityTaskWokenByPost;\r
 \r
-    // We have not woken a task at the start of the ISR.\r
-    xHigherPriorityTaskWokenByPost = pdFALSE;\r
+       // We have not woken a task at the start of the ISR.\r
+       xHigherPriorityTaskWokenByPost = pdFALSE;\r
 \r
-    // Loop until the buffer is empty.\r
-    do\r
-    {\r
-        // Obtain a byte from the buffer.\r
-        cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );                                           \r
+       // Loop until the buffer is empty.\r
+       do\r
+       {\r
+               // Obtain a byte from the buffer.\r
+               cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS );\r
 \r
-        // Post each byte.\r
-        xQueueGenericSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWokenByPost, queueSEND_TO_BACK );\r
+               // Post each byte.\r
+               xQueueGenericSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWokenByPost, queueSEND_TO_BACK );\r
 \r
-    } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
+       } while( portINPUT_BYTE( BUFFER_COUNT ) );\r
 \r
-    // Now the buffer is empty we can switch context if necessary.  Note that the\r
-    // name of the yield function required is port specific.\r
-    if( xHigherPriorityTaskWokenByPost )\r
-    {\r
-        taskYIELD_YIELD_FROM_ISR();\r
-    }\r
+       // Now the buffer is empty we can switch context if necessary.  Note that the\r
+       // name of the yield function required is port specific.\r
+       if( xHigherPriorityTaskWokenByPost )\r
+       {\r
+               taskYIELD_YIELD_FROM_ISR();\r
+       }\r
  }\r
  </pre>\r
  *\r
@@ -1075,10 +1083,10 @@ signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void
  * queue. h\r
  * <pre>\r
  portBASE_TYPE xQueueReceiveFromISR(\r
-                                       xQueueHandle pxQueue,\r
-                                       void *pvBuffer,\r
-                                       portBASE_TYPE *pxTaskWoken\r
-                                   );\r
+                                                                          xQueueHandle pxQueue,\r
+                                                                          void *pvBuffer,\r
+                                                                          portBASE_TYPE        *pxTaskWoken\r
+                                                                  );\r
  * </pre>\r
  *\r
  * Receive an item from a queue.  It is safe to use this function from within an\r
@@ -1106,53 +1114,53 @@ signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void
  // Function to create a queue and post some values.\r
  void vAFunction( void *pvParameters )\r
  {\r
portCHAR cValueToPost;\r
char cValueToPost;\r
  const portTickType xBlockTime = ( portTickType )0xff;\r
 \r
-    // Create a queue capable of containing 10 characters.\r
-    xQueue = xQueueCreate( 10, sizeof( portCHAR ) );\r
-    if( xQueue == 0 )\r
-    {\r
-        // Failed to create the queue.\r
-    }\r
+       // Create a queue capable of containing 10 characters.\r
+       xQueue = xQueueCreate( 10, sizeof( char ) );\r
+       if( xQueue == 0 )\r
+       {\r
+               // Failed to create the queue.\r
+       }\r
 \r
-    // ...\r
+       // ...\r
 \r
-    // Post some characters that will be used within an ISR.  If the queue\r
-    // is full then this task will block for xBlockTime ticks.\r
-    cValueToPost = 'a';\r
-    xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );\r
-    cValueToPost = 'b';\r
-    xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );\r
+       // Post some characters that will be used within an ISR.  If the queue\r
+       // is full then this task will block for xBlockTime ticks.\r
+       cValueToPost = 'a';\r
+       xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );\r
+       cValueToPost = 'b';\r
+       xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );\r
 \r
-    // ... keep posting characters ... this task may block when the queue\r
-    // becomes full.\r
+       // ... keep posting characters ... this task may block when the queue\r
+       // becomes full.\r
 \r
-    cValueToPost = 'c';\r
-    xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );\r
+       cValueToPost = 'c';\r
+       xQueueSend( xQueue, ( void * ) &cValueToPost, xBlockTime );\r
  }\r
 \r
  // ISR that outputs all the characters received on the queue.\r
  void vISR_Routine( void )\r
  {\r
  portBASE_TYPE xTaskWokenByReceive = pdFALSE;\r
portCHAR cRxedChar;\r
-\r
-    while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &xTaskWokenByReceive) )\r
-    {\r
-        // A character was received.  Output the character now.\r
-        vOutputCharacter( cRxedChar );\r
-\r
-        // If removing the character from the queue woke the task that was\r
-        // posting onto the queue cTaskWokenByReceive will have been set to\r
-        // pdTRUE.  No matter how many times this loop iterates only one\r
-        // task will be woken.\r
-    }\r
-\r
-    if( cTaskWokenByPost != ( portCHAR ) pdFALSE;\r
-    {\r
-        taskYIELD ();\r
-    }\r
char cRxedChar;\r
+\r
+       while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &xTaskWokenByReceive) )\r
+       {\r
+               // A character was received.  Output the character now.\r
+               vOutputCharacter( cRxedChar );\r
+\r
+               // If removing the character from the queue woke the task that was\r
+               // posting onto the queue cTaskWokenByReceive will have been set to\r
+               // pdTRUE.  No matter how many times this loop iterates only one\r
+               // task will be woken.\r
+       }\r
+\r
+       if( cTaskWokenByPost != ( char ) pdFALSE;\r
+       {\r
+               taskYIELD ();\r
+       }\r
  }\r
  </pre>\r
  * \defgroup xQueueReceiveFromISR xQueueReceiveFromISR\r
@@ -1169,17 +1177,17 @@ signed portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle pxQueue );
 unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue );\r
 \r
 \r
-/* \r
+/*\r
  * xQueueAltGenericSend() is an alternative version of xQueueGenericSend().\r
  * Likewise xQueueAltGenericReceive() is an alternative version of\r
  * xQueueGenericReceive().\r
  *\r
- * The source code that implements the alternative (Alt) API is much \r
- * simpler     because it executes everything from within a critical section.  \r
- * This is     the approach taken by many other RTOSes, but FreeRTOS.org has the \r
- * preferred fully featured API too.  The fully featured API has more \r
- * complex     code that takes longer to execute, but makes much less use of \r
- * critical sections.  Therefore the alternative API sacrifices interrupt \r
+ * The source code that implements the alternative (Alt) API is much\r
+ * simpler     because it executes everything from within a critical section.\r
+ * This is     the approach taken by many other RTOSes, but FreeRTOS.org has the\r
+ * preferred fully featured API too.  The fully featured API has more\r
+ * complex     code that takes longer to execute, but makes much less use of\r
+ * critical sections.  Therefore the alternative API sacrifices interrupt\r
  * responsiveness to gain execution speed, whereas the fully featured API\r
  * sacrifices execution speed to ensure better interrupt responsiveness.\r
  */\r
@@ -1221,14 +1229,14 @@ portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle xMutex );
 /*\r
  * The registry is provided as a means for kernel aware debuggers to\r
  * locate queues, semaphores and mutexes.  Call vQueueAddToRegistry() add\r
- * a queue, semaphore or mutex handle to the registry if you want the handle \r
- * to be available to a kernel aware debugger.  If you are not using a kernel \r
+ * a queue, semaphore or mutex handle to the registry if you want the handle\r
+ * to be available to a kernel aware debugger.  If you are not using a kernel\r
  * aware debugger then this function can be ignored.\r
  *\r
  * configQUEUE_REGISTRY_SIZE defines the maximum number of handles the\r
- * registry can hold.  configQUEUE_REGISTRY_SIZE must be greater than 0 \r
+ * registry can hold.  configQUEUE_REGISTRY_SIZE must be greater than 0\r
  * within FreeRTOSConfig.h for the registry to be available.  Its value\r
- * does not effect the number of queues, semaphores and mutexes that can be \r
+ * does not effect the number of queues, semaphores and mutexes that can be\r
  * created - just the number that the registry can hold.\r
  *\r
  * @param xQueue The handle of the queue being added to the registry.  This\r
@@ -1239,7 +1247,7 @@ portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle xMutex );
  * name that the kernel aware debugger will display.\r
  */\r
 #if configQUEUE_REGISTRY_SIZE > 0\r
-       void vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcName );\r
+       void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName );\r
 #endif\r
 \r
 \r