]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/PIC32MX_MPLAB/main_full.c
Update version number ready for V8.2.1 release.
[freertos] / FreeRTOS / Demo / PIC32MX_MPLAB / main_full.c
index 53cfd603b5a660eedd12986f04b478e94ada8ba3..5d901791794ac73e4da3fa77c4ed13328f9edb24 100644 (file)
@@ -1,75 +1,70 @@
 /*\r
-    FreeRTOS V7.4.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
-\r
-    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\r
-    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
-\r
-    ***************************************************************************\r
-     *                                                                       *\r
-     *    FreeRTOS tutorial books are available in pdf and paperback.        *\r
-     *    Complete, revised, and edited pdf reference manuals are also       *\r
-     *    available.                                                         *\r
-     *                                                                       *\r
-     *    Purchasing FreeRTOS documentation will not only help you, by       *\r
-     *    ensuring you get running as quickly as possible and with an        *\r
-     *    in-depth knowledge of how to use FreeRTOS, it will also help       *\r
-     *    the FreeRTOS project to continue with its mission of providing     *\r
-     *    professional grade, cross platform, de facto standard solutions    *\r
-     *    for microcontrollers - completely free of charge!                  *\r
-     *                                                                       *\r
-     *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *\r
-     *                                                                       *\r
-     *    Thank you for using FreeRTOS, and thank you for your support!      *\r
-     *                                                                       *\r
-    ***************************************************************************\r
+    FreeRTOS V8.2.1 - Copyright (C) 2015 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
     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
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
-    distribute a combined work that includes FreeRTOS without being obliged to\r
-    provide the source code for proprietary components outside of the FreeRTOS\r
-    kernel.\r
+    ***************************************************************************\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
 \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
-    FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\r
-    details. You should have received a copy of the GNU General Public License\r
-    and the FreeRTOS license exception along with FreeRTOS; if not it can be\r
-    viewed here: http://www.freertos.org/a00114.html and also obtained by\r
-    writing to Real Time Engineers Ltd., contact details for whom are available\r
-    on the FreeRTOS WEB site.\r
-\r
-    1 tab == 4 spaces!\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
 \r
     ***************************************************************************\r
      *                                                                       *\r
-     *    Having a problem?  Start by reading the FAQ "My application does   *\r
-     *    not run, what could be wrong?"                                     *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
      *                                                                       *\r
-     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
      *                                                                       *\r
     ***************************************************************************\r
 \r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+    the FAQ page "My application does not run, what could be wrong?".  Have you\r
+    defined configASSERT()?\r
 \r
-    http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
-    license and Real Time Engineers Ltd. contact details.\r
+    http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+    embedded software for free we request you assist our global community by\r
+    participating in the support forum.\r
+\r
+    http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+    be as productive as possible as early as possible.  Now you can receive\r
+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+    Ltd, and the world's leading authority on the world's leading RTOS.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
-    including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
-    fully thread aware and reentrant UDP/IP stack.\r
-\r
-    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
-    Integrity Systems, who sell the code with commercial support, \r
-    indemnification and middleware, under the OpenRTOS brand.\r
-    \r
-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
-    engineered and independently SIL3 certified version for use in safety and \r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
     mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
 */\r
 \r
 /******************************************************************************\r
@@ -84,9 +79,9 @@
  * required to configure the hardware, are defined in main.c.\r
  ******************************************************************************\r
  *\r
- * main_full() creates all the demo application tasks and software timers, then \r
- * starts the scheduler.  The WEB documentation provides more details of the \r
- * standard demo application tasks.  In addition to the standard demo tasks, the \r
+ * main_full() creates all the demo application tasks and software timers, then\r
+ * starts the scheduler.  The WEB documentation provides more details of the\r
+ * standard demo application tasks.  In addition to the standard demo tasks, the\r
  * following tasks and tests are defined and/or created within this file:\r
  *\r
  * "LCD" task - the LCD task is a 'gatekeeper' task.  It is the only task that\r
  * the check software timer discovers that a task has either stalled, or\r
  * reported an error, then it changes its own execution period from the initial\r
  * three seconds, to just 200ms.  The check software timer callback function\r
- * also writes a status message to the LCD (via the LCD task).  If all the demo \r
- * tasks are executing with their expected behaviour then the check task writes \r
+ * also writes a status message to the LCD (via the LCD task).  If all the demo\r
+ * tasks are executing with their expected behaviour then the check task writes\r
  * a count of the number of times the high frequency interrupt has incremented\r
  * ulHighFrequencyTimerInterrupts - which is one in every 20,000 interrupts.\r
  *\r
  * "Register test" tasks - These tasks are used in part to test the kernel port.\r
- * They set each processor register to a known value, then check that the \r
+ * They set each processor register to a known value, then check that the\r
  * register still contains that value.  Each of the tasks sets the registers\r
- * to different values, and will get swapping in and out between setting and \r
+ * to different values, and will get swapping in and out between setting and\r
  * then subsequently checking the register values.  Discovery of an incorrect\r
  * value would be indicative of an error in the task switching mechanism.\r
  *\r
- * By way of demonstration, the demo application defines \r
- * configMAX_SYSCALL_INTERRUPT_PRIORITY to be 3, configKERNEL_INTERRUPT_PRIORITY \r
+ * By way of demonstration, the demo application defines\r
+ * configMAX_SYSCALL_INTERRUPT_PRIORITY to be 3, configKERNEL_INTERRUPT_PRIORITY\r
  * to be 1, and all other interrupts as follows:\r
  *\r
- *     + The UART is allocated a priority of 2. This means it can interrupt the \r
+ *     + The UART is allocated a priority of 2. This means it can interrupt the\r
  *    RTOS tick, and can also safely use queues.\r
- *  + Two timers are configured to generate interrupts just to test the nesting \r
- *    and queue access mechanisms. These timers are allocated priorities 2 and 3 \r
- *    respectively. Even though they both access the same two queues, the \r
- *    priority 3 interrupt can safely interrupt the priority 2 interrupt. Both \r
+ *  + Two timers are configured to generate interrupts just to test the nesting\r
+ *    and queue access mechanisms. These timers are allocated priorities 2 and 3\r
+ *    respectively. Even though they both access the same two queues, the\r
+ *    priority 3 interrupt can safely interrupt the priority 2 interrupt. Both\r
  *    can interrupt the RTOS tick.\r
- *  + Finally a high frequency timer interrupt is configured to use priority 4 - \r
- *    therefore kernel activity will never prevent the high frequency timer from \r
- *    executing immediately that the interrupt is raised (within the limitations \r
- *    of the hardware itself). It would not be safe to access a queue from this \r
- *    interrupt as it is above configMAX_SYSCALL_INTERRUPT_PRIORITY. \r
+ *  + Finally a high frequency timer interrupt is configured to use priority 4 -\r
+ *    therefore kernel activity will never prevent the high frequency timer from\r
+ *    executing immediately that the interrupt is raised (within the limitations\r
+ *    of the hardware itself). It would not be safe to access a queue from this\r
+ *    interrupt as it is above configMAX_SYSCALL_INTERRUPT_PRIORITY.\r
  *\r
  * See the online documentation for this demo for more information on interrupt\r
  * usage.\r
 \r
 /* The period after which the check timer will expire, in ms, provided no errors\r
 have been reported by any of the standard demo tasks.  ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS                      ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS                      ( 3000UL / portTICK_PERIOD_MS )\r
 \r
 /* The period at which the check timer will expire, in ms, if an error has been\r
 reported in one of the standard demo tasks.  ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS        ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS        ( 200UL / portTICK_PERIOD_MS )\r
 \r
 /* The priorities of the various demo application tasks. */\r
 #define mainSEM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 1 )\r
