/*\r
- FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ FreeRTOS V8.0.0:rc1 - 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
#include "QueueOverwrite.h"\r
#include "QueueSet.h"\r
#include "recmutex.h"\r
+#include "EventGroupsDemo.h"\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
#define mainCONNECTED_IP_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )\r
#define mainDISCONNECTED_IP_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
\r
-/* UDP command server task parameters. */\r
+/* UDP command server and echo task parameters. */\r
#define mainUDP_CLI_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
#define mainUDP_CLI_PORT_NUMBER ( 5001UL )\r
#define mainUDP_CLI_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2U )\r
+#define mainECHO_CLIENT_STACK_SIZE ( configMINIMAL_STACK_SIZE + 30 )\r
\r
/* Set to 1 to include the UDP echo client tasks in the build. The echo clients\r
require the IP address of the echo server to be defined using the\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
* Creates a set of sample files on a RAM disk. http://www.FreeRTOS.org/fat_sl\r
\r
int main_full( void )\r
{\r
-xTimerHandle xTimer = NULL;\r
+TimerHandle_t xTimer = NULL;\r
\r
/* Usage instructions on http://www.FreeRTOS.org/Atmel_SAM4E_RTOS_Demo.html */\r
\r
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );\r
vStartQueueSetTasks();\r
vStartRecursiveMutexTasks();\r
+ vStartEventGroupTasks();\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
- ( 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
+ 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
if( xTimer != NULL )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
{\r
static long lChangedTimerPeriodAlready = pdFALSE;\r
unsigned long ulErrorOccurred = pdFALSE;\r
{\r
ulErrorOccurred |= ( 0x01UL << 12UL );\r
}\r
+ else if( xAreEventGroupTasksStillRunning() != pdTRUE )\r
+ {\r
+ ulErrorOccurred |= ( 0x01UL << 13UL );\r
+ }\r
\r
if( ulErrorOccurred != pdFALSE )\r
{\r
address of the echo server to be defined using the\r
configECHO_SERVER_ADDR0 to configECHO_SERVER_ADDR3 constants in\r
FreeRTOSConfig.h. */\r
- vStartEchoClientTasks( configMINIMAL_STACK_SIZE, tskIDLE_PRIORITY );\r
+ vStartEchoClientTasks( mainECHO_CLIENT_STACK_SIZE, tskIDLE_PRIORITY );\r
}\r
#endif\r
}\r
for a new connection by lowering the priority of the IP task to that of\r
the Idle task. */\r
vTaskPrioritySet( NULL, tskIDLE_PRIORITY );\r
- \r
+\r
/* Disconnected - so no IP address. */\r
ili93xx_draw_string( ulXCoord, ulYCoord, ( uint8_t * ) "IP: " );\r
}\r
\r
/* Call the periodic queue set ISR test function. */\r
vQueueSetAccessQueueSetFromISR();\r
+ \r
+ /* Call the event group ISR tests. */\r
+ vPeriodicEventGroupsProcessing();\r
}\r
/*-----------------------------------------------------------*/\r
\r