]> git.sur5r.net Git - freertos/blobdiff - Demo/PIC18_WizC/Demo5/main.c
Remove unnecessary use of portLONG, portCHAR and portSHORT.
[freertos] / Demo / PIC18_WizC / Demo5 / main.c
index 52b26ab7bbde68eccee5eb8ddd81f6b23a0f6d3c..14013a4016b720708704792a68dddce90a6f3c97 100644 (file)
@@ -1,48 +1,49 @@
 /*\r
-       FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+    FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.\r
 \r
-       This file is part of the FreeRTOS distribution.\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 a\r
-       combined work that includes FreeRTOS without being obliged to provide the \r
-       source code for proprietary components outside of the FreeRTOS kernel.  \r
-       Alternative commercial license and support terms are also available upon \r
-       request.  See the licensing section of http://www.FreeRTOS.org for full \r
-       license details.\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 a\r
+    combined work that includes FreeRTOS without being obliged to provide the\r
+    source code for proprietary components outside of the FreeRTOS kernel.\r
+    Alternative commercial license and support terms are also available upon\r
+    request.  See the licensing section of http://www.FreeRTOS.org for full\r
+    license details.\r
 \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.\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.\r
 \r
-       You should have received a copy of the GNU General Public License along\r
-       with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59\r
-       Temple Place, Suite 330, Boston, MA  02111-1307  USA.\r
+    You should have received a copy of the GNU General Public License along\r
+    with FreeRTOS; 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
-       * Looking for a quick start?  Then check out the FreeRTOS eBook!          *\r
-       * See http://www.FreeRTOS.org/Documentation for details                   *\r
-       *                                                                         *\r
-       ***************************************************************************\r
+    ***************************************************************************\r
+    *                                                                         *\r
+    * The FreeRTOS eBook and reference manual are available to purchase for a *\r
+    * small fee. Help yourself get started quickly while also helping the     *\r
+    * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *\r
+    *                                                                         *\r
+    ***************************************************************************\r
 \r
-       1 tab == 4 spaces!\r
+    1 tab == 4 spaces!\r
 \r
-       Please ensure to read the configuration and relevant port sections of the\r
-       online documentation.\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
+    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
+    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
+    http://www.OpenRTOS.com - Commercial support, development, porting,\r
+    licensing and training services.\r
 */\r
 \r
 /*\r
@@ -93,18 +94,18 @@ has been discovered.  If an error has been discovered the check task runs
 more frequently - increasing the LED flash rate. */\r
 #define mainNO_ERROR_CHECK_PERIOD      ( ( portTickType ) 10000 / portTICK_RATE_MS )\r
 #define mainERROR_CHECK_PERIOD         ( ( portTickType )  1000 / portTICK_RATE_MS )\r
-#define mainCHECK_TASK_LED                     ( ( unsigned portCHAR ) 3 )\r
+#define mainCHECK_TASK_LED                     ( ( unsigned char ) 3 )\r
 \r
 /* Priority definitions for some of the tasks.  Other tasks just use the idle\r
 priority. */\r
-#define mainCHECK_TASK_PRIORITY        ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 2 )\r
-#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned portCHAR ) 1 )\r
+#define mainCHECK_TASK_PRIORITY        ( tskIDLE_PRIORITY + ( unsigned char ) 2 )\r
+#define mainLED_FLASH_PRIORITY ( tskIDLE_PRIORITY + ( unsigned char ) 1 )\r
 \r
 /* Constants required for the communications.  Only one character is ever \r
 transmitted. */\r
-#define mainCOMMS_QUEUE_LENGTH         ( ( unsigned portCHAR ) 5 )\r
+#define mainCOMMS_QUEUE_LENGTH         ( ( unsigned char ) 5 )\r
 #define mainNO_BLOCK                           ( ( portTickType ) 0 )\r
-#define mainBAUD_RATE                          ( ( unsigned portLONG ) 57600 )\r
+#define mainBAUD_RATE                          ( ( unsigned long ) 57600 )\r
 \r
 /*\r
  * The task function for the "Check" task.\r
@@ -115,7 +116,7 @@ static portTASK_FUNCTION_PROTO( vErrorChecks, pvParameters );
  * Checks the unique counts of other tasks to ensure they are still operational.\r
  * Returns pdTRUE if an error is detected, otherwise pdFALSE.\r
  */\r
-static portCHAR prvCheckOtherTasksAreStillRunning( void );\r
+static char prvCheckOtherTasksAreStillRunning( void );\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -134,7 +135,7 @@ void main( void )
        vStartLEDFlashTasks( mainLED_FLASH_PRIORITY );\r
 \r
        /* Start the check task defined in this file. */\r
-       xTaskCreate( vErrorChecks, ( const portCHAR * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+       xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
 \r
        /* Start the scheduler.  Will never return here. */\r
        vTaskStartScheduler();\r
@@ -149,7 +150,7 @@ static portTASK_FUNCTION( vErrorChecks, pvParameters )
 {\r
 portTickType xLastCheckTime;\r
 portTickType xDelayTime = mainNO_ERROR_CHECK_PERIOD;\r
-portCHAR cErrorOccurred;\r
+char cErrorOccurred;\r
 \r
        /* We need to initialise xLastCheckTime prior to the first call to \r
        vTaskDelayUntil(). */\r
@@ -178,13 +179,13 @@ portCHAR cErrorOccurred;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static portCHAR prvCheckOtherTasksAreStillRunning( void )\r
+static char prvCheckOtherTasksAreStillRunning( void )\r
 {\r
-       portCHAR cErrorHasOccurred = ( portCHAR ) pdFALSE;\r
+       char cErrorHasOccurred = ( char ) pdFALSE;\r
 \r
        if( xAreMathsTaskStillRunning() != pdTRUE )\r
        {\r
-               cErrorHasOccurred = ( portCHAR ) pdTRUE;\r
+               cErrorHasOccurred = ( char ) pdTRUE;\r
        }\r
        return cErrorHasOccurred;\r
 }\r