Cosmetic work towards MISRA compliance statement pre release of V7.

pull/1/head
Richard Barry 14 years ago
parent a1842621eb
commit 37de268af4

@ -173,8 +173,7 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
#endif #endif
#if configMAX_TASK_NAME_LEN < 1 #if configMAX_TASK_NAME_LEN < 1
#undef configMAX_TASK_NAME_LEN #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
#define configMAX_TASK_NAME_LEN 1
#endif #endif
#ifndef INCLUDE_xTaskResumeFromISR #ifndef INCLUDE_xTaskResumeFromISR
@ -188,9 +187,6 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
/* The timers module relies on xTaskGetSchedulerState(). */ /* The timers module relies on xTaskGetSchedulerState(). */
#if configUSE_TIMERS == 1 #if configUSE_TIMERS == 1
#undef INCLUDE_xTaskGetSchedulerState
#define INCLUDE_xTaskGetSchedulerState 1
#ifndef configTIMER_TASK_PRIORITY #ifndef configTIMER_TASK_PRIORITY
#error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined. #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
#endif /* configTIMER_TASK_PRIORITY */ #endif /* configTIMER_TASK_PRIORITY */
@ -209,16 +205,9 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
#define INCLUDE_xTaskGetSchedulerState 0 #define INCLUDE_xTaskGetSchedulerState 0
#endif #endif
#if ( configUSE_MUTEXES == 1 )
/* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism
within the mutex implementation so must be available if mutexes are used. */
#undef INCLUDE_xTaskGetCurrentTaskHandle
#define INCLUDE_xTaskGetCurrentTaskHandle 1
#else
#ifndef INCLUDE_xTaskGetCurrentTaskHandle #ifndef INCLUDE_xTaskGetCurrentTaskHandle
#define INCLUDE_xTaskGetCurrentTaskHandle 0 #define INCLUDE_xTaskGetCurrentTaskHandle 0
#endif #endif
#endif
#ifndef portSET_INTERRUPT_MASK_FROM_ISR #ifndef portSET_INTERRUPT_MASK_FROM_ISR
@ -231,11 +220,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
#ifndef configQUEUE_REGISTRY_SIZE #ifndef configQUEUE_REGISTRY_SIZE
#define configQUEUE_REGISTRY_SIZE 0 #define configQUEUE_REGISTRY_SIZE 0U
#endif #endif
#if configQUEUE_REGISTRY_SIZE < 1 #if ( configQUEUE_REGISTRY_SIZE < 1U )
#define configQUEUE_REGISTRY_SIZE 0
#define vQueueAddToRegistry( xQueue, pcName ) #define vQueueAddToRegistry( xQueue, pcName )
#define vQueueUnregisterQueue( xQueue ) #define vQueueUnregisterQueue( xQueue )
#endif #endif

