]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/IntQueue.c
Update version number ready for V8.2.1 release.
[freertos] / FreeRTOS / Demo / Common / Minimal / IntQueue.c
index a0d5881040d1aeb658db776af4ad37bd9759823e..9a0c82ffc3aa5ba2d352ae6570c0db1a65e0dde5 100644 (file)
@@ -1,60 +1,64 @@
 /*\r
-    FreeRTOS V8.0.0:rc1 - Copyright (C) 2014 Real Time Engineers Ltd. \r
+    FreeRTOS V8.2.1 - Copyright (C) 2015 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
-    ***************************************************************************\r
-     *                                                                       *\r
-     *    FreeRTOS provides completely free yet professionally developed,    *\r
-     *    robust, strictly quality controlled, supported, and cross          *\r
-     *    platform software that has become a de facto standard.             *\r
-     *                                                                       *\r
-     *    Help yourself get started quickly and support the FreeRTOS         *\r
-     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
-     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
-     *                                                                       *\r
-     *    Thank you!                                                         *\r
-     *                                                                       *\r
-    ***************************************************************************\r
-\r
     This file is part of the FreeRTOS distribution.\r
 \r
     FreeRTOS is free software; you can redistribute it and/or modify it under\r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+    ***************************************************************************\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
-    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
     link: http://www.freertos.org/a00114.html\r
 \r
-    1 tab == 4 spaces!\r
-\r
     ***************************************************************************\r
      *                                                                       *\r
-     *    Having a problem?  Start by reading the FAQ "My application does   *\r
-     *    not run, what could be wrong?"                                     *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
      *                                                                       *\r
-     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
      *                                                                       *\r
     ***************************************************************************\r
 \r
-    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
-    license and Real Time Engineers Ltd. contact details.\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+    the FAQ page "My application does not run, what could be wrong?".  Have you\r
+    defined configASSERT()?\r
+\r
+    http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+    embedded software for free we request you assist our global community by\r
+    participating in the support forum.\r
+\r
+    http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+    be as productive as possible as early as possible.  Now you can receive\r
+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+    Ltd, and the world's leading authority on the world's leading RTOS.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
 \r
-    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
-    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
-    licenses offer ticketed support, indemnification and middleware.\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
 \r
     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
     engineered and independently SIL3 certified version for use in safety and\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
@@ -115,12 +123,12 @@ coverage. */
 /* Each task and interrupt is given a unique identifier.  This value is used to\r
 identify which task sent or received each value.  The identifier is also used\r
 to distinguish between two tasks that are running the same task function. */\r
-#define intqHIGH_PRIORITY_TASK1        ( ( unsigned portBASE_TYPE ) 1 )\r
-#define intqHIGH_PRIORITY_TASK2        ( ( unsigned portBASE_TYPE ) 2 )\r
-#define intqLOW_PRIORITY_TASK  ( ( unsigned portBASE_TYPE ) 3 )\r
-#define intqFIRST_INTERRUPT            ( ( unsigned portBASE_TYPE ) 4 )\r
-#define intqSECOND_INTERRUPT   ( ( unsigned portBASE_TYPE ) 5 )\r
-#define intqQUEUE_LENGTH               ( ( unsigned portBASE_TYPE ) 10 )\r
+#define intqHIGH_PRIORITY_TASK1        ( ( UBaseType_t ) 1 )\r
+#define intqHIGH_PRIORITY_TASK2        ( ( UBaseType_t ) 2 )\r
+#define intqLOW_PRIORITY_TASK  ( ( UBaseType_t ) 3 )\r
+#define intqFIRST_INTERRUPT            ( ( UBaseType_t ) 4 )\r
+#define intqSECOND_INTERRUPT   ( ( UBaseType_t ) 5 )\r
+#define intqQUEUE_LENGTH               ( ( UBaseType_t ) 10 )\r
 \r
 /* At least intqMIN_ACCEPTABLE_TASK_COUNT values should be sent to/received\r
 from each queue by each task, otherwise an error is detected. */\r
