/*\r
- FreeRTOS V7.5.2 - 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
\r
* If a reg test task detects an error it will delete itself, and in so doing\r
* prevent itself from sending any more 'I'm Alive' messages to the check task.\r
*/\r
-static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber );\r
+static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber );\r
\r
/*\r
* The check task is created with access to three memory regions (plus its\r
any MPU region. As such other techniques have to be used to allow the tasks\r
to gain access to the queue. See the comments in the tasks themselves for\r
further information. */\r
-static xQueueHandle xFileScopeCheckQueue = NULL;\r
+static QueueHandle_t xFileScopeCheckQueue = NULL;\r
\r
\r
/*-----------------------------------------------------------*/\r
static portSTACK_TYPE xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainCHECK_TASK_STACK_ALIGNMENT );\r
\r
/* Declare three arrays - an MPU region will be created for each array\r
-using the xTaskParameters structure below. THIS IS JUST TO DEMONSTRATE THE\r
+using the TaskParameters_t structure below. THIS IS JUST TO DEMONSTRATE THE\r
MPU FUNCTIONALITY, the data is not used by the check tasks primary function\r
of monitoring the reg test tasks and printing out status information.\r
\r
#define mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE 128\r
char cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] mainALIGN_TO( mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE );\r
\r
-/* Fill in a xTaskParameters structure to define the check task - this is the\r
+/* Fill in a TaskParameters_t structure to define the check task - this is the\r
structure passed to the xTaskCreateRestricted() function. */\r
-static const xTaskParameters xCheckTaskParameters =\r
+static const TaskParameters_t xCheckTaskParameters =\r
{\r
prvCheckTask, /* pvTaskCode - the function that implements the task. */\r
- ( signed char * ) "Check", /* pcName */\r
+ "Check", /* pcName */\r
mainCHECK_TASK_STACK_SIZE_WORDS, /* usStackDepth - defined in words, not bytes. */\r
( void * ) 0x12121212, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */\r
( tskIDLE_PRIORITY + 1 ) | portPRIVILEGE_BIT,/* uxPriority - this is the highest priority task in the system. The task is created in privileged mode to demonstrate accessing the privileged only data. */\r
static portSTACK_TYPE xRegTest1Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );\r
static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );\r
\r
-/* Fill in a xTaskParameters structure per reg test task to define the tasks. */\r
-static const xTaskParameters xRegTest1Parameters =\r
+/* Fill in a TaskParameters_t structure per reg test task to define the tasks. */\r
+static const TaskParameters_t xRegTest1Parameters =\r
{\r
prvRegTest1Task, /* pvTaskCode - the function that implements the task. */\r
- ( signed char * ) "RegTest1", /* pcName */\r
+ "RegTest1", /* pcName */\r
mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */\r
( void * ) 0x12345678, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */\r
tskIDLE_PRIORITY | portPRIVILEGE_BIT, /* uxPriority - note that this task is created with privileges to demonstrate one method of passing a queue handle into the task. */\r
};\r
/*-----------------------------------------------------------*/\r
\r
-static xTaskParameters xRegTest2Parameters =\r
+static TaskParameters_t xRegTest2Parameters =\r
{\r
prvRegTest2Task, /* pvTaskCode - the function that implements the task. */\r
- ( signed char * ) "RegTest2", /* pcName */\r
+ "RegTest2", /* pcName */\r
mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */\r
( void * ) NULL, /* pvParameters - this task uses the parameter to pass in a queue handle, but the queue is not created yet. */\r
tskIDLE_PRIORITY, /* uxPriority */\r
/* Create the tasks that are created using the original xTaskCreate() API\r
function. */\r
xTaskCreate( prvOldStyleUserModeTask, /* The function that implements the task. */\r
- ( signed char * ) "Task1", /* Text name for the task. */\r
+ "Task1", /* Text name for the task. */\r
100, /* Stack depth in words. */\r
NULL, /* Task parameters. */\r
3, /* Priority and mode (user in this case). */\r
);\r
\r
xTaskCreate( prvOldStylePrivilegedModeTask, /* The function that implements the task. */\r
- ( signed char * ) "Task2", /* Text name for the task. */\r
+ "Task2", /* Text name for the task. */\r
100, /* Stack depth in words. */\r
NULL, /* Task parameters. */\r
( 3 | portPRIVILEGE_BIT ), /* Priority and mode. */\r
queue variable. Take a stack copy of this before the task is set into user\r
mode. Once that task is in user mode the file scope queue variable will no\r
longer be accessible but the stack copy will. */\r
-xQueueHandle xQueue = xFileScopeCheckQueue;\r
+QueueHandle_t xQueue = xFileScopeCheckQueue;\r
long lMessage;\r
unsigned long ulStillAliveCounts[ 2 ] = { 0 };\r
const char *pcStatusMessage = "PASS\r\n";\r
queue variable. Take a stack copy of this before the task is set into user\r
mode. Once this task is in user mode the file scope queue variable will no\r
longer be accessible but the stack copy will. */\r
-xQueueHandle xQueue = xFileScopeCheckQueue;\r
+QueueHandle_t xQueue = xFileScopeCheckQueue;\r
\r
/* Now the queue handle has been obtained the task can switch to user\r
mode. This is just one method of passing a handle into a protected\r
/* The queue handle is passed in as the task parameter. This is one method of\r
passing data into a protected task, the other reg test task uses a different\r
method. */\r
-xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
+QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;\r
\r
for( ;; )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvSendImAlive( xQueueHandle xHandle, unsigned long ulTaskNumber )\r
+static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber )\r
{\r
if( xHandle != NULL )\r
{\r
void vApplicationTickHook( void )\r
{\r
static unsigned long ulCallCount;\r
-const unsigned long ulCallsBetweenSends = 5000 / portTICK_RATE_MS;\r
+const unsigned long ulCallsBetweenSends = 5000 / portTICK_PERIOD_MS;\r
const unsigned long ulMessage = mainPRINT_SYSTEM_STATUS;\r
portBASE_TYPE xDummy;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
{\r
/* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this\r
function will automatically get called if a task overflows its stack. */\r