]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c
Update the demo directory to use the version 8 type naming conventions.
[freertos] / FreeRTOS / Demo / CORTEX_MPU_LPC1768_GCC_RedSuite / src / main.c
index 1d90a74ee88005c707e433f52dcc9a422042c89d..ca299fd3a9b511f199e11855299aff258ae9270d 100644 (file)
@@ -183,7 +183,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
@@ -202,7 +202,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
@@ -222,7 +222,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
@@ -242,9 +242,9 @@ 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
        "Check",                                                                        /* pcName                       */\r
@@ -273,7 +273,7 @@ the MPU regions are replaced with those defined by xAltRegions prior to the
 check task receiving any data on the queue or printing any messages to the\r
 debug console.  The MPU region defined below covers the GPIO peripherals used\r
 to write to the LCD. */\r
-static const xMemoryRegion xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] =\r
+static const MemoryRegion_t xAltRegions[ portNUM_CONFIGURABLE_REGIONS ] =\r
 {\r
        /* Base address                         Length                  Parameters */\r
        { mainGPIO_START_ADDRESS,       ( 64 * 1024 ),  portMPU_REGION_READ_WRITE },\r
@@ -299,8 +299,8 @@ 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
        "RegTest1",                                                             /* pcName                       */\r
@@ -317,7 +317,7 @@ 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
        "RegTest2",                                             /* pcName                       */\r
@@ -388,7 +388,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
 char *pcStatusMessage = "PASS\r\n";\r
@@ -534,7 +534,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
@@ -613,7 +613,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
@@ -846,7 +846,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
@@ -956,7 +956,7 @@ 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
@@ -982,7 +982,7 @@ portBASE_TYPE xDummy;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, 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