]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/PIC32MZ_MPLAB/main_full.c
Update version number to V8.0.0 (without the release candidate number).
[freertos] / FreeRTOS / Demo / PIC32MZ_MPLAB / main_full.c
index 9820fe807a22c5a09e825ed4501edd3d2cc761cd..9acb3a28bed693efad990ca0df6e3a49726a71cf 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.0.0 - 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
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 #include "QueueOverwrite.h"\r
 #include "QueueSet.h"\r
 #include "recmutex.h"\r
 #include "QueueOverwrite.h"\r
 #include "QueueSet.h"\r
 #include "recmutex.h"\r
+#include "EventGroupsDemo.h"\r
 \r
 /*-----------------------------------------------------------*/\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
 \r
 /*-----------------------------------------------------------*/\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
 \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
 \r
 /* The priorities of the various demo application tasks. */\r
 #define mainSEM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 1 )\r
@@ -180,7 +181,7 @@ occur. */
 /*\r
  * The check timer callback function, as described at the top of this file.\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
 \r
 /*\r
  * It is important to ensure the high frequency timer test does not start before\r
@@ -189,7 +190,7 @@ 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
  * 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
 \r
 /*\r
  * Tasks that test the context switch mechanism by filling the processor\r
@@ -221,7 +222,7 @@ volatile unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0;
  */\r
 int main_full( void )\r
 {\r
  */\r
 int main_full( void )\r
 {\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
 \r
        /* Create all the other standard demo tasks. */\r
        vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS );\r
 \r
        /* Create all the other standard demo tasks. */\r
        vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS );\r
@@ -236,6 +237,7 @@ xTimerHandle xTimer = NULL;
        vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );\r
        vStartQueueSetTasks();\r
        vStartRecursiveMutexTasks();\r
        vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );\r
        vStartQueueSetTasks();\r
        vStartRecursiveMutexTasks();\r
+       vStartEventGroupTasks();\r
 \r
        /* Create the tasks defined within this file. */\r
        xTaskCreate( prvRegTestTask1,                   /* The function that implements the task. */\r
 \r
        /* Create the tasks defined within this file. */\r
        xTaskCreate( prvRegTestTask1,                   /* The function that implements the task. */\r
@@ -313,7 +315,7 @@ extern void vRegTest2( volatile unsigned long * );
 }\r
 /*-----------------------------------------------------------*/\r
 \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, ulLastHighFrequencyTimerInterrupts = 0;\r
 {\r
 static long lChangedTimerPeriodAlready = pdFALSE;\r
 static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0, ulLastHighFrequencyTimerInterrupts = 0;\r
@@ -383,13 +385,17 @@ extern unsigned long ulHighFrequencyTimerInterrupts;
        {\r
                ulErrorOccurred |= ( 0x01UL << 12UL );\r
        }\r
        {\r
                ulErrorOccurred |= ( 0x01UL << 12UL );\r
        }\r
+       else if( xAreEventGroupTasksStillRunning() != pdTRUE )\r
+       {\r
+               ulErrorOccurred |= ( 0x01UL << 13UL );\r
+       }\r
 \r
        /* Ensure the expected number of high frequency interrupts have occurred. */\r
        if( ulLastHighFrequencyTimerInterrupts != 0 )\r
        {\r
                if( ( ulHighFrequencyTimerInterrupts - ulLastHighFrequencyTimerInterrupts ) < ulExpectedHighFrequencyInterrupts )\r
                {\r
 \r
        /* Ensure the expected number of high frequency interrupts have occurred. */\r
        if( ulLastHighFrequencyTimerInterrupts != 0 )\r
        {\r
                if( ( ulHighFrequencyTimerInterrupts - ulLastHighFrequencyTimerInterrupts ) < ulExpectedHighFrequencyInterrupts )\r
                {\r
-                       ulErrorOccurred |= ( 0x01UL << 13UL );\r
+                       ulErrorOccurred |= ( 0x01UL << 14UL );\r
                }\r
        }\r
        ulLastHighFrequencyTimerInterrupts = ulHighFrequencyTimerInterrupts;\r
                }\r
        }\r
        ulLastHighFrequencyTimerInterrupts = ulHighFrequencyTimerInterrupts;\r
@@ -415,7 +421,7 @@ extern unsigned long ulHighFrequencyTimerInterrupts;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvSetupHighFrequencyTimerTest( xTimerHandle xTimer )\r
+static void prvSetupHighFrequencyTimerTest( TimerHandle_t xTimer )\r
 {\r
 void vSetupTimerTest( unsigned short usFrequencyHz );\r
 \r
 {\r
 void vSetupTimerTest( unsigned short usFrequencyHz );\r
 \r