/*\r
- FreeRTOS V7.5.1 - 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
#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
\r
/* The period of the system clock in nano seconds. This is used to calculate\r
the jitter time in nano seconds. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Constants used when writing strings to the display. */\r
#define mainCHARACTER_HEIGHT ( 9 )\r
/*\r
* Hook functions that can get called by the kernel.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *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 portCHAR * const pcWelcomeMessage = " www.FreeRTOS.org";\r
+const char * const pcWelcomeMessage = " www.FreeRTOS.org";\r
\r
/*-----------------------------------------------------------*/\r
\r
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
PHY. */\r
if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) )\r
{\r
- xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );\r
+ xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );\r
}\r
}\r
#endif\r
\r
\r
/* Start the tasks defined within this file/specific to this demo. */\r
- xTaskCreate( vOLEDTask, ( signed portCHAR * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( vOLEDTask, "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
\r
/* The suicide tasks must be created last as they need to know how many\r
tasks were running prior to their creation in order to ascertain whether\r
void vApplicationTickHook( void )\r
{\r
static xOLEDMessage xMessage = { "PASS" };\r
-static unsigned portLONG ulTicksSinceLastDisplay = 0;\r
+static unsigned long ulTicksSinceLastDisplay = 0;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Called from every tick interrupt. Have enough ticks passed to make it\r
{\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
/* 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
void vOLEDTask( void *pvParameters )\r
{\r
xOLEDMessage xMessage;\r
-unsigned portLONG ulY, ulMaxY;\r
-static portCHAR cMessage[ mainMAX_MSG_LEN ];\r
-extern volatile unsigned portLONG ulMaxJitter;\r
-const unsigned portCHAR *pucImage;\r
+unsigned long ulY, ulMaxY;\r
+static char cMessage[ mainMAX_MSG_LEN ];\r
+extern volatile unsigned long ulMaxJitter;\r
+const unsigned char *pucImage;\r
\r
/* Functions to access the OLED. The one used depends on the dev kit\r
being used. */\r
-void ( *vOLEDInit )( unsigned portLONG ) = NULL;\r
-void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portCHAR ) = NULL;\r
-void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG ) = NULL;\r
+void ( *vOLEDInit )( unsigned long ) = NULL;\r
+void ( *vOLEDStringDraw )( const char *, unsigned long, unsigned long, unsigned char ) = NULL;\r
+void ( *vOLEDImageDraw )( const unsigned char *, unsigned long, unsigned long, unsigned long, unsigned long ) = NULL;\r
void ( *vOLEDClear )( void ) = NULL;\r
\r
/* Map the OLED access functions to the driver functions that are appropriate\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
{\r
( void ) pxTask;\r
( void ) pcTaskName;\r