@@ -175,9 +170,6 @@ in ticks using the portTICK_RATE_MS constant. */
 #define mainINTEGER_TASK_PRIORITY           ( tskIDLE_PRIORITY )\r
 #define mainGEN_QUEUE_TASK_PRIORITY                    ( tskIDLE_PRIORITY )\r
 \r
-/* The LED controlled by the 'check' software timer. */\r
-#define mainCHECK_LED                                          ( 7 )\r
-\r
 /* The LED used by the comtest tasks.  mainCOM_TEST_LED + 1 is also used.\r
 See the comtest.c file for more information. */\r
 #define mainCOM_TEST_LED                                       ( 4 )\r
@@ -188,14 +180,14 @@ See the comtest.c file for more information. */
 /* Misc. */\r
 #define mainDONT_BLOCK                                         ( 0 )\r
 \r
-/* Dimension the buffer used to hold the value of the high frequency timer \r
+/* Dimension the buffer used to hold the value of the high frequency timer\r
 count when it is converted to a string. */\r
 #define mainMAX_STRING_LENGTH                          ( 20 )\r
 \r
 /* The frequency at which the "fast interrupt test" interrupt will occur. */\r
 #define mainTEST_INTERRUPT_FREQUENCY           ( 20000 )\r
 \r
-/* The number of timer clocks expected to occur between each "fast interrupt \r
+/* The number of timer clocks expected to occur between each "fast interrupt\r
 test" interrupt. */\r
 #define mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ( ( configCPU_CLOCK_HZ >> 1 ) / mainTEST_INTERRUPT_FREQUENCY )\r
 \r
