]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
Update version number to 8.1.1 for patch release that re-enables mutexes to be given...
[freertos] / FreeRTOS / Demo / CORTEX_LM3Sxxxx_IAR_Keil / main.c
index cabc1763eeb8e609cb495a1dcf20a01ae3371f6e..07ca8b8f1305536b1798b8426f17382016c637d6 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.1.1 - 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
     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
@@ -150,12 +150,13 @@ and the TCP/IP stack together cannot be accommodated with the 32K size limit. */
 #include "recmutex.h"\r
 #include "IntQueue.h"\r
 #include "QueueSet.h"\r
+#include "EventGroupsDemo.h"\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 /* The time between cycles of the 'check' functionality (defined within the\r
 tick hook. */\r
-#define mainCHECK_DELAY                                                ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
+#define mainCHECK_DELAY                                                ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
 \r
 /* Size of the stack allocated to the uIP task. */\r
 #define mainBASIC_WEB_STACK_SIZE            ( configMINIMAL_STACK_SIZE * 3 )\r
@@ -221,14 +222,14 @@ extern void vSetupHighFrequencyTimer( void );
 /*\r
  * Hook functions that can get called by the kernel.\r
  */\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName );\r
 void vApplicationTickHook( void );\r
 \r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 /* The queue used to send messages to the OLED task. */\r
-xQueueHandle xOLEDQueue;\r
+QueueHandle_t xOLEDQueue;\r
 \r
 /* The welcome text. */\r
 const char * const pcWelcomeMessage = "   www.FreeRTOS.org";\r
@@ -260,6 +261,7 @@ int main( void )
        vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
        vStartQueuePeekTasks();\r
        vStartQueueSetTasks();\r
+       vStartEventGroupTasks();\r
 \r
        /* Exclude some tasks if using the kickstart version to ensure we stay within\r
        the 32K code size limit. */\r
@@ -378,6 +380,10 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
                {\r
                        xMessage.pcMessage = "ERROR IN Q SET";\r
                }\r
+               else if( xAreEventGroupTasksStillRunning() != pdTRUE )\r
+               {\r
+                       xMessage.pcMessage = "ERROR IN EVNT GRP";\r
+               }\r
 \r
                configASSERT( strcmp( ( const char * ) xMessage.pcMessage, "PASS" ) == 0 );\r
 \r
@@ -389,6 +395,9 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
        /* Write to a queue that is in use as part of the queue set demo to\r
        demonstrate using queue sets from an ISR. */\r
        vQueueSetAccessQueueSetFromISR();\r
+\r
+       /* Call the event group ISR tests. */\r
+       vPeriodicEventGroupsProcessing();\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -468,7 +477,7 @@ void ( *vOLEDClear )( void ) = NULL;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
 {\r
        ( void ) pxTask;\r
        ( void ) pcTaskName;\r