/*\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 "IntQueue.h"\r
#include "IntQueueTimer.h"\r
\r
+#if( INCLUDE_eTaskGetState != 1 )\r
+ #error INCLUDE_eTaskGetState must be set to 1 in FreeRTOSConfig.h to use this demo file.\r
+#endif\r
+\r
/* Priorities used by test tasks. */\r
#ifndef intqHIGHER_PRIORITY\r
#define intqHIGHER_PRIORITY ( configMAX_PRIORITIES - 2 )\r
/*-----------------------------------------------------------*/\r
\r
/* The two queues used by the test. */\r
-static xQueueHandle xNormallyEmptyQueue, xNormallyFullQueue;\r
+static QueueHandle_t xNormallyEmptyQueue, xNormallyFullQueue;\r
\r
/* Variables used to detect a stall in one of the tasks. */\r
static unsigned portBASE_TYPE uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0, uxLowPriorityLoops1 = 0, uxLowPriorityLoops2 = 0;\r
volatile unsigned portBASE_TYPE uxValueForNormallyEmptyQueue = 0, uxValueForNormallyFullQueue = 0;\r
\r
/* A handle to some of the tasks is required so they can be suspended/resumed. */\r
-xTaskHandle xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2;\r
+TaskHandle_t xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2;\r
\r
/* When a value is received in a queue the value is ticked off in the array\r
the array position of the value is set to a the identifier of the task or\r
interrupt that accessed the queue. This way missing or duplicate values can be\r
detected. */\r
-static unsigned portCHAR ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
-static unsigned portCHAR ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static unsigned char ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static unsigned char ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
\r
/* The test tasks themselves. */\r
static void prvLowerPriorityNormallyEmptyTask( void *pvParameters );\r
{\r
if( xQueueReceive( xNormallyEmptyQueue, &uxRxed, intqONE_TICK_DELAY ) != errQUEUE_EMPTY )\r
{\r
- /* We should only obtain a value when the high priority task is\r
+ /* A value should only be obtained when the high priority task is\r
suspended. */\r
- if( xTaskIsTaskSuspended( xHighPriorityNormallyEmptyTask1 ) == pdFALSE )\r
+ if( eTaskGetState( xHighPriorityNormallyEmptyTask1 ) != eSuspended )\r
{\r
prvQueueAccessLogError( __LINE__ );\r
}\r
{\r
if( xQueueSend( xNormallyFullQueue, &uxTxed, intqONE_TICK_DELAY ) != errQUEUE_FULL )\r
{\r
- /* We would only expect to succeed when the higher priority task\r
- is suspended. */\r
- if( xTaskIsTaskSuspended( xHighPriorityNormallyFullTask1 ) == pdFALSE )\r
+ /* Should only succeed when the higher priority task is suspended */\r
+ if( eTaskGetState( xHighPriorityNormallyFullTask1 ) != eSuspended )\r
{\r
prvQueueAccessLogError( __LINE__ );\r
}\r