@@ -131,11 +139,14 @@ from within the interrupts. */
 #define timerNORMALLY_EMPTY_TX()                                                                                                                                                                                       \\r
        if( xQueueIsQueueFullFromISR( xNormallyEmptyQueue ) != pdTRUE )                                                                                                                 \\r
        {                                                                                                                                                                                                                                               \\r
-       unsigned portBASE_TYPE uxSavedInterruptStatus;                                                                                                                                                  \\r
+       UBaseType_t uxSavedInterruptStatus;                                                                                                                                                                             \\r
                uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();                                                                                                                     \\r
                {                                                                                                                                                                                                                                       \\r
                        uxValueForNormallyEmptyQueue++;                                                                                                                                                                 \\r
-                       xQueueSendFromISR( xNormallyEmptyQueue, ( void * ) &uxValueForNormallyEmptyQueue, &xHigherPriorityTaskWoken );  \\r
+                       if( xQueueSendFromISR( xNormallyEmptyQueue, ( void * ) &uxValueForNormallyEmptyQueue, &xHigherPriorityTaskWoken ) != pdPASS ) \\r
+                       {                                                                                                                                                                                                                               \\r
+                               uxValueForNormallyEmptyQueue--;                                                                                                                                                         \\r
+                       }                                                                                                                                                                                                                               \\r
                }                                                                                                                                                                                                                                       \\r
                portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );                                                                                                            \\r
        }                                                                                                                                                                                                                                               \\r
@@ -145,11 +156,14 @@ from within the interrupts. */
 #define timerNORMALLY_FULL_TX()                                                                                                                                                                                                \\r
        if( xQueueIsQueueFullFromISR( xNormallyFullQueue ) != pdTRUE )                                                                                                                  \\r
        {                                                                                                                                                                                                                                               \\r
-       unsigned portBASE_TYPE uxSavedInterruptStatus;                                                                                                                                                  \\r
+       UBaseType_t uxSavedInterruptStatus;                                                                                                                                                                             \\r
                uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();                                                                                                                     \\r
                {                                                                                                                                                                                                                                       \\r
                        uxValueForNormallyFullQueue++;                                                                                                                                                                  \\r
-                       xQueueSendFromISR( xNormallyFullQueue, ( void * ) &uxValueForNormallyFullQueue, &xHigherPriorityTaskWoken );    \\r
+                       if( xQueueSendFromISR( xNormallyFullQueue, ( void * ) &uxValueForNormallyFullQueue, &xHigherPriorityTaskWoken ) != pdPASS ) \\r
+                       {                                                                                                                                                                                                                               \\r
+                               uxValueForNormallyFullQueue--;                                                                                                                                                          \\r
+                       }                                                                                                                                                                                                                               \\r
                }                                                                                                                                                                                                                                       \\r
                portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );                                                                                                            \\r
        }                                                                                                                                                                                                                                               \\r
@@ -178,32 +192,32 @@ an interrupt. */
 /*-----------------------------------------------------------*/\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
+static UBaseType_t uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0, uxLowPriorityLoops1 = 0, uxLowPriorityLoops2 = 0;\r
 \r
 /* Any unexpected behaviour sets xErrorStatus to fail and log the line that\r
 caused the error in xErrorLine. */\r
-static portBASE_TYPE xErrorStatus = pdPASS;\r
-static volatile unsigned portBASE_TYPE xErrorLine = ( unsigned portBASE_TYPE ) 0;\r
+static BaseType_t xErrorStatus = pdPASS;\r
+static volatile UBaseType_t xErrorLine = ( UBaseType_t ) 0;\r
 \r
 /* Used for sequencing between tasks. */\r
-static portBASE_TYPE xWasSuspended = pdFALSE;\r
+static BaseType_t xWasSuspended = pdFALSE;\r
 \r
 /* The values that are sent to the queues.  An incremented value is sent each\r
 time to each queue. */\r
-volatile unsigned portBASE_TYPE uxValueForNormallyEmptyQueue = 0, uxValueForNormallyFullQueue = 0;\r
+volatile UBaseType_t 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 char ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
-static unsigned char ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static uint8_t ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static uint8_t ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
 \r
 /* The test tasks themselves. */\r
 static void prvLowerPriorityNormallyEmptyTask( void *pvParameters );\r
@@ -214,11 +228,11 @@ static void prv2ndHigherPriorityNormallyFullTask( void *pvParameters );
 \r
 /* Used to mark the positions within the ucNormallyEmptyReceivedValues and\r
 ucNormallyFullReceivedValues arrays, while checking for duplicates. */\r
-static void prvRecordValue_NormallyEmpty( unsigned portBASE_TYPE uxValue, unsigned portBASE_TYPE uxSource );\r
-static void prvRecordValue_NormallyFull( unsigned portBASE_TYPE uxValue, unsigned portBASE_TYPE uxSource );\r
+static void prvRecordValue_NormallyEmpty( UBaseType_t uxValue, UBaseType_t uxSource );\r
+static void prvRecordValue_NormallyFull( UBaseType_t uxValue, UBaseType_t uxSource );\r
 \r
 /* Logs the line on which an error occurred. */\r
