]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c
Update version number to V8.0.0 (without the release candidate number).
[freertos] / FreeRTOS / Demo / CORTEX_MPU_LM3Sxxxx_Rowley / main.c
index 5127ac9c774a779fd79a7868571620e8694a613a..efb233189edc92ae8675a1962fc124b4d588a5b3 100644 (file)
@@ -1,5 +1,6 @@
 /*\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
@@ -175,7 +176,7 @@ static void prvDeleteMe( void ) __attribute__((noinline));
  * 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
@@ -194,7 +195,7 @@ and interrupts.  Note that this is a file scope variable that falls outside of
 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
@@ -213,7 +214,7 @@ stack size is defined in words, not bytes. */
 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
@@ -233,12 +234,12 @@ char cReadOnlyArray[ mainREAD_ONLY_ARRAY_SIZE ] mainALIGN_TO( mainREAD_ONLY_ALIG
 #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
@@ -275,11 +276,11 @@ aligned to ( 128 * 4 ) bytes. */
 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
@@ -293,10 +294,10 @@ static const xTaskParameters xRegTest1Parameters =
 };\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
@@ -333,7 +334,7 @@ int main( void )
        /* 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
@@ -341,7 +342,7 @@ int main( void )
                                );\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
@@ -364,7 +365,7 @@ static void prvCheckTask( void *pvParameters )
 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
@@ -509,7 +510,7 @@ static void prvRegTest1Task( void *pvParameters )
 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
@@ -588,7 +589,7 @@ static void prvRegTest2Task( void *pvParameters )
 /* 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
@@ -827,7 +828,7 @@ static void prvDeleteMe( void )
 }\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
@@ -853,7 +854,7 @@ static void prvSetupHardware( void )
 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
@@ -879,7 +880,7 @@ portBASE_TYPE xDummy;
 }\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