]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/main.c
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Demo / MB96340_Softune / FreeRTOS_96348hs_SK16FX100PMC / Src / main.c
index bd913948582908c1700259c352a1f2efd3e3afd7..8452d09c10fec8e09a2c9fdea9a9b8aa0deada46 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
-    FreeRTOS V7.5.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+    All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 \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
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
 /*\r
  * Creates all the demo application tasks, then starts the scheduler.  The WEB\r
  * documentation provides more details of the demo application tasks.\r
- * \r
+ *\r
  * In addition to the standard demo tasks, the follow demo specific tasks are\r
  * create:\r
  *\r
- * The "Check" task.  This only executes every three seconds but has the highest \r
- * priority so is guaranteed to get processor time.  Its main function is to \r
- * check that all the other tasks are still operational.  Most tasks maintain \r
- * a unique count that is incremented each time the task successfully completes \r
- * its function.  Should any error occur within such a task the count is \r
- * permanently halted.  The check task inspects the count of each task to ensure \r
- * it has changed since the last time the check task executed.  If all the count \r
- * variables have changed all the tasks are still executing error free, and the \r
- * check task toggles the onboard LED.  Should any task contain an error at any time \r
+ * The "Check" task.  This only executes every three seconds but has the highest\r
+ * priority so is guaranteed to get processor time.  Its main function is to\r
+ * check that all the other tasks are still operational.  Most tasks maintain\r
+ * a unique count that is incremented each time the task successfully completes\r
+ * its function.  Should any error occur within such a task the count is\r
+ * permanently halted.  The check task inspects the count of each task to ensure\r
+ * it has changed since the last time the check task executed.  If all the count\r
+ * variables have changed all the tasks are still executing error free, and the\r
+ * check task toggles the onboard LED.  Should any task contain an error at any time\r
  * the LED toggle rate will change from 3 seconds to 500ms.\r
  *\r
- * The "Trace Utility" task.  This can be used to obtain trace and debug \r
+ * The "Trace Utility" task.  This can be used to obtain trace and debug\r
  * information via UART1.\r
  */\r
 \r
 /* Baud rate used by the COM test tasks. */\r
 #define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )\r
 \r
-/* The frequency at which the 'Check' tasks executes.  See the comments at the \r
+/* The frequency at which the 'Check' tasks executes.  See the comments at the\r
 top of the page.  When the system is operating error free the 'Check' task\r
 toggles an LED every three seconds.  If an error is discovered in any task the\r
-rate is increased to 500 milliseconds.  [in this case the '*' characters on the \r
+rate is increased to 500 milliseconds.  [in this case the '*' characters on the\r
 LCD represent LED's] */\r
-#define mainNO_ERROR_CHECK_DELAY       ( (portTickType) 3000 / portTICK_RATE_MS )\r
-#define mainERROR_CHECK_DELAY          ( (portTickType) 500 / portTICK_RATE_MS )\r
+#define mainNO_ERROR_CHECK_DELAY       ( (TickType_t) 3000 / portTICK_PERIOD_MS )\r
+#define mainERROR_CHECK_DELAY          ( (TickType_t) 500 / portTICK_PERIOD_MS )\r
 \r
 /* LED assignments for the demo tasks. */\r
 #define mainNUM_FLASH_CO_ROUTINES      8\r
@@ -143,7 +144,7 @@ LCD represent LED's] */
 \r
 /*-----------------------------------------------------------*/\r
 \r
-/* \r
+/*\r
  * The function that implements the Check task.  See the comments at the head\r
  * of the page for implementation details.\r
  */\r
@@ -175,7 +176,7 @@ void main( void )
 \r
        /* Start the standard demo application tasks. */\r
        vStartLEDFlashTasks( mainLED_TASK_PRIORITY );\r
-       vStartIntegerMathTasks( tskIDLE_PRIORITY );     \r
+       vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
        vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
        vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
        vStartBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );\r
@@ -192,7 +193,7 @@ void main( void )
        #endif\r
 \r
        /* Start the 'Check' task which is defined in this file. */\r
-       xTaskCreate( vErrorChecks, (signed char *) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+       xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
 \r
        /* The suicide tasks must be started last as they record the number of other\r
        tasks that exist within the system.  The value is then used to ensure at run\r
@@ -200,10 +201,10 @@ void main( void )
        vCreateSuicidalTasks( mainDEATH_PRIORITY );\r
 \r
        /* Now start the scheduler.  Following this call the created tasks should\r
-       be executing. */        \r
+       be executing. */\r
        vTaskStartScheduler( );\r
-       \r
-       /* vTaskStartScheduler() will only return if an error occurs while the \r
+\r
+       /* vTaskStartScheduler() will only return if an error occurs while the\r
        idle task is being created. */\r
        for( ;; );\r
 }\r
@@ -223,7 +224,7 @@ static void prvSetupHardware( void )
 \r
 static void vErrorChecks( void *pvParameters )\r
 {\r
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY;\r
 \r
        /* Just to remove compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -233,14 +234,14 @@ portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY;
        for( ;; )\r
        {\r
                /* Wait until it is time to check again.  The time we wait here depends\r
-               on whether an error has been detected or not.  When an error is \r
+               on whether an error has been detected or not.  When an error is\r
                detected the time is shortened resulting in a faster LED flash rate. */\r
                vTaskDelay( xDelayPeriod );\r
 \r
                /* See if the other tasks are all ok. */\r
                if( prvCheckOtherTasksAreStillRunning() != pdPASS )\r
                {\r
-                       /* An error occurred in one of the tasks so shorten the delay \r
+                       /* An error occurred in one of the tasks so shorten the delay\r
                        period - which has the effect of increasing the frequency of the\r
                        LED toggle. */\r
                        xDelayPeriod = mainERROR_CHECK_DELAY;\r
@@ -257,7 +258,7 @@ static short prvCheckOtherTasksAreStillRunning( void )
        static short    sNoErrorFound = pdTRUE;\r
 \r
        /* The demo tasks maintain a count that increments every cycle of the task\r
-       provided that the task has never encountered an error.  This function \r
+       provided that the task has never encountered an error.  This function\r
        checks the counts maintained by the tasks to ensure they are still being\r
        incremented.  A count remaining at the same value between calls therefore\r
        indicates that an error has been detected.  Only tasks that do not flash\r