@ -406,7 +406,7 @@ void vCoRoutineSchedule( void );
#define crQUEUE_SEND( xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult ) \ #define crQUEUE_SEND( xHandle, pxQueue, pvItemToQueue, xTicksToWait, pxResult ) \
{ \ { \
*( pxResult ) = xQueueCRSend( ( pxQueue) , ( pvItemToQueue) , ( xTicksToWait ) ); \ *( pxResult ) = xQueueCRSend( ( pxQueue) , ( pvItemToQueue) , ( xTicksToWait ) ); \
if( *pxResult == errQUEUE_BLOCKED ) \ if( *( pxResult ) == errQUEUE_BLOCKED ) \
{ \ { \
crSET_STATE0( ( xHandle ) ); \ crSET_STATE0( ( xHandle ) ); \
*pxResult = xQueueCRSend( ( pxQueue ), ( pvItemToQueue ), 0 ); \ *pxResult = xQueueCRSend( ( pxQueue ), ( pvItemToQueue ), 0 ); \

@ -51,16 +51,14 @@
licensing and training services. licensing and training services.
*/ */
#ifndef INC_FREERTOS_H
#error "#include FreeRTOS.h" must appear in source files before "#include queue.h"
#endif
#ifndef QUEUE_H #ifndef QUEUE_H
#define QUEUE_H #define QUEUE_H
#ifndef INC_FREERTOS_H
#error "#include FreeRTOS.h" must appear in source files before "#include queue.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -219,7 +217,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
* \defgroup xQueueSend xQueueSend * \defgroup xQueueSend xQueueSend
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueueSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( xQueue, pvItemToQueue, xTicksToWait, queueSEND_TO_FRONT ) #define xQueueSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
/** /**
* queue. h * queue. h
@ -301,7 +299,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
* \defgroup xQueueSend xQueueSend * \defgroup xQueueSend xQueueSend
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( xQueue, pvItemToQueue, xTicksToWait, queueSEND_TO_BACK ) #define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
/** /**
* queue. h * queue. h
@ -385,7 +383,7 @@ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBA
* \defgroup xQueueSend xQueueSend * \defgroup xQueueSend xQueueSend
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueueSend( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( xQueue, pvItemToQueue, xTicksToWait, queueSEND_TO_BACK ) #define xQueueSend( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
/** /**
@ -567,7 +565,7 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle pxQueue, const void * const
* \defgroup xQueueReceive xQueueReceive * \defgroup xQueueReceive xQueueReceive
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueuePeek( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( xQueue, pvBuffer, xTicksToWait, pdTRUE ) #define xQueuePeek( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
/** /**
* queue. h * queue. h
@ -660,7 +658,7 @@ signed portBASE_TYPE xQueueGenericSend( xQueueHandle pxQueue, const void * const
* \defgroup xQueueReceive xQueueReceive * \defgroup xQueueReceive xQueueReceive
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueueReceive( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( xQueue, pvBuffer, xTicksToWait, pdFALSE ) #define xQueueReceive( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
/** /**
@ -858,7 +856,7 @@ void vQueueDelete( xQueueHandle pxQueue );
* \defgroup xQueueSendFromISR xQueueSendFromISR * \defgroup xQueueSendFromISR xQueueSendFromISR
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueueSendToFrontFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken, queueSEND_TO_FRONT ) #define xQueueSendToFrontFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )
/** /**
@ -929,7 +927,7 @@ void vQueueDelete( xQueueHandle pxQueue );
* \defgroup xQueueSendFromISR xQueueSendFromISR * \defgroup xQueueSendFromISR xQueueSendFromISR
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueueSendToBackFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken, queueSEND_TO_BACK ) #define xQueueSendToBackFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
/** /**
* queue. h * queue. h
@ -1003,7 +1001,7 @@ void vQueueDelete( xQueueHandle pxQueue );
* \defgroup xQueueSendFromISR xQueueSendFromISR * \defgroup xQueueSendFromISR xQueueSendFromISR
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
#define xQueueSendFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken, queueSEND_TO_BACK ) #define xQueueSendFromISR( pxQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( pxQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
/** /**
* queue. h * queue. h
@ -1197,10 +1195,10 @@ unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue
*/ */
signed portBASE_TYPE xQueueAltGenericSend( xQueueHandle pxQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition ); signed portBASE_TYPE xQueueAltGenericSend( xQueueHandle pxQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition );
signed portBASE_TYPE xQueueAltGenericReceive( xQueueHandle pxQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking ); signed portBASE_TYPE xQueueAltGenericReceive( xQueueHandle pxQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking );
#define xQueueAltSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( xQueue, pvItemToQueue, xTicksToWait, queueSEND_TO_FRONT ) #define xQueueAltSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
#define xQueueAltSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( xQueue, pvItemToQueue, xTicksToWait, queueSEND_TO_BACK ) #define xQueueAltSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
#define xQueueAltReceive( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( xQueue, pvBuffer, xTicksToWait, pdFALSE ) #define xQueueAltReceive( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
#define xQueueAltPeek( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( xQueue, pvBuffer, xTicksToWait, pdTRUE ) #define xQueueAltPeek( xQueue, pvBuffer, xTicksToWait ) xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
/* /*
* The functions defined above are for passing data to and from tasks. The * The functions defined above are for passing data to and from tasks. The
@ -1250,7 +1248,7 @@ portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle pxMutex );
* @param pcName The name to be associated with the handle. This is the * @param pcName The name to be associated with the handle. This is the
* name that the kernel aware debugger will display. * name that the kernel aware debugger will display.
*/ */
#if configQUEUE_REGISTRY_SIZE > 0 #if configQUEUE_REGISTRY_SIZE > 0U
void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName ); void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName );
#endif #endif

@ -51,20 +51,20 @@
licensing and training services. licensing and training services.
*/ */
#ifndef SEMAPHORE_H
#define SEMAPHORE_H
#ifndef INC_FREERTOS_H #ifndef INC_FREERTOS_H
#error "#include FreeRTOS.h" must appear in source files before "#include semphr.h" #error "#include FreeRTOS.h" must appear in source files before "#include semphr.h"
#endif #endif
#ifndef SEMAPHORE_H
#define SEMAPHORE_H
#include "queue.h" #include "queue.h"
typedef xQueueHandle xSemaphoreHandle; typedef xQueueHandle xSemaphoreHandle;
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( unsigned char ) 1 ) #define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( unsigned char ) 1U )
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned char ) 0 ) #define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned char ) 0U )
#define semGIVE_BLOCK_TIME ( ( portTickType ) 0 ) #define semGIVE_BLOCK_TIME ( ( portTickType ) 0U )
/** /**
@ -106,10 +106,10 @@ typedef xQueueHandle xSemaphoreHandle;
* \ingroup Semaphores * \ingroup Semaphores
*/ */
#define vSemaphoreCreateBinary( xSemaphore ) { \ #define vSemaphoreCreateBinary( xSemaphore ) { \
xSemaphore = xQueueCreate( ( unsigned portBASE_TYPE ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH ); \ ( xSemaphore ) = xQueueCreate( ( unsigned portBASE_TYPE ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH ); \
if( xSemaphore != NULL ) \ if( ( xSemaphore ) != NULL ) \
{ \ { \
xSemaphoreGive( xSemaphore ); \ xSemaphoreGive( ( xSemaphore ) ); \
} \ } \
} }
@ -178,7 +178,7 @@ typedef xQueueHandle xSemaphoreHandle;
* \defgroup xSemaphoreTake xSemaphoreTake * \defgroup xSemaphoreTake xSemaphoreTake
* \ingroup Semaphores * \ingroup Semaphores
*/ */
#define xSemaphoreTake( xSemaphore, xBlockTime ) xQueueGenericReceive( ( xQueueHandle ) xSemaphore, NULL, xBlockTime, pdFALSE ) #define xSemaphoreTake( xSemaphore, xBlockTime ) xQueueGenericReceive( ( xQueueHandle ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )
/** /**
* semphr. h * semphr. h
@ -271,7 +271,7 @@ typedef xQueueHandle xSemaphoreHandle;
* \defgroup xSemaphoreTakeRecursive xSemaphoreTakeRecursive * \defgroup xSemaphoreTakeRecursive xSemaphoreTakeRecursive
* \ingroup Semaphores * \ingroup Semaphores
*/ */
#define xSemaphoreTakeRecursive( xMutex, xBlockTime ) xQueueTakeMutexRecursive( xMutex, xBlockTime ) #define xSemaphoreTakeRecursive( xMutex, xBlockTime ) xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) )
/* /*
@ -286,7 +286,7 @@ typedef xQueueHandle xSemaphoreHandle;
* responsiveness to gain execution speed, whereas the fully featured API * responsiveness to gain execution speed, whereas the fully featured API
* sacrifices execution speed to ensure better interrupt responsiveness. * sacrifices execution speed to ensure better interrupt responsiveness.
*/ */
#define xSemaphoreAltTake( xSemaphore, xBlockTime ) xQueueAltGenericReceive( ( xQueueHandle ) xSemaphore, NULL, xBlockTime, pdFALSE ) #define xSemaphoreAltTake( xSemaphore, xBlockTime ) xQueueAltGenericReceive( ( xQueueHandle ) ( xSemaphore ), NULL, ( xBlockTime ), pdFALSE )
/** /**
* semphr. h * semphr. h
@ -349,7 +349,7 @@ typedef xQueueHandle xSemaphoreHandle;
* \defgroup xSemaphoreGive xSemaphoreGive * \defgroup xSemaphoreGive xSemaphoreGive
* \ingroup Semaphores * \ingroup Semaphores
*/ */
#define xSemaphoreGive( xSemaphore ) xQueueGenericSend( ( xQueueHandle ) xSemaphore, NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK ) #define xSemaphoreGive( xSemaphore ) xQueueGenericSend( ( xQueueHandle ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )
/** /**
* semphr. h * semphr. h
@ -433,7 +433,7 @@ typedef xQueueHandle xSemaphoreHandle;
* \defgroup xSemaphoreGiveRecursive xSemaphoreGiveRecursive * \defgroup xSemaphoreGiveRecursive xSemaphoreGiveRecursive
* \ingroup Semaphores * \ingroup Semaphores
*/ */
#define xSemaphoreGiveRecursive( xMutex ) xQueueGiveMutexRecursive( xMutex ) #define xSemaphoreGiveRecursive( xMutex ) xQueueGiveMutexRecursive( ( xMutex ) )
/* /*
* xSemaphoreAltGive() is an alternative version of xSemaphoreGive(). * xSemaphoreAltGive() is an alternative version of xSemaphoreGive().
@ -447,7 +447,7 @@ typedef xQueueHandle xSemaphoreHandle;
* responsiveness to gain execution speed, whereas the fully featured API * responsiveness to gain execution speed, whereas the fully featured API
* sacrifices execution speed to ensure better interrupt responsiveness. * sacrifices execution speed to ensure better interrupt responsiveness.
*/ */
#define xSemaphoreAltGive( xSemaphore ) xQueueAltGenericSend( ( xQueueHandle ) xSemaphore, NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK ) #define xSemaphoreAltGive( xSemaphore ) xQueueAltGenericSend( ( xQueueHandle ) ( xSemaphore ), NULL, semGIVE_BLOCK_TIME, queueSEND_TO_BACK )
/** /**
* semphr. h * semphr. h
@ -538,7 +538,7 @@ typedef xQueueHandle xSemaphoreHandle;
* \defgroup xSemaphoreGiveFromISR xSemaphoreGiveFromISR * \defgroup xSemaphoreGiveFromISR xSemaphoreGiveFromISR
* \ingroup Semaphores * \ingroup Semaphores
*/ */
#define xSemaphoreGiveFromISR( xSemaphore, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueueHandle ) xSemaphore, NULL, pxHigherPriorityTaskWoken, queueSEND_TO_BACK ) #define xSemaphoreGiveFromISR( xSemaphore, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueueHandle ) ( xSemaphore ), NULL, ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
/** /**
* semphr. h * semphr. h
@ -703,7 +703,7 @@ typedef xQueueHandle xSemaphoreHandle;
* \defgroup xSemaphoreCreateCounting xSemaphoreCreateCounting * \defgroup xSemaphoreCreateCounting xSemaphoreCreateCounting
* \ingroup Semaphores * \ingroup Semaphores
*/ */
#define xSemaphoreCreateCounting( uxMaxCount, uxInitialCount ) xQueueCreateCountingSemaphore( uxMaxCount, uxInitialCount ) #define xSemaphoreCreateCounting( uxMaxCount, uxInitialCount ) xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) )
#endif /* SEMAPHORE_H */ #endif /* SEMAPHORE_H */

