]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/sp_flop.c
Ensure demo app files are using FreeRTOS V8 names - a few were missed previously.
[freertos] / FreeRTOS / Demo / Common / Minimal / sp_flop.c
index 993c11d12b8ac3ca639fd7822f0b0b00ee70f513..67e205fe6dc14198184f4641e299f59c35be19ea 100644 (file)
@@ -99,11 +99,11 @@ static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters );
 /* These variables are used to check that all the tasks are still running.  If a \r
 task gets a calculation wrong it will\r
 stop incrementing its check variable. */\r
-static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
+static volatile uint16_t usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( uint16_t ) 0 };\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
-void vStartMathTasks( unsigned portBASE_TYPE uxPriority )\r
+void vStartMathTasks( UBaseType_t uxPriority )\r
 {\r
        xTaskCreate( vCompetingMathTask1, "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL );\r
        xTaskCreate( vCompetingMathTask2, "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL );\r
@@ -119,7 +119,7 @@ void vStartMathTasks( unsigned portBASE_TYPE uxPriority )
 static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )\r
 {\r
 volatile float f1, f2, f3, f4;\r
-volatile unsigned short *pusTaskCheckVariable;\r
+volatile uint16_t *pusTaskCheckVariable;\r
 volatile float fAnswer;\r
 short sError = pdFALSE;\r
 \r
@@ -131,7 +131,7 @@ short sError = pdFALSE;
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
+       pusTaskCheckVariable = ( uint16_t * ) pvParameters;\r
 \r
        /* Keep performing a calculation and checking the result against a constant. */\r
        for(;;)\r
@@ -171,7 +171,7 @@ short sError = pdFALSE;
 static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )\r
 {\r
 volatile float f1, f2, f3, f4;\r
-volatile unsigned short *pusTaskCheckVariable;\r
+volatile uint16_t *pusTaskCheckVariable;\r
 volatile float fAnswer;\r
 short sError = pdFALSE;\r
 \r
@@ -184,7 +184,7 @@ short sError = pdFALSE;
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
+       pusTaskCheckVariable = ( uint16_t * ) pvParameters;\r
 \r
        /* Keep performing a calculation and checking the result against a constant. */\r
        for( ;; )\r
@@ -224,14 +224,14 @@ short sError = pdFALSE;
 static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )\r
 {\r
 volatile float *pfArray, fTotal1, fTotal2, fDifference, fPosition;\r
-volatile unsigned short *pusTaskCheckVariable;\r
+volatile uint16_t *pusTaskCheckVariable;\r
 const size_t xArraySize = 10;\r
 size_t xPosition;\r
 short sError = pdFALSE;\r
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
+       pusTaskCheckVariable = ( uint16_t * ) pvParameters;\r
 \r
        pfArray = ( float * ) pvPortMalloc( xArraySize * sizeof( float ) );\r
 \r
@@ -282,14 +282,14 @@ short sError = pdFALSE;
 static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )\r
 {\r
 volatile float *pfArray, fTotal1, fTotal2, fDifference, fPosition;\r
-volatile unsigned short *pusTaskCheckVariable;\r
+volatile uint16_t *pusTaskCheckVariable;\r
 const size_t xArraySize = 10;\r
 size_t xPosition;\r
 short sError = pdFALSE;\r
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
+       pusTaskCheckVariable = ( uint16_t * ) pvParameters;\r
 \r
        pfArray = ( float * ) pvPortMalloc( xArraySize * sizeof( float ) );\r
 \r
@@ -338,12 +338,12 @@ short sError = pdFALSE;
 /*-----------------------------------------------------------*/\r
 \r
 /* This is called to check that all the created tasks are still running. */\r
-portBASE_TYPE xAreMathsTaskStillRunning( void )\r
+BaseType_t xAreMathsTaskStillRunning( void )\r
 {\r
 /* Keep a history of the check variables so we know if they have been incremented \r
 since the last call. */\r
-static unsigned short usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
-portBASE_TYPE xReturn = pdTRUE, xTask;\r
+static uint16_t usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( uint16_t ) 0 };\r
+BaseType_t xReturn = pdTRUE, xTask;\r
 \r
        /* Check the maths tasks are still running by ensuring their check variables \r
        are still incrementing. */\r