-static void prvQueueAccessLogError( unsigned portBASE_TYPE uxLine );\r
+static void prvQueueAccessLogError( UBaseType_t uxLine );\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -234,8 +248,8 @@ void vStartInterruptQueueTasks( void )
 \r
        /* Create the queues that are accessed by multiple tasks and multiple\r
        interrupts. */\r
-       xNormallyFullQueue = xQueueCreate( intqQUEUE_LENGTH, ( unsigned portBASE_TYPE ) sizeof( unsigned portBASE_TYPE ) );\r
-       xNormallyEmptyQueue = xQueueCreate( intqQUEUE_LENGTH, ( unsigned portBASE_TYPE ) sizeof( unsigned portBASE_TYPE ) );\r
+       xNormallyFullQueue = xQueueCreate( intqQUEUE_LENGTH, ( UBaseType_t ) sizeof( UBaseType_t ) );\r
+       xNormallyEmptyQueue = xQueueCreate( intqQUEUE_LENGTH, ( UBaseType_t ) sizeof( UBaseType_t ) );\r
 \r
        /* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
        in use.  The queue registry is provided as a means for kernel aware\r
@@ -248,7 +262,7 @@ void vStartInterruptQueueTasks( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvRecordValue_NormallyFull( unsigned portBASE_TYPE uxValue, unsigned portBASE_TYPE uxSource )\r
+static void prvRecordValue_NormallyFull( UBaseType_t uxValue, UBaseType_t uxSource )\r
 {\r
        if( uxValue < intqNUM_VALUES_TO_LOG )\r
        {\r
@@ -260,12 +274,12 @@ static void prvRecordValue_NormallyFull( unsigned portBASE_TYPE uxValue, unsigne
                }\r
 \r
                /* Log that this value has been received. */\r