@@ -203,15 +195,23 @@ test" interrupt. */
 #define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) ( configCPU_CLOCK_HZ >> 1 ) ) * 1000000000.0 ) )\r
 \r
 /* The number of LEDs that should be controlled by the flash software timer\r
-standard demo. */\r
-#define mainNUM_FLASH_TIMER_LEDS                       ( 3 )\r
+standard demo and the LED to be toggle by the check task.  The starter kit only\r
+has three LEDs so when the demo is configured to run on the starter kit there\r
+is one less flash timer so the check task can use the third LED. */\r
+#ifdef PIC32_STARTER_KIT\r
+       #define mainNUM_FLASH_TIMER_LEDS                        ( 2 )\r
+       #define mainCHECK_LED                                           ( 2 )\r
+#else\r
+       #define mainNUM_FLASH_TIMER_LEDS                        ( 3 )\r
+       #define mainCHECK_LED                                           ( 7 )\r
+#endif\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 /*\r
  * The check timer callback function, as described at the top of this file.\r
  */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
 \r
 /*\r
  * It is important to ensure the high frequency timer test does not start before\r
@@ -220,14 +220,14 @@ static void prvCheckTimerCallback( xTimerHandle xTimer );
  * executing.  A one-shot timer is used, so the callback function will only\r
  * execute once (unless it is manually reset/restarted).\r
  */\r
-static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer );\r
+static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer );\r
 \r
 /*\r
- * Tasks that test the context switch mechanism by filling the processor \r
+ * Tasks that test the context switch mechanism by filling the processor\r
  * registers with known values, then checking that the values contained\r
  * within the registers is as expected.  The tasks are likely to get swapped\r
  * in and out between setting the register values and checking the register\r
- * values. \r
+ * values.\r
  */\r
 static void prvRegTestTask1( void *pvParameters );\r
 static void prvRegTestTask2( void *pvParameters );\r
@@ -235,13 +235,9 @@ static void prvRegTestTask2( void *pvParameters );
 /*-----------------------------------------------------------*/\r
 \r
 /* The queue used to send messages to the LCD task. */\r
-static xQueueHandle xLCDQueue;\r
+static QueueHandle_t xLCDQueue;\r
 \r
-/* Flag used by prvRegTestTask1() and prvRegTestTask2() to indicate their status\r
-(pass/fail). */\r
-volatile unsigned long ulStatus1 = pdPASS;\r
-\r
-/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on \r
+/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on\r
 each iteration of their function.  This is used to detect either task stopping\r
 their execution.. */\r
 volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0;\r