@ -122,7 +122,7 @@ typedef struct xTASK_PARAMTERS
* *
* \ingroup TaskUtils * \ingroup TaskUtils
*/ */
#define tskIDLE_PRIORITY ( ( unsigned portBASE_TYPE ) 0 ) #define tskIDLE_PRIORITY ( ( unsigned portBASE_TYPE ) 0U )
/** /**
* task. h * task. h

@ -217,7 +217,7 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
* for( ;; ); * for( ;; );
* } * }
*/ */
xTimerHandle xTimerCreate( const signed char *pcTimerName, portTickType xTimerPeriod, unsigned portBASE_TYPE uxAutoReload, void * pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; xTimerHandle xTimerCreate( const signed char *pcTimerName, portTickType xTimerPeriodInTicks, unsigned portBASE_TYPE uxAutoReload, void * pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION;
/** /**
* void *pvTimerGetTimerID( xTimerHandle xTimer ); * void *pvTimerGetTimerID( xTimerHandle xTimer );
@ -327,7 +327,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* See the xTimerCreate() API function example usage scenario. * See the xTimerCreate() API function example usage scenario.
* *
*/ */
#define xTimerStart( xTimer, xBlockTime ) xTimerGenericCommand( xTimer, tmrCOMMAND_START, xTaskGetTickCount(), NULL, xBlockTime ) #define xTimerStart( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCount() ), NULL, ( xBlockTime ) )
/** /**
* portBASE_TYPE xTimerStop( xTimerHandle xTimer, portTickType xBlockTime ); * portBASE_TYPE xTimerStop( xTimerHandle xTimer, portTickType xBlockTime );
@ -369,7 +369,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* See the xTimerCreate() API function example usage scenario. * See the xTimerCreate() API function example usage scenario.
* *
*/ */
#define xTimerStop( xTimer, xBlockTime ) xTimerGenericCommand( xTimer, tmrCOMMAND_STOP, 0, NULL, xBlockTime ) #define xTimerStop( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP, 0U, NULL, ( xBlockTime ) )
/** /**
* portBASE_TYPE xTimerChangePeriod( xTimerHandle xTimer, * portBASE_TYPE xTimerChangePeriod( xTimerHandle xTimer,
@ -448,7 +448,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* } * }
* } * }
*/ */
#define xTimerChangePeriod( xTimer, xNewPeriod, xBlockTime ) xTimerGenericCommand( xTimer, tmrCOMMAND_CHANGE_PERIOD, xNewPeriod, NULL, xBlockTime ) #define xTimerChangePeriod( xTimer, xNewPeriod, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD, ( xNewPeriod ), NULL, ( xBlockTime ) )
/** /**
* portBASE_TYPE xTimerDelete( xTimerHandle xTimer, portTickType xBlockTime ); * portBASE_TYPE xTimerDelete( xTimerHandle xTimer, portTickType xBlockTime );
@ -486,7 +486,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* *
* See the xTimerChangePeriod() API function example usage scenario. * See the xTimerChangePeriod() API function example usage scenario.
*/ */
#define xTimerDelete( xTimer, xBlockTime ) xTimerGenericCommand( xTimer, tmrCOMMAND_DELETE, 0, NULL, xBlockTime ) #define xTimerDelete( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_DELETE, 0U, NULL, ( xBlockTime ) )
/** /**
* portBASE_TYPE xTimerReset( xTimerHandle xTimer, portTickType xBlockTime ); * portBASE_TYPE xTimerReset( xTimerHandle xTimer, portTickType xBlockTime );
@ -609,7 +609,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* for( ;; ); * for( ;; );
* } * }
*/ */
#define xTimerReset( xTimer, xBlockTime ) xTimerGenericCommand( xTimer, tmrCOMMAND_START, xTaskGetTickCount(), NULL, xBlockTime ) #define xTimerReset( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCount() ), NULL, ( xBlockTime ) )
/** /**
* portBASE_TYPE xTimerStartFromISR( xTimerHandle xTimer, * portBASE_TYPE xTimerStartFromISR( xTimerHandle xTimer,
@ -693,7 +693,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* } * }
* } * }
*/ */
#define xTimerStartFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( xTimer, tmrCOMMAND_START, xTaskGetTickCountFromISR(), pxHigherPriorityTaskWoken, 0 ) #define xTimerStartFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCountFromISR() ), ( pxHigherPriorityTaskWoken ), 0U )
/** /**
* portBASE_TYPE xTimerStopFromISR( xTimerHandle xTimer, * portBASE_TYPE xTimerStopFromISR( xTimerHandle xTimer,
@ -755,7 +755,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* } * }
* } * }
*/ */
#define xTimerStopFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( xTimer, tmrCOMMAND_STOP, 0, pxHigherPriorityTaskWoken, 0 ) #define xTimerStopFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP, 0, ( pxHigherPriorityTaskWoken ), 0U )
/** /**
* portBASE_TYPE xTimerChangePeriodFromISR( xTimerHandle xTimer, * portBASE_TYPE xTimerChangePeriodFromISR( xTimerHandle xTimer,
@ -827,7 +827,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* } * }
* } * }
*/ */
#define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( xTimer, tmrCOMMAND_CHANGE_PERIOD, xNewPeriod, pxHigherPriorityTaskWoken, 0 ) #define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD, ( xNewPeriod ), ( pxHigherPriorityTaskWoken ), 0U )
/** /**
* portBASE_TYPE xTimerResetFromISR( xTimerHandle xTimer, * portBASE_TYPE xTimerResetFromISR( xTimerHandle xTimer,
@ -912,7 +912,7 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
* } * }
* } * }
*/ */
#define xTimerResetFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( xTimer, tmrCOMMAND_START, xTaskGetTickCountFromISR(), pxHigherPriorityTaskWoken, 0 ) #define xTimerResetFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCountFromISR() ), ( pxHigherPriorityTaskWoken ), 0U )
/* /*
* Functions beyond this part are not part of the public API and are intended * Functions beyond this part are not part of the public API and are intended

@ -144,6 +144,7 @@ signed portBASE_TYPE xQueueAltGenericReceive( xQueueHandle pxQueue, void * const
signed portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle pxQueue ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle pxQueue ) PRIVILEGED_FUNCTION;
signed portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle pxQueue ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle pxQueue ) PRIVILEGED_FUNCTION;
unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue ) PRIVILEGED_FUNCTION; unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue ) PRIVILEGED_FUNCTION;
void vQueueWaitForMessageRestricted( xQueueHandle pxQueue, portTickType xTicksToWait ) PRIVILEGED_FUNCTION;
/* /*
* Co-routine queue functions differ from task queue functions. Co-routines are * Co-routine queue functions differ from task queue functions. Co-routines are
@ -1285,7 +1286,7 @@ signed portBASE_TYPE xReturn;
xReturn = pdPASS; xReturn = pdPASS;
/* Were any co-routines waiting for data to become available? */ /* Were any co-routines waiting for data to become available? */
if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) ) if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
{ {
/* In this instance the co-routine could be placed directly /* In this instance the co-routine could be placed directly
into the ready list as we are within a critical section. into the ready list as we are within a critical section.
@ -1360,7 +1361,7 @@ signed portBASE_TYPE xReturn;
xReturn = pdPASS; xReturn = pdPASS;
/* Were any co-routines waiting for space to become available? */ /* Were any co-routines waiting for space to become available? */
if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) ) if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
{ {
/* In this instance the co-routine could be placed directly /* In this instance the co-routine could be placed directly
into the ready list as we are within a critical section. into the ready list as we are within a critical section.
@ -1399,7 +1400,7 @@ signed portBASE_TYPE xQueueCRSendFromISR( xQueueHandle pxQueue, const void *pvIt
co-routine has not already been woken. */ co-routine has not already been woken. */
if( !xCoRoutinePreviouslyWoken ) if( !xCoRoutinePreviouslyWoken )
{ {
if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) ) if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
{ {
if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
{ {
@ -1434,7 +1435,7 @@ signed portBASE_TYPE xReturn;
if( !( *pxCoRoutineWoken ) ) if( !( *pxCoRoutineWoken ) )
{ {
if( !listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) ) if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
{ {
if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) if( xCoRoutineRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
{ {
@ -1463,7 +1464,7 @@ signed portBASE_TYPE xReturn;
/* See if there is an empty space in the registry. A NULL name denotes /* See if there is an empty space in the registry. A NULL name denotes
a free slot. */ a free slot. */
for( ux = 0; ux < configQUEUE_REGISTRY_SIZE; ux++ ) for( ux = ( unsigned portBASE_TYPE ) 0U; ux < configQUEUE_REGISTRY_SIZE; ux++ )
{ {
if( xQueueRegistry[ ux ].pcQueueName == NULL ) if( xQueueRegistry[ ux ].pcQueueName == NULL )
{ {
@ -1486,7 +1487,7 @@ signed portBASE_TYPE xReturn;
/* See if the handle of the queue being unregistered in actually in the /* See if the handle of the queue being unregistered in actually in the
registry. */ registry. */
for( ux = 0; ux < configQUEUE_REGISTRY_SIZE; ux++ ) for( ux = ( unsigned portBASE_TYPE ) 0U; ux < configQUEUE_REGISTRY_SIZE; ux++ )
{ {
if( xQueueRegistry[ ux ].xHandle == xQueue ) if( xQueueRegistry[ ux ].xHandle == xQueue )
{ {

@ -329,6 +329,7 @@ portTickType xItemValue; \
/* Callback function prototypes. --------------------------*/ /* Callback function prototypes. --------------------------*/
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName );
extern void vApplicationTickHook( void );
/* File private functions. --------------------------------*/ /* File private functions. --------------------------------*/
@ -1298,25 +1299,25 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
{ {
uxQueue--; uxQueue--;
if( !listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxQueue ] ) ) ) if( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxQueue ] ) ) == pdFALSE )
{ {
prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) &( pxReadyTasksLists[ uxQueue ] ), tskREADY_CHAR ); prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) &( pxReadyTasksLists[ uxQueue ] ), tskREADY_CHAR );
} }
}while( uxQueue > ( unsigned short ) tskIDLE_PRIORITY ); }while( uxQueue > ( unsigned short ) tskIDLE_PRIORITY );
if( !listLIST_IS_EMPTY( pxDelayedTaskList ) ) if( listLIST_IS_EMPTY( pxDelayedTaskList ) == pdFALSE )
{ {
prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) pxDelayedTaskList, tskBLOCKED_CHAR ); prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) pxDelayedTaskList, tskBLOCKED_CHAR );
} }
if( !listLIST_IS_EMPTY( pxOverflowDelayedTaskList ) ) if( listLIST_IS_EMPTY( pxOverflowDelayedTaskList ) == pdFALSE )
{ {
prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) pxOverflowDelayedTaskList, tskBLOCKED_CHAR ); prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) pxOverflowDelayedTaskList, tskBLOCKED_CHAR );
} }
#if( INCLUDE_vTaskDelete == 1 ) #if( INCLUDE_vTaskDelete == 1 )
{ {
if( !listLIST_IS_EMPTY( &xTasksWaitingTermination ) ) if( listLIST_IS_EMPTY( &xTasksWaitingTermination ) == pdFALSE )
{ {
prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) &xTasksWaitingTermination, tskDELETED_CHAR ); prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) &xTasksWaitingTermination, tskDELETED_CHAR );
} }
@ -1325,7 +1326,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
#if ( INCLUDE_vTaskSuspend == 1 ) #if ( INCLUDE_vTaskSuspend == 1 )
{ {
if( !listLIST_IS_EMPTY( &xSuspendedTaskList ) ) if( listLIST_IS_EMPTY( &xSuspendedTaskList ) == pdFALSE )
{ {
prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) &xSuspendedTaskList, tskSUSPENDED_CHAR ); prvListTaskWithinSingleList( pcWriteBuffer, ( xList * ) &xSuspendedTaskList, tskSUSPENDED_CHAR );
} }
@ -1373,25 +1374,25 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
{ {
uxQueue--; uxQueue--;
if( !listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxQueue ] ) ) ) if( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxQueue ] ) ) == pdFALSE )
{ {
prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &( pxReadyTasksLists[ uxQueue ] ), ulTotalRunTime ); prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &( pxReadyTasksLists[ uxQueue ] ), ulTotalRunTime );
} }
}while( uxQueue > ( unsigned short ) tskIDLE_PRIORITY ); }while( uxQueue > ( unsigned short ) tskIDLE_PRIORITY );
if( !listLIST_IS_EMPTY( pxDelayedTaskList ) ) if( listLIST_IS_EMPTY( pxDelayedTaskList ) == pdFALSE )
{ {
prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) pxDelayedTaskList, ulTotalRunTime ); prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) pxDelayedTaskList, ulTotalRunTime );
} }
if( !listLIST_IS_EMPTY( pxOverflowDelayedTaskList ) ) if( listLIST_IS_EMPTY( pxOverflowDelayedTaskList ) == pdFALSE )
{ {
prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) pxOverflowDelayedTaskList, ulTotalRunTime ); prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) pxOverflowDelayedTaskList, ulTotalRunTime );
} }
#if ( INCLUDE_vTaskDelete == 1 ) #if ( INCLUDE_vTaskDelete == 1 )
{ {
if( !listLIST_IS_EMPTY( &xTasksWaitingTermination ) ) if( listLIST_IS_EMPTY( &xTasksWaitingTermination ) == pdFALSE )
{ {
prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &xTasksWaitingTermination, ulTotalRunTime ); prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &xTasksWaitingTermination, ulTotalRunTime );
} }
@ -1400,7 +1401,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
#if ( INCLUDE_vTaskSuspend == 1 ) #if ( INCLUDE_vTaskSuspend == 1 )
{ {
if( !listLIST_IS_EMPTY( &xSuspendedTaskList ) ) if( listLIST_IS_EMPTY( &xSuspendedTaskList ) == pdFALSE )
{ {
prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &xSuspendedTaskList, ulTotalRunTime ); prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &xSuspendedTaskList, ulTotalRunTime );
} }
@ -1512,8 +1513,6 @@ void vTaskIncrementTick( void )
scheduler is locked. */ scheduler is locked. */
#if ( configUSE_TICK_HOOK == 1 ) #if ( configUSE_TICK_HOOK == 1 )
{ {
extern void vApplicationTickHook( void );
vApplicationTickHook(); vApplicationTickHook();
} }
#endif #endif
@ -1521,11 +1520,9 @@ void vTaskIncrementTick( void )
#if ( configUSE_TICK_HOOK == 1 ) #if ( configUSE_TICK_HOOK == 1 )
{ {
extern void vApplicationTickHook( void );
/* Guard against the tick hook being called when the missed tick /* Guard against the tick hook being called when the missed tick
count is being unwound (when the scheduler is being unlocked. */ count is being unwound (when the scheduler is being unlocked. */
if( uxMissedTicks == 0 ) if( uxMissedTicks == ( unsigned portBASE_TYPE ) 0U )
{ {
vApplicationTickHook(); vApplicationTickHook();
} }
@ -1550,7 +1547,7 @@ void vTaskIncrementTick( void )
{ {
usQueue--; usQueue--;
while( !listLIST_IS_EMPTY( &( pxReadyTasksLists[ usQueue ] ) ) ) while( listLIST_IS_EMPTY( &( pxReadyTasksLists[ usQueue ] ) ) == pdFALSE )
{ {
listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &( pxReadyTasksLists[ usQueue ] ) ); listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &( pxReadyTasksLists[ usQueue ] ) );
vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) ); vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );
@ -1560,7 +1557,7 @@ void vTaskIncrementTick( void )
}while( usQueue > ( unsigned short ) tskIDLE_PRIORITY ); }while( usQueue > ( unsigned short ) tskIDLE_PRIORITY );
/* Remove any TCB's from the delayed queue. */ /* Remove any TCB's from the delayed queue. */
while( !listLIST_IS_EMPTY( &xDelayedTaskList1 ) ) while( listLIST_IS_EMPTY( &xDelayedTaskList1 ) == pdFALSE )
{ {
listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xDelayedTaskList1 ); listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xDelayedTaskList1 );
vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) ); vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );
@ -1569,7 +1566,7 @@ void vTaskIncrementTick( void )
} }
/* Remove any TCB's from the overflow delayed queue. */ /* Remove any TCB's from the overflow delayed queue. */
while( !listLIST_IS_EMPTY( &xDelayedTaskList2 ) ) while( listLIST_IS_EMPTY( &xDelayedTaskList2 ) == pdFALSE )
{ {
listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xDelayedTaskList2 ); listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xDelayedTaskList2 );
vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) ); vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );
@ -1577,7 +1574,7 @@ void vTaskIncrementTick( void )
prvDeleteTCB( ( tskTCB * ) pxTCB ); prvDeleteTCB( ( tskTCB * ) pxTCB );
} }
while( !listLIST_IS_EMPTY( &xSuspendedTaskList ) ) while( listLIST_IS_EMPTY( &xSuspendedTaskList ) == pdFALSE )
{ {
listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xSuspendedTaskList ); listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &xSuspendedTaskList );
vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) ); vListRemove( ( xListItem * ) &( pxTCB->xGenericListItem ) );
@ -1591,7 +1588,7 @@ void vTaskIncrementTick( void )
#if ( configUSE_APPLICATION_TASK_TAG == 1 ) #if ( configUSE_APPLICATION_TASK_TAG == 1 )
void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxTagValue ) void vTaskSetApplicationTaskTag( xTaskHandle xTask, pdTASK_HOOK_CODE pxHookFunction )
{ {
tskTCB *xTCB; tskTCB *xTCB;
@ -1608,7 +1605,7 @@ void vTaskIncrementTick( void )
/* Save the hook function in the TCB. A critical section is required as /* Save the hook function in the TCB. A critical section is required as
the value can be accessed from an interrupt. */ the value can be accessed from an interrupt. */
taskENTER_CRITICAL(); taskENTER_CRITICAL();
xTCB->pxTaskTag = pxTagValue; xTCB->pxTaskTag = pxHookFunction;
taskEXIT_CRITICAL(); taskEXIT_CRITICAL();
} }
@ -2374,7 +2371,7 @@ tskTCB *pxNewTCB;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) )
xTaskHandle xTaskGetCurrentTaskHandle( void ) xTaskHandle xTaskGetCurrentTaskHandle( void )
{ {
@ -2392,7 +2389,7 @@ tskTCB *pxNewTCB;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if ( INCLUDE_xTaskGetSchedulerState == 1 ) #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
portBASE_TYPE xTaskGetSchedulerState( void ) portBASE_TYPE xTaskGetSchedulerState( void )
{ {

@ -177,7 +177,7 @@ portBASE_TYPE xReturn = pdFAIL;
if( xTimerQueue != NULL ) if( xTimerQueue != NULL )
{ {
xReturn = xTaskCreate( prvTimerTask, ( const signed char * ) "Tmr Svc", configTIMER_TASK_STACK_DEPTH, NULL, configTIMER_TASK_PRIORITY, NULL); xReturn = xTaskCreate( prvTimerTask, ( const signed char * ) "Tmr Svc", ( unsigned short ) configTIMER_TASK_STACK_DEPTH, NULL, ( unsigned portBASE_TYPE ) configTIMER_TASK_PRIORITY, NULL);
} }
configASSERT( xReturn ); configASSERT( xReturn );
@ -274,7 +274,7 @@ portBASE_TYPE xResult;
/* If the timer is an auto reload timer then calculate the next /* If the timer is an auto reload timer then calculate the next
expiry time and re-insert the timer in the list of active timers. */ expiry time and re-insert the timer in the list of active timers. */
if( pxTimer->uxAutoReload == pdTRUE ) if( pxTimer->uxAutoReload == ( unsigned portBASE_TYPE ) pdTRUE )
{ {
/* This is the only time a timer is inserted into a list using /* This is the only time a timer is inserted into a list using
a time relative to anything other than the current time. It a time relative to anything other than the current time. It
@ -499,7 +499,7 @@ portTickType xTimeNow;
list. Process it now. */ list. Process it now. */
pxTimer->pxCallbackFunction( ( xTimerHandle ) pxTimer ); pxTimer->pxCallbackFunction( ( xTimerHandle ) pxTimer );
if( pxTimer->uxAutoReload == pdTRUE ) if( pxTimer->uxAutoReload == ( unsigned portBASE_TYPE ) pdTRUE )
{ {
xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START, xMessage.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START, xMessage.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
configASSERT( xResult ); configASSERT( xResult );
@ -560,7 +560,7 @@ portBASE_TYPE xResult;
have not yet been switched. */ have not yet been switched. */
pxTimer->pxCallbackFunction( ( xTimerHandle ) pxTimer ); pxTimer->pxCallbackFunction( ( xTimerHandle ) pxTimer );
if( pxTimer->uxAutoReload == pdTRUE ) if( pxTimer->uxAutoReload == ( unsigned portBASE_TYPE ) pdTRUE )
{ {
/* Calculate the reload value, and if the reload value results in /* Calculate the reload value, and if the reload value results in
the timer going into the same timer list then it has already expired the timer going into the same timer list then it has already expired
@ -603,7 +603,7 @@ static void prvCheckForValidListAndQueue( void )
vListInitialise( &xActiveTimerList2 ); vListInitialise( &xActiveTimerList2 );
pxCurrentTimerList = &xActiveTimerList1; pxCurrentTimerList = &xActiveTimerList1;
pxOverflowTimerList = &xActiveTimerList2; pxOverflowTimerList = &xActiveTimerList2;
xTimerQueue = xQueueCreate( configTIMER_QUEUE_LENGTH, sizeof( xTIMER_MESSAGE ) ); xTimerQueue = xQueueCreate( ( unsigned portBASE_TYPE ) configTIMER_QUEUE_LENGTH, sizeof( xTIMER_MESSAGE ) );
} }
} }
taskEXIT_CRITICAL(); taskEXIT_CRITICAL();

Loading…
Cancel
Save