-               ucNormallyFullReceivedValues[ uxValue ] = uxSource;\r
+               ucNormallyFullReceivedValues[ uxValue ] = ( uint8_t ) uxSource;\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvRecordValue_NormallyEmpty( unsigned portBASE_TYPE uxValue, unsigned portBASE_TYPE uxSource )\r
+static void prvRecordValue_NormallyEmpty( UBaseType_t uxValue, UBaseType_t uxSource )\r
 {\r
        if( uxValue < intqNUM_VALUES_TO_LOG )\r
        {\r
@@ -277,12 +291,12 @@ static void prvRecordValue_NormallyEmpty( unsigned portBASE_TYPE uxValue, unsign
                }\r
 \r
                /* Log that this value has been received. */\r
-               ucNormallyEmptyReceivedValues[ uxValue ] = uxSource;\r
+               ucNormallyEmptyReceivedValues[ uxValue ] = ( uint8_t ) uxSource;\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvQueueAccessLogError( unsigned portBASE_TYPE uxLine )\r
+static void prvQueueAccessLogError( UBaseType_t uxLine )\r
 {\r
        /* Latch the line number that caused the error. */\r
        xErrorLine = uxLine;\r
@@ -292,12 +306,12 @@ static void prvQueueAccessLogError( unsigned portBASE_TYPE uxLine )
 \r
 static void prvHigherPriorityNormallyEmptyTask( void *pvParameters )\r
 {\r
-unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxInterrupts, uxErrorCount1 = 0, uxErrorCount2 = 0;\r
+UBaseType_t uxRxed, ux, uxTask1, uxTask2, uxInterrupts, uxErrorCount1 = 0, uxErrorCount2 = 0;\r
 \r
        /* The timer should not be started until after the scheduler has started.\r
        More than one task is running this code so we check the parameter value\r
        to determine which task should start the timer. */\r
-       if( ( unsigned portBASE_TYPE ) pvParameters == intqHIGH_PRIORITY_TASK1 )\r
+       if( ( UBaseType_t ) pvParameters == intqHIGH_PRIORITY_TASK1 )\r
        {\r
                vInitialiseTimerForIntQueueTest();\r
        }\r
@@ -314,13 +328,13 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxInterrupts, uxErrorCount1
                {\r
                        /* Note which value was received so we can check all expected\r
                        values are received and no values are duplicated. */\r
-                       prvRecordValue_NormallyEmpty( uxRxed, ( unsigned portBASE_TYPE ) pvParameters );\r
+                       prvRecordValue_NormallyEmpty( uxRxed, ( UBaseType_t ) pvParameters );\r
                }\r
 \r
                /* Ensure the other task running this code gets a chance to execute. */\r
                taskYIELD();\r
 \r
-               if( ( unsigned portBASE_TYPE ) pvParameters == intqHIGH_PRIORITY_TASK1 )\r
+               if( ( UBaseType_t ) pvParameters == intqHIGH_PRIORITY_TASK1 )\r
                {\r
                        /* Have we received all the expected values? */\r
                        if( uxValueForNormallyEmptyQueue > ( intqNUM_VALUES_TO_LOG + intqVALUE_OVERRUN ) )\r
@@ -415,7 +429,7 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxInterrupts, uxErrorCount1
 \r
 static void prvLowerPriorityNormallyEmptyTask( void *pvParameters )\r
 {\r
-unsigned portBASE_TYPE uxValue, uxRxed;\r
+UBaseType_t uxValue, uxRxed;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -424,9 +438,9 @@ unsigned portBASE_TYPE uxValue, uxRxed;
        {\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
@@ -463,7 +477,7 @@ unsigned portBASE_TYPE uxValue, uxRxed;
 \r
 static void prv1stHigherPriorityNormallyFullTask( void *pvParameters )\r
 {\r
-unsigned portBASE_TYPE uxValueToTx, ux, uxInterrupts;\r
+UBaseType_t uxValueToTx, ux, uxInterrupts;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -566,7 +580,7 @@ unsigned portBASE_TYPE uxValueToTx, ux, uxInterrupts;
 \r
 static void prv2ndHigherPriorityNormallyFullTask( void *pvParameters )\r
 {\r
-unsigned portBASE_TYPE uxValueToTx, ux;\r
+UBaseType_t uxValueToTx, ux;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -612,7 +626,7 @@ unsigned portBASE_TYPE uxValueToTx, ux;
 \r
 static void prvLowerPriorityNormallyFullTask( void *pvParameters )\r
 {\r
-unsigned portBASE_TYPE uxValue, uxTxed = 9999;\r
+UBaseType_t uxValue, uxTxed = 9999;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -621,9 +635,8 @@ unsigned portBASE_TYPE uxValue, uxTxed = 9999;
        {\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
@@ -652,17 +665,18 @@ unsigned portBASE_TYPE uxValue, uxTxed = 9999;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-portBASE_TYPE xFirstTimerHandler( void )\r
+BaseType_t xFirstTimerHandler( void )\r
 {\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, uxRxedValue;\r
-static unsigned portBASE_TYPE uxNextOperation = 0;\r
+BaseType_t xHigherPriorityTaskWoken = pdFALSE;\r
+UBaseType_t uxRxedValue;\r
+static UBaseType_t uxNextOperation = 0;\r
 \r
        /* Called from a timer interrupt.  Perform various read and write\r
        accesses on the queues. */\r
 \r
        uxNextOperation++;\r
 \r
-       if( uxNextOperation & ( unsigned portBASE_TYPE ) 0x01 )\r
+       if( uxNextOperation & ( UBaseType_t ) 0x01 )\r
        {\r
                timerNORMALLY_EMPTY_TX();\r
                timerNORMALLY_EMPTY_TX();\r
@@ -679,18 +693,18 @@ static unsigned portBASE_TYPE uxNextOperation = 0;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-portBASE_TYPE xSecondTimerHandler( void )\r
+BaseType_t xSecondTimerHandler( void )\r
 {\r
-unsigned portBASE_TYPE uxRxedValue;\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-static unsigned portBASE_TYPE uxNextOperation = 0;\r
+UBaseType_t uxRxedValue;\r
+BaseType_t xHigherPriorityTaskWoken = pdFALSE;\r
+static UBaseType_t uxNextOperation = 0;\r
 \r
        /* Called from a timer interrupt.  Perform various read and write\r
        accesses on the queues. */\r
 \r
        uxNextOperation++;\r
 \r
-       if( uxNextOperation & ( unsigned portBASE_TYPE ) 0x01 )\r
+       if( uxNextOperation & ( UBaseType_t ) 0x01 )\r
        {\r
                timerNORMALLY_EMPTY_TX();\r
                timerNORMALLY_EMPTY_TX();\r
@@ -712,9 +726,9 @@ static unsigned portBASE_TYPE uxNextOperation = 0;
 /*-----------------------------------------------------------*/\r
 \r
 \r
-portBASE_TYPE xAreIntQueueTasksStillRunning( void )\r
+BaseType_t xAreIntQueueTasksStillRunning( void )\r
 {\r
-static unsigned portBASE_TYPE uxLastHighPriorityLoops1 = 0, uxLastHighPriorityLoops2 = 0, uxLastLowPriorityLoops1 = 0, uxLastLowPriorityLoops2 = 0;\r
+static UBaseType_t uxLastHighPriorityLoops1 = 0, uxLastHighPriorityLoops2 = 0, uxLastLowPriorityLoops1 = 0, uxLastLowPriorityLoops2 = 0;\r
 \r
        /* xErrorStatus can be set outside of this function.  This function just\r
        checks that all the tasks are still cycling. */\r