@@ -253,9 +249,9 @@ volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0;
  */\r
 int main_full( void )\r
 {\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
 \r
-       /* Create the LCD task - this returns the queue to use when writing \r
+       /* Create the LCD task - this returns the queue to use when writing\r
        messages to the LCD. */\r
        xLCDQueue = xStartLCDTask();\r
 \r
@@ -268,34 +264,34 @@ xTimerHandle xTimer = NULL;
        vStartInterruptQueueTasks();\r
 \r
        /* Create the tasks defined within this file. */\r
-       xTaskCreate( prvRegTestTask1, ( const signed char * const ) "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
-       xTaskCreate( prvRegTestTask2, ( const signed char * const ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+       xTaskCreate( prvRegTestTask1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+       xTaskCreate( prvRegTestTask2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
 \r
-    /* The PIC32MX795 uses an 8 deep fifo where TX interrupts are asserted \r
-       whilst the TX buffer is empty.  This causes an issue with the test driver so \r
+    /* The PIC32MX795 uses an 8 deep fifo where TX interrupts are asserted\r
+       whilst the TX buffer is empty.  This causes an issue with the test driver so\r
        it is not used in this demo */\r
        #if !defined(__32MX795F512L__)\r
                vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );\r
-       #endif  \r
-       \r
-       /* Create the software timer that performs the 'check' functionality, as \r
+       #endif\r
+\r
+       /* Create the software timer that performs the 'check' functionality, as\r
        described at the top of this file. */\r
-       xTimer = xTimerCreate(  ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */\r
+       xTimer = xTimerCreate(  "CheckTimer",/* A text name, purely to help debugging. */\r
                                                        ( mainCHECK_TIMER_PERIOD_MS ),          /* The timer period, in this case 3000ms (3s). */\r
                                                        pdTRUE,                                                         /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
                                                        ( void * ) 0,                                           /* The ID is not used, so can be set to anything. */\r
                                                        prvCheckTimerCallback                           /* The callback function that inspects the status of all the other tasks. */\r
-                                               );      \r
-       \r
+                                               );\r
+\r
        if( xTimer != NULL )\r
        {\r
                xTimerStart( xTimer, mainDONT_BLOCK );\r
        }\r
-       \r
+\r
        /* A software timer is also used to start the high frequency timer test.\r
        This is to ensure the test does not start before the kernel.  This time a\r
        one shot software timer is used. */\r
-       xTimer = xTimerCreate( ( const signed char * ) "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest );\r
+       xTimer = xTimerCreate( "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest );\r
        if( xTimer != NULL )\r
        {\r
                xTimerStart( xTimer, mainDONT_BLOCK );\r
@@ -317,15 +313,15 @@ static void prvRegTestTask1( void *pvParameters )
 {\r
 extern void vRegTest1( volatile unsigned long * );\r
 \r
-       for( ;; )\r
-       {\r
-               /* Perform the register test function. */\r
-               vRegTest1( &ulStatus1 );\r
+       /* Avoid compiler warnings. */\r
+       ( void ) pvParameters;\r
 \r
-               /* Increment the counter so the check task knows we are still \r
-               running. */\r
-               ulRegTest1Cycles++;\r
-       }\r
+       /* Pass the address of the RegTest1 loop counter into the test function,\r
+       which is necessarily implemented in assembler. */\r
+       vRegTest1( &ulRegTest1Cycles );\r
+\r
+       /* vRegTest1 should never exit! */\r
+       vTaskDelete( NULL );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -333,19 +329,19 @@ static void prvRegTestTask2( void *pvParameters )
 {\r
 extern void vRegTest2( volatile unsigned long * );\r
 \r
-       for( ;; )\r
-       {\r
-               /* Perform the register test function. */\r
-               vRegTest2( &ulStatus1 );\r
+       /* Avoid compiler warnings. */\r
+       ( void ) pvParameters;\r
 \r
-               /* Increment the counter so the check task knows we are still\r
-               running. */\r
-               ulRegTest2Cycles++;\r
-       }\r
+       /* Pass the address of the RegTest2 loop counter into the test function,\r
+       which is necessarily implemented in assembler. */\r
+       vRegTest2( &ulRegTest2Cycles );\r
+\r
+       /* vRegTest1 should never exit! */\r
+       vTaskDelete( NULL );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
 {\r
 static long lChangedTimerPeriodAlready = pdFALSE;\r
 static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
@@ -355,13 +351,7 @@ static char cStringBuffer[ mainMAX_STRING_LENGTH ];
 \r
 /* The count of the high frequency timer interrupts. */\r
 extern unsigned long ulHighFrequencyTimerInterrupts;\r
-static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };\r
-\r
-       /* Has either register check 1 or 2 task discovered an error? */\r
-       if( ulStatus1 != pdPASS )\r
-       {\r
-               xMessage.pcMessage = "Error: Reg test1";\r
-       }\r
+static xLCDMessage xMessage = { ( 200 / portTICK_PERIOD_MS ), cStringBuffer };\r
 \r
        /* Check that the register test 1 task is still running. */\r
        if( ulLastRegTest1Value == ulRegTest1Cycles )\r
@@ -370,16 +360,16 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
        }\r
        ulLastRegTest1Value = ulRegTest1Cycles;\r
 \r
-       \r
+\r
        /* Check that the register test 2 task is still running. */\r
        if( ulLastRegTest2Value == ulRegTest2Cycles )\r
        {\r
                xMessage.pcMessage = "Error: Reg test3";\r
        }\r
        ulLastRegTest2Value = ulRegTest2Cycles;\r
-       \r
 \r
-       /* Have any of the standard demo tasks detected an error in their \r
+\r
+       /* Have any of the standard demo tasks detected an error in their\r
        operation? */\r
        if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
        {\r
@@ -389,10 +379,6 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
        {\r
                xMessage.pcMessage = "Error: Q Peek";\r
        }\r
-       else if( xAreComTestTasksStillRunning() != pdTRUE )\r
-       {\r
-               xMessage.pcMessage = "Error: COM test";\r
-       }\r
        else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
        {\r
                xMessage.pcMessage = "Error: Blck time";\r
@@ -405,6 +391,12 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
        {\r
                xMessage.pcMessage = "Error: Int queue";\r
        }\r
+       #if !defined(__32MX795F512L__)\r
+               else if( xAreComTestTasksStillRunning() != pdTRUE )\r
+               {\r
+                       xMessage.pcMessage = "Error: COM test";\r
+               }\r
+       #endif\r
 \r
        if( xMessage.pcMessage != cStringBuffer )\r
        {\r
@@ -415,33 +407,33 @@ static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
                if( lChangedTimerPeriodAlready == pdFALSE )\r
                {\r
                        lChangedTimerPeriodAlready = pdTRUE;\r
-                       \r
+\r
                        /* This call to xTimerChangePeriod() uses a zero block time.\r
                        Functions called from inside of a timer callback function must\r
                        *never* attempt to block as to do so could impact other software\r
                        timers. */\r
                        xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );\r
-               }               \r
+               }\r
        }\r
        else\r
        {\r
-               /* Write the ulHighFrequencyTimerInterrupts value to the string \r
+               /* Write the ulHighFrequencyTimerInterrupts value to the string\r
                buffer.  It will only be displayed if no errors have been detected. */\r
                sprintf( cStringBuffer, "Pass %u", ( unsigned int ) ulHighFrequencyTimerInterrupts );\r
        }\r
 \r
-       /* Send the status message to the LCD task for display on the LCD.  This is \r
+       /* Send the status message to the LCD task for display on the LCD.  This is\r
        a timer callback function, so the queue send function *must not* block. */\r
        xQueueSend( xLCDQueue, &xMessage, mainDONT_BLOCK );\r
-       vParTestToggleLED( mainCHECK_LED );     \r
+       vParTestToggleLED( mainCHECK_LED );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer )\r
+static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer )\r
 {\r
        /* Setup the high frequency, high priority, timer test.  It is setup in this\r
        software timer callback to ensure it does not start before the kernel does.\r
        This is a one shot timer - so the setup routine will only be executed once. */\r
-       vSetupTimerTest( mainTEST_INTERRUPT_FREQUENCY );        \r
+       vSetupTimerTest( mainTEST_INTERRUPT_FREQUENCY );\r
 }\r
 \r