Add xEventGroupClearBitsFromISR() and xEventGroupGetBitsFromISR() functions.

Move some types defines out of generic kernel headers into feature specific headers.
Convert the function prototype dypedefs to the new _t naming.
This commit is contained in:
Richard Barry 2013-12-31 16:45:49 +00:00
parent 38e7554138
commit 2aa19f1a14
84 changed files with 273 additions and 190 deletions

View File

@ -87,8 +87,8 @@ privileged Vs unprivileged linkage and placement. */
#error configUSE_TIMERS must be set to 1 to make the xEventGroupSetBitFromISR() function available. #error configUSE_TIMERS must be set to 1 to make the xEventGroupSetBitFromISR() function available.
#endif #endif
#if ( INCLUDE_xEventGroupSetBitFromISR == 1 ) && ( INCLUDE_xTimerPendCallbackFromISR == 0 ) #if ( INCLUDE_xEventGroupSetBitFromISR == 1 ) && ( INCLUDE_xTimerPendFunctionCallFromISR == 0 )
#error INCLUDE_xTimerPendCallbackFromISR must also be set to one to make the xEventGroupSetBitFromISR() function available. #error INCLUDE_xTimerPendFunctionCallFromISR must also be set to one to make the xEventGroupSetBitFromISR() function available.
#endif #endif
/* The following bit fields convey control information in a task's event list /* The following bit fields convey control information in a task's event list
@ -424,6 +424,33 @@ EventBits_t uxReturn;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
EventBits_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear )
{
UBaseType_t uxSavedInterruptStatus;
EventGroup_t *pxEventBits = ( EventGroup_t * ) xEventGroup;
EventBits_t uxReturn;
/* Check the user is not attempting to clear the bits used by the kernel
itself. */
configASSERT( ( uxBitsToClear & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
{
traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear );
/* The value returned is the event group value prior to the bits being
cleared. */
uxReturn = pxEventBits->uxEventBits;
/* Clear the bits. */
pxEventBits->uxEventBits &= ~uxBitsToClear;
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return uxReturn;
}
/*-----------------------------------------------------------*/
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet ) EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet )
{ {
ListItem_t *pxListItem, *pxNext; ListItem_t *pxListItem, *pxNext;

View File

@ -88,16 +88,6 @@ is included as it is used by the port layer. */
/* Definitions specific to the port being used. */ /* Definitions specific to the port being used. */
#include "portable.h" #include "portable.h"
/* Defines the prototype to which the application task hook function must
conform. */
typedef BaseType_t (*pdTASK_HOOK_CODE)( void * );
/* The type that holds event bits always matches TickType_t - therefore the
number of bits it holds is set by configUSE_16_BIT_TICKS (16 bits if set to 1,
32 bits if set to 0. */
typedef TickType_t EventBits_t;
/* /*
* Check all the required application specific macros have been defined. * Check all the required application specific macros have been defined.
* These macros are application specific and (as downloaded) are defined * These macros are application specific and (as downloaded) are defined
@ -246,8 +236,8 @@ typedef TickType_t EventBits_t;
#define INCLUDE_xEventGroupSetBitFromISR 0 #define INCLUDE_xEventGroupSetBitFromISR 0
#endif #endif
#ifndef INCLUDE_xTimerPendCallbackFromISR #ifndef INCLUDE_xTimerPendFunctionCallFromISR
#define INCLUDE_xTimerPendCallbackFromISR 0 #define INCLUDE_xTimerPendFunctionCallFromISR 0
#endif #endif
#ifndef configASSERT #ifndef configASSERT
@ -584,6 +574,10 @@ typedef TickType_t EventBits_t;
#define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear ) #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
#endif #endif
#ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
#define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
#endif
#ifndef traceEVENT_GROUP_SET_BITS #ifndef traceEVENT_GROUP_SET_BITS
#define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet ) #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
#endif #endif
@ -701,16 +695,21 @@ typedef TickType_t EventBits_t;
#define xQueueHandle QueueHandle_t #define xQueueHandle QueueHandle_t
#define xSemaphoreHandle SemaphoreHandle_t #define xSemaphoreHandle SemaphoreHandle_t
#define xQueueSetHandle QueueSetHandle_t #define xQueueSetHandle QueueSetHandle_t
#define xQueueSetMemberHandle QueueSetMember_t #define xQueueSetMemberHandle QueueSetMemberHandle_t
#define xTimeoutType TimeOut_t #define xTimeoutType TimeOut_t
#define xMemoryRegion MemoryRegion_t #define xMemoryRegion MemoryRegion_t
#define xTaskParameters TaskParameters_t #define xTaskParameters TaskParameters_t
#define xTaskStatusType TaskStatus_t #define xTaskStatusType TaskStatus_t
#define xTimerHandle TimerHandle_t #define xTimerHandle TimerHandle_t
#define xCoRoutineHandle CoRoutineHandle_t #define xCoRoutineHandle CoRoutineHandle_t
#define pdTASK_HOOK_CODE TaskHookFunction_t
/* Backward compatibility within the scheduler code only - these definitions
are not really required but are included for completeness. */
#define trmTIMER_CALLBACK TimerCallbackFunction_t
#define pdTASK_CODE TaskFunction_t
#define xListItem ListItem_t #define xListItem ListItem_t
#define xList List_t #define xList List_t
#define xTimeOutType TimeOut_t
#endif /* INC_FREERTOS_H */ #endif /* INC_FREERTOS_H */

View File

@ -117,6 +117,16 @@ extern "C" {
*/ */
typedef void * EventGroupHandle_t; typedef void * EventGroupHandle_t;
/*
* The type that holds event bits always matches TickType_t - therefore the
* number of bits it holds is set by configUSE_16_BIT_TICKS (16 bits if set to 1,
* 32 bits if set to 0.
*
* \defgroup EventBits_t EventBits_t
* \ingroup EventGroup
*/
typedef TickType_t EventBits_t;
/** /**
* event_groups.h * event_groups.h
*<pre> *<pre>
@ -312,6 +322,20 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits
*/ */
EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION; EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear );
</pre>
*
* A version of xEventGroupClearBits() that can be called from an interrupt
* service routine. See the xEventGroupClearBits() documentation.
*
* \defgroup xEventGroupClearBitsFromISR xEventGroupClearBitsFromISR
* \ingroup EventGroup
*/
EventBits_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;
/** /**
* event_groups.h * event_groups.h
*<pre> *<pre>
@ -389,7 +413,7 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_
/** /**
* event_groups.h * event_groups.h
*<pre> *<pre>
EventBits_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken ); BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken );
</pre> </pre>
* *
* A version of xEventGroupSetBits() that can be called from an interrupt. * A version of xEventGroupSetBits() that can be called from an interrupt.
@ -418,9 +442,9 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_
* *pxHigherPriorityTaskWoken must be initialised to pdFALSE. See the * *pxHigherPriorityTaskWoken must be initialised to pdFALSE. See the
* example code below. * example code below.
* *
* @return If the callback request was registered successfully then pdPASS is * @return If the request to execute the function was posted successfully then
* returned, otherwise pdFALSE is returned. pdFALSE will be returned if the * pdPASS is returned, otherwise pdFALSE is returned. pdFALSE will be returned
* timer service queue was full. * if the timer service queue was full.
* *
* Example usage: * Example usage:
<pre> <pre>
@ -433,28 +457,32 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_
void anInterruptHandler( void ) void anInterruptHandler( void )
{ {
BaseType_t xHigherPriorityTaskWoken; BaseType_t xHigherPriorityTaskWoken, xResult;
// xHigherPriorityTaskWoken must be initialised to pdFALSE. // xHigherPriorityTaskWoken must be initialised to pdFALSE.
xHigherPriorityTaskWoken = pdFALSE; xHigherPriorityTaskWoken = pdFALSE;
// Set bit 0 and bit 4 in xEventGroup. // Set bit 0 and bit 4 in xEventGroup.
uxBits = xEventGroupSetBitsFromISR( xResult = xEventGroupSetBitsFromISR(
xEventGroup, // The event group being updated. xEventGroup, // The event group being updated.
BIT_0 | BIT_4 // The bits being set. BIT_0 | BIT_4 // The bits being set.
&xHigherPriorityTaskWoken ); &xHigherPriorityTaskWoken );
// Was the message posted successfully?
if( xResult == pdPASS )
{
// If xHigherPriorityTaskWoken is now set to pdTRUE then a context // If xHigherPriorityTaskWoken is now set to pdTRUE then a context
// switch should be requested. The macro used is port specific and will // switch should be requested. The macro used is port specific and
// be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - refer to // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
// the documentation page for the port being used. // refer to the documentation page for the port being used.
portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
} }
}
</pre> </pre>
* \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR * \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR
* \ingroup EventGroup * \ingroup EventGroup
*/ */
#define xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken ) xTimerPendCallbackFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken ) #define xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken ) xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken )
/** /**
* event_groups.h * event_groups.h
@ -601,6 +629,23 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t u
*/ */
#define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( xEventGroup, 0 ) #define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( xEventGroup, 0 )
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup );
</pre>
*
* A version of xEventGroupGetBits() that can be called from an ISR.
*
* @param xEventGroup The event group being queried.
*
* @return The event group bits at the time xEventGroupGetBitsFromISR() was called.
*
* \defgroup xEventGroupGetBitsFromISR xEventGroupGetBitsFromISR
* \ingroup EventGroup
*/
#define xEventGroupGetBitsFromISR( xEventGroup ) xEventGroupClearBitsFromISR( xEventGroup, 0 )
/** /**
* event_groups.h * event_groups.h
*<pre> *<pre>

View File

@ -358,9 +358,9 @@ extern "C" {
* *
*/ */
#if( portUSING_MPU_WRAPPERS == 1 ) #if( portUSING_MPU_WRAPPERS == 1 )
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION; StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION;
#else #else
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) PRIVILEGED_FUNCTION; StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;
#endif #endif
/* /*

View File

@ -66,12 +66,11 @@
#ifndef PROJDEFS_H #ifndef PROJDEFS_H
#define PROJDEFS_H #define PROJDEFS_H
/* Defines the prototype to which task functions must conform. */ /*
typedef void (*pdTASK_CODE)( void * ); * Defines the prototype to which task functions must conform. Defined in this
* file to ensure the type is known before portable.h is included.
/* Defines the prototype to which callback functions called from the RTOS/timer */
daemon task must conform. */ typedef void (*TaskFunction_t)( void * );
typedef void (*pdAPPLICATION_CALLBACK_CODE)( void *, uint32_t );
#define pdFALSE ( ( BaseType_t ) 0 ) #define pdFALSE ( ( BaseType_t ) 0 )
#define pdTRUE ( ( BaseType_t ) 1 ) #define pdTRUE ( ( BaseType_t ) 1 )

View File

@ -92,10 +92,10 @@ typedef void * QueueSetHandle_t;
/** /**
* Queue sets can contain both queues and semaphores, so the * Queue sets can contain both queues and semaphores, so the
* QueueSetMember_t is defined as a type to be used where a parameter or * QueueSetMemberHandle_t is defined as a type to be used where a parameter or
* return value can be either an QueueHandle_t or an SemaphoreHandle_t. * return value can be either an QueueHandle_t or an SemaphoreHandle_t.
*/ */
typedef void * QueueSetMember_t; typedef void * QueueSetMemberHandle_t;
/* For internal use only. */ /* For internal use only. */
#define queueSEND_TO_BACK ( ( BaseType_t ) 0 ) #define queueSEND_TO_BACK ( ( BaseType_t ) 0 )
@ -1599,7 +1599,7 @@ QueueSetHandle_t xQueueCreateSet( const UBaseType_t uxEventQueueLength ) PRIVILE
* a call to xQueueSelectFromSet() has first returned a handle to that set member. * a call to xQueueSelectFromSet() has first returned a handle to that set member.
* *
* @param xQueueOrSemaphore The handle of the queue or semaphore being added to * @param xQueueOrSemaphore The handle of the queue or semaphore being added to
* the queue set (cast to an QueueSetMember_t type). * the queue set (cast to an QueueSetMemberHandle_t type).
* *
* @param xQueueSet The handle of the queue set to which the queue or semaphore * @param xQueueSet The handle of the queue set to which the queue or semaphore
* is being added. * is being added.
@ -1609,7 +1609,7 @@ QueueSetHandle_t xQueueCreateSet( const UBaseType_t uxEventQueueLength ) PRIVILE
* queue set because it is already a member of a different queue set then pdFAIL * queue set because it is already a member of a different queue set then pdFAIL
* is returned. * is returned.
*/ */
BaseType_t xQueueAddToSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION; BaseType_t xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;
/* /*
* Removes a queue or semaphore from a queue set. A queue or semaphore can only * Removes a queue or semaphore from a queue set. A queue or semaphore can only
@ -1619,7 +1619,7 @@ BaseType_t xQueueAddToSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t
* function. * function.
* *
* @param xQueueOrSemaphore The handle of the queue or semaphore being removed * @param xQueueOrSemaphore The handle of the queue or semaphore being removed
* from the queue set (cast to an QueueSetMember_t type). * from the queue set (cast to an QueueSetMemberHandle_t type).
* *
* @param xQueueSet The handle of the queue set in which the queue or semaphore * @param xQueueSet The handle of the queue set in which the queue or semaphore
* is included. * is included.
@ -1628,7 +1628,7 @@ BaseType_t xQueueAddToSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t
* then pdPASS is returned. If the queue was not in the queue set, or the * then pdPASS is returned. If the queue was not in the queue set, or the
* queue (or semaphore) was not empty, then pdFAIL is returned. * queue (or semaphore) was not empty, then pdFAIL is returned.
*/ */
BaseType_t xQueueRemoveFromSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION; BaseType_t xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;
/* /*
* xQueueSelectFromSet() selects from the members of a queue set a queue or * xQueueSelectFromSet() selects from the members of a queue set a queue or
@ -1659,17 +1659,17 @@ BaseType_t xQueueRemoveFromSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHand
* operation. * operation.
* *
* @return xQueueSelectFromSet() will return the handle of a queue (cast to * @return xQueueSelectFromSet() will return the handle of a queue (cast to
* a QueueSetMember_t type) contained in the queue set that contains data, * a QueueSetMemberHandle_t type) contained in the queue set that contains data,
* or the handle of a semaphore (cast to a QueueSetMember_t type) contained * or the handle of a semaphore (cast to a QueueSetMemberHandle_t type) contained
* in the queue set that is available, or NULL if no such queue or semaphore * in the queue set that is available, or NULL if no such queue or semaphore
* exists before before the specified block time expires. * exists before before the specified block time expires.
*/ */
QueueSetMember_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xBlockTimeTicks ) PRIVILEGED_FUNCTION; QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xBlockTimeTicks ) PRIVILEGED_FUNCTION;
/* /*
* A version of xQueueSelectFromSet() that can be used from an ISR. * A version of xQueueSelectFromSet() that can be used from an ISR.
*/ */
QueueSetMember_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION; QueueSetMemberHandle_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;
/* Not public API functions. */ /* Not public API functions. */
void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION; void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;

View File

@ -95,6 +95,12 @@ extern "C" {
*/ */
typedef void * TaskHandle_t; typedef void * TaskHandle_t;
/*
* Defines the prototype to which the application task hook function must
* conform.
*/
typedef BaseType_t (*TaskHookFunction_t)( void * );
/* Task states returned by eTaskGetState. */ /* Task states returned by eTaskGetState. */
typedef enum typedef enum
{ {
@ -129,7 +135,7 @@ typedef struct xMEMORY_REGION
*/ */
typedef struct xTASK_PARAMETERS typedef struct xTASK_PARAMETERS
{ {
pdTASK_CODE pvTaskCode; TaskFunction_t pvTaskCode;
const char * const pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ const char * const pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
uint16_t usStackDepth; uint16_t usStackDepth;
void *pvParameters; void *pvParameters;
@ -242,7 +248,7 @@ is used in assert() statements. */
* task. h * task. h
*<pre> *<pre>
BaseType_t xTaskCreate( BaseType_t xTaskCreate(
pdTASK_CODE pvTaskCode, TaskFunction_t pvTaskCode,
const char * const pcName, const char * const pcName,
uint16_t usStackDepth, uint16_t usStackDepth,
void *pvParameters, void *pvParameters,
@ -1111,7 +1117,7 @@ char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint
UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
/* When using trace macros it is sometimes necessary to include task.h before /* When using trace macros it is sometimes necessary to include task.h before
FreeRTOS.h. When this is done pdTASK_HOOK_CODE will not yet have been defined, FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined,
so the following two prototypes will cause a compilation error. This can be so the following two prototypes will cause a compilation error. This can be
fixed by simply guarding against the inclusion of these two prototypes unless fixed by simply guarding against the inclusion of these two prototypes unless
they are explicitly required by the configUSE_APPLICATION_TASK_TAG configuration they are explicitly required by the configUSE_APPLICATION_TASK_TAG configuration
@ -1120,13 +1126,13 @@ constant. */
#if configUSE_APPLICATION_TASK_TAG == 1 #if configUSE_APPLICATION_TASK_TAG == 1
/** /**
* task.h * task.h
* <pre>void vTaskSetApplicationTaskTag( TaskHandle_t xTask, pdTASK_HOOK_CODE pxHookFunction );</pre> * <pre>void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction );</pre>
* *
* Sets pxHookFunction to be the task hook function used by the task xTask. * Sets pxHookFunction to be the task hook function used by the task xTask.
* Passing xTask as NULL has the effect of setting the calling tasks hook * Passing xTask as NULL has the effect of setting the calling tasks hook
* function. * function.
*/ */
void vTaskSetApplicationTaskTag( TaskHandle_t xTask, pdTASK_HOOK_CODE pxHookFunction ) PRIVILEGED_FUNCTION; void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction ) PRIVILEGED_FUNCTION;
/** /**
* task.h * task.h
@ -1134,7 +1140,7 @@ constant. */
* *
* Returns the pxHookFunction value assigned to the task xTask. * Returns the pxHookFunction value assigned to the task xTask.
*/ */
pdTASK_HOOK_CODE xTaskGetApplicationTaskTag( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; TaskHookFunction_t xTaskGetApplicationTaskTag( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
#endif /* configUSE_APPLICATION_TASK_TAG ==1 */ #endif /* configUSE_APPLICATION_TASK_TAG ==1 */
#endif /* ifdef configUSE_APPLICATION_TASK_TAG */ #endif /* ifdef configUSE_APPLICATION_TASK_TAG */
@ -1515,7 +1521,7 @@ void vTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNC
* Generic version of the task creation function which is in turn called by the * Generic version of the task creation function which is in turn called by the
* xTaskCreate() and xTaskCreateRestricted() macros. * xTaskCreate() and xTaskCreateRestricted() macros.
*/ */
BaseType_t xTaskGenericCreate( pdTASK_CODE pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
/* /*
* Get the uxTCBNumber assigned to the task referenced by the xTask parameter. * Get the uxTCBNumber assigned to the task referenced by the xTask parameter.

View File

@ -101,15 +101,23 @@ as defined below. */
*/ */
typedef void * TimerHandle_t; typedef void * TimerHandle_t;
/* Define the prototype to which timer callback functions must conform. */ /*
typedef void (*tmrTIMER_CALLBACK)( TimerHandle_t xTimer ); * Defines the prototype to which timer callback functions must conform.
*/
typedef void (*TimerCallbackFunction_t)( TimerHandle_t xTimer );
/*
* Defines the prototype to which functions used with the
* xTimerPendFunctionCallFromISR() function must conform.
*/
typedef void (*PendedFunction_t)( void *, uint32_t );
/** /**
* TimerHandle_t xTimerCreate( const char * const pcTimerName, * TimerHandle_t xTimerCreate( const char * const pcTimerName,
* TickType_t xTimerPeriodInTicks, * TickType_t xTimerPeriodInTicks,
* UBaseType_t uxAutoReload, * UBaseType_t uxAutoReload,
* void * pvTimerID, * void * pvTimerID,
* tmrTIMER_CALLBACK pxCallbackFunction ); * TimerCallbackFunction_t pxCallbackFunction );
* *
* Creates a new software timer instance. This allocates the storage required * Creates a new software timer instance. This allocates the storage required
* by the new timer, initialises the new timers internal state, and returns a * by the new timer, initialises the new timers internal state, and returns a
@ -143,7 +151,7 @@ typedef void (*tmrTIMER_CALLBACK)( TimerHandle_t xTimer );
* timer. * timer.
* *
* @param pxCallbackFunction The function to call when the timer expires. * @param pxCallbackFunction The function to call when the timer expires.
* Callback functions must have the prototype defined by tmrTIMER_CALLBACK, * Callback functions must have the prototype defined by TimerCallbackFunction_t,
* which is "void vCallbackFunction( TimerHandle_t xTimer );". * which is "void vCallbackFunction( TimerHandle_t xTimer );".
* *
* @return If the timer is successfully created then a handle to the newly * @return If the timer is successfully created then a handle to the newly
@ -233,7 +241,7 @@ typedef void (*tmrTIMER_CALLBACK)( TimerHandle_t xTimer );
* } * }
* @endverbatim * @endverbatim
*/ */
TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
/** /**
* void *pvTimerGetTimerID( TimerHandle_t xTimer ); * void *pvTimerGetTimerID( TimerHandle_t xTimer );
@ -951,30 +959,29 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
/** /**
* BaseType_t xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackFunction, * BaseType_t xTimerPendFunctionCallFromISR( PendedFunction_t xFunctionToPend,
* void *pvParameter1, * void *pvParameter1,
* uint32_t ulParameter2, * uint32_t ulParameter2,
* BaseType_t *pxHigherPriorityTaskWoken ); * BaseType_t *pxHigherPriorityTaskWoken );
* *
* *
* Can be used by interrupt service routines to request that a function (the * Used from application interrupt service routines to defer the execution of a
* callback function) is executed from a task context. * function to the RTOS daemon task (the timer service task, hence this function
* is implemented in timers.c and is prefixed with 'Timer').
* *
* Ideally an interrupt service routine (ISR) is kept as short as possible, but * Ideally an interrupt service routine (ISR) is kept as short as possible, but
* sometimes an ISR either has a lot of processing to do, or needs to perform * sometimes an ISR either has a lot of processing to do, or needs to perform
* processing that is not deterministic. In these cases the processing can be * processing that is not deterministic. In these cases
* deferred to be performed in a task - allowing the ISR to exit. The timer * xTimerPendFunctionCallFromISR() can be used to defer processing of a function
* daemon service/daemon task is already responsible for executing software * to the RTOS daemon task.
* timer callback functions, so is also used to executed callback functions that
* are pended from interrupts.
* *
* A mechanism is provided that allows the interrupt to return directly to the * A mechanism is provided that allows the interrupt to return directly to the
* task that will subsequently execute the pended callback function. This * task that will subsequently execute the pended callback function. This
* allows the callback function to execute contiguously in time with the * allows the callback function to execute contiguously in time with the
* interrupt - just as if the callback had executed in the interrupt itself. * interrupt - just as if the callback had executed in the interrupt itself.
* *
* @param pvCallbackFunction The function to execute from the timer service/ * @param xFunctionToPend The function to execute from the timer service/
* daemon task. The function must conform to the pdAPPLICATION_CALLBACK_CODE * daemon task. The function must conform to the PendedFunction_t
* prototype. * prototype.
* *
* @param pvParameter1 The value of the callback function's first parameter. * @param pvParameter1 The value of the callback function's first parameter.
@ -990,7 +997,7 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
* configTIMER_TASK_PRIORITY in FreeRTOSConfig.h) is higher than the priority of * configTIMER_TASK_PRIORITY in FreeRTOSConfig.h) is higher than the priority of
* the currently running task (the task the interrupt interrupted) then * the currently running task (the task the interrupt interrupted) then
* *pxHigherPriorityTaskWoken will be set to pdTRUE within * *pxHigherPriorityTaskWoken will be set to pdTRUE within
* xTimerPendCallbackFromISR(), indicating that a context switch should be * xTimerPendFunctionCallFromISR(), indicating that a context switch should be
* requested before the interrupt exits. For that reason * requested before the interrupt exits. For that reason
* *pxHigherPriorityTaskWoken must be initialised to pdFALSE. See the * *pxHigherPriorityTaskWoken must be initialised to pdFALSE. See the
* example code below. * example code below.
@ -1028,7 +1035,7 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
* // service is passed in the second parameter. The first parameter is * // service is passed in the second parameter. The first parameter is
* // not used in this case. * // not used in this case.
* xHigherPriorityTaskWoken = pdFALSE; * xHigherPriorityTaskWoken = pdFALSE;
* xTimerPendCallbackFromISR( vProcessInterface, NULL, ( uint32_t ) xInterfaceToService, &xHigherPriorityTaskWoken ); * xTimerPendFunctionCallFromISR( vProcessInterface, NULL, ( uint32_t ) xInterfaceToService, &xHigherPriorityTaskWoken );
* *
* // If xHigherPriorityTaskWoken is now set to pdTRUE then a context * // If xHigherPriorityTaskWoken is now set to pdTRUE then a context
* // switch should be requested. The macro used is port specific and will * // switch should be requested. The macro used is port specific and will
@ -1039,7 +1046,7 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
* } * }
* @endverbatim * @endverbatim
*/ */
BaseType_t xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackFunction, void *pvParameter1, uint32_t ulParameter2, BaseType_t *pxHigherPriorityTaskWoken ); BaseType_t xTimerPendFunctionCallFromISR( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, BaseType_t *pxHigherPriorityTaskWoken );
/* /*
* 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

View File

@ -83,7 +83,7 @@ Changes from V2.6.1
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* See header file for description. */ /* See header file for description. */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t DS_Reg = 0; StackType_t DS_Reg = 0;

View File

@ -115,7 +115,7 @@ uint32_t ulTaskHasFPUContext = 0;
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -107,7 +107,7 @@ void vPortSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint16_t *pusTopOfStack; uint16_t *pusTopOfStack;
uint32_t *pulTopOfStack, ulTemp; uint32_t *pulTopOfStack, ulTemp;

View File

@ -88,7 +88,7 @@ static uint32_t ulCriticalNesting = 0x9999UL;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint32_t ulOriginalA5; uint32_t ulOriginalA5;

View File

@ -95,7 +95,7 @@ static uint32_t ulCriticalNesting = 0x9999UL;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
*pxTopOfStack = ( StackType_t ) pvParameters; *pxTopOfStack = ( StackType_t ) pvParameters;
pxTopOfStack--; pxTopOfStack--;

View File

@ -110,7 +110,7 @@ volatile UBaseType_t uxCriticalNesting = 0xff;
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* /*
Place a few bytes of known values on the bottom of the stack. Place a few bytes of known values on the bottom of the stack.

View File

@ -111,7 +111,7 @@ extern void vPortISRStartFirstTask( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -120,7 +120,7 @@ extern void vPortISRStartFirstTask( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -116,7 +116,7 @@ extern void vPortISRStartFirstTask( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -116,7 +116,7 @@ extern void vPortISRStartFirstTask( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -127,7 +127,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -202,7 +202,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -170,7 +170,7 @@ static void prvSVCHandler( uint32_t *pulRegisters ) __attribute__(( noinline ))
/* /*
* Prototypes for all the MPU wrappers. * Prototypes for all the MPU wrappers.
*/ */
BaseType_t MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask, StackType_t *puxStackBuffer, const MemoryRegion_t * const xRegions ); BaseType_t MPU_xTaskGenericCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask, StackType_t *puxStackBuffer, const MemoryRegion_t * const xRegions );
void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const xRegions ); void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const xRegions );
void MPU_vTaskDelete( TaskHandle_t pxTaskToDelete ); void MPU_vTaskDelete( TaskHandle_t pxTaskToDelete );
void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, TickType_t xTimeIncrement ); void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, TickType_t xTimeIncrement );
@ -187,8 +187,8 @@ TickType_t MPU_xTaskGetTickCount( void );
UBaseType_t MPU_uxTaskGetNumberOfTasks( void ); UBaseType_t MPU_uxTaskGetNumberOfTasks( void );
void MPU_vTaskList( char *pcWriteBuffer ); void MPU_vTaskList( char *pcWriteBuffer );
void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer ); void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer );
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, pdTASK_HOOK_CODE pxTagValue ); void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue );
pdTASK_HOOK_CODE MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask ); TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask );
BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter ); BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );
UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask ); UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask );
TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void ); TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void );
@ -213,9 +213,9 @@ void MPU_vPortFree( void *pv );
void MPU_vPortInitialiseBlocks( void ); void MPU_vPortInitialiseBlocks( void );
size_t MPU_xPortGetFreeHeapSize( void ); size_t MPU_xPortGetFreeHeapSize( void );
QueueSetHandle_t MPU_xQueueCreateSet( UBaseType_t uxEventQueueLength ); QueueSetHandle_t MPU_xQueueCreateSet( UBaseType_t uxEventQueueLength );
QueueSetMember_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t xBlockTimeTicks ); QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t xBlockTimeTicks );
BaseType_t MPU_xQueueAddToSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ); BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );
BaseType_t MPU_xQueueRemoveFromSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ); BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );
BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer ); BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -223,7 +223,7 @@ BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, BaseType_t xRunPrivileged ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */
@ -673,7 +673,7 @@ uint32_t ul;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
BaseType_t MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask, StackType_t *puxStackBuffer, const MemoryRegion_t * const xRegions ) BaseType_t MPU_xTaskGenericCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask, StackType_t *puxStackBuffer, const MemoryRegion_t * const xRegions )
{ {
BaseType_t xReturn; BaseType_t xReturn;
BaseType_t xRunningPrivileged = prvRaisePrivilege(); BaseType_t xRunningPrivileged = prvRaisePrivilege();
@ -876,7 +876,7 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if ( configUSE_APPLICATION_TASK_TAG == 1 ) #if ( configUSE_APPLICATION_TASK_TAG == 1 )
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, pdTASK_HOOK_CODE pxTagValue ) void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue )
{ {
BaseType_t xRunningPrivileged = prvRaisePrivilege(); BaseType_t xRunningPrivileged = prvRaisePrivilege();
@ -887,9 +887,9 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if ( configUSE_APPLICATION_TASK_TAG == 1 ) #if ( configUSE_APPLICATION_TASK_TAG == 1 )
pdTASK_HOOK_CODE MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask ) TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask )
{ {
pdTASK_HOOK_CODE xReturn; TaskHookFunction_t xReturn;
BaseType_t xRunningPrivileged = prvRaisePrivilege(); BaseType_t xRunningPrivileged = prvRaisePrivilege();
xReturn = xTaskGetApplicationTaskTag( xTask ); xReturn = xTaskGetApplicationTaskTag( xTask );
@ -1096,9 +1096,9 @@ BaseType_t xReturn;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
QueueSetMember_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t xBlockTimeTicks ) QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t xBlockTimeTicks )
{ {
QueueSetMember_t xReturn; QueueSetMemberHandle_t xReturn;
BaseType_t xRunningPrivileged = prvRaisePrivilege(); BaseType_t xRunningPrivileged = prvRaisePrivilege();
xReturn = xQueueSelectFromSet( xQueueSet, xBlockTimeTicks ); xReturn = xQueueSelectFromSet( xQueueSet, xBlockTimeTicks );
@ -1109,7 +1109,7 @@ BaseType_t xReturn;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
BaseType_t MPU_xQueueAddToSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet )
{ {
BaseType_t xReturn; BaseType_t xReturn;
BaseType_t xRunningPrivileged = prvRaisePrivilege(); BaseType_t xRunningPrivileged = prvRaisePrivilege();
@ -1122,7 +1122,7 @@ BaseType_t xReturn;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
BaseType_t MPU_xQueueRemoveFromSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet )
{ {
BaseType_t xReturn; BaseType_t xReturn;
BaseType_t xRunningPrivileged = prvRaisePrivilege(); BaseType_t xRunningPrivileged = prvRaisePrivilege();

View File

@ -209,7 +209,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -220,7 +220,7 @@ static void prvSetupTimerInterrupt( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint16_t usAddress; uint16_t usAddress;

View File

@ -298,7 +298,7 @@ __attribute__((__noinline__)) void vPortExitCritical( void )
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Setup the initial stack of the task. The stack is set exactly as /* Setup the initial stack of the task. The stack is set exactly as
expected by the portRESTORE_CONTEXT() macro. */ expected by the portRESTORE_CONTEXT() macro. */

View File

@ -86,7 +86,7 @@
static void prvSetupTimerInterrupt( void ); static void prvSetupTimerInterrupt( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Make space on the stack for the context - this leaves a couple of spaces /* Make space on the stack for the context - this leaves a couple of spaces
empty. */ empty. */

View File

@ -78,7 +78,7 @@ static uint32_t ulCriticalNesting = 0x9999UL;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
*pxTopOfStack = ( StackType_t ) pvParameters; *pxTopOfStack = ( StackType_t ) pvParameters;
pxTopOfStack--; pxTopOfStack--;

View File

@ -101,7 +101,7 @@ void vPortYield( void ) __attribute__ ( ( saveall, interrupt_handler ) );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint32_t ulValue; uint32_t ulValue;

View File

@ -111,7 +111,7 @@ volatile UBaseType_t uxCriticalNesting = 0x80; // un-initialized
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {

View File

@ -102,7 +102,7 @@ static void prvPortPreemptiveTick ( void );
/* ------------------------ Start implementation -------------------------- */ /* ------------------------ Start implementation -------------------------- */
StackType_t * StackType_t *
pxPortInitialiseStack( StackType_t * pxTopOfStack, pdTASK_CODE pxCode, pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode,
void *pvParameters ) void *pvParameters )
{ {
/* Place the parameter on the stack in the expected location. */ /* Place the parameter on the stack in the expected location. */

View File

@ -178,7 +178,7 @@ static void prvSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* /*
Place a few bytes of known values on the bottom of the stack. Place a few bytes of known values on the bottom of the stack.

View File

@ -119,7 +119,7 @@ static void prvSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
extern void *_SDA2_BASE_, *_SDA_BASE_; extern void *_SDA2_BASE_, *_SDA_BASE_;
const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_; const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_;

View File

@ -139,7 +139,7 @@ static XIntc xInterruptControllerInstance;
* *
* See the portable.h header file. * See the portable.h header file.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
extern void *_SDA2_BASE_, *_SDA_BASE_; extern void *_SDA2_BASE_, *_SDA_BASE_;
const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_; const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_;

View File

@ -106,7 +106,7 @@ static void prvReadGp( uint32_t *ulValue )
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxFramePointer = pxTopOfStack - 1; StackType_t *pxFramePointer = pxTopOfStack - 1;
StackType_t xGlobalPointer; StackType_t xGlobalPointer;

View File

@ -134,7 +134,7 @@ static XIntc xInterruptController;
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Place a known value at the bottom of the stack for debugging. */ /* Place a known value at the bottom of the stack for debugging. */
*pxTopOfStack = 0xDEADBEEF; *pxTopOfStack = 0xDEADBEEF;

View File

@ -134,7 +134,7 @@ static XIntc xInterruptController;
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Place a known value at the bottom of the stack for debugging. */ /* Place a known value at the bottom of the stack for debugging. */
*pxTopOfStack = 0xDEADBEEF; *pxTopOfStack = 0xDEADBEEF;

View File

@ -192,7 +192,7 @@ static const uint32_t ulMatchValueForOneTick = ( ( configPERIPHERAL_CLOCK_HZ / p
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Offset to end up on 8 byte boundary. */ /* Offset to end up on 8 byte boundary. */
pxTopOfStack--; pxTopOfStack--;

View File

@ -121,7 +121,7 @@ extern void *pxCurrentTCB;
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* R0 is not included as it is the stack pointer. */ /* R0 is not included as it is the stack pointer. */

View File

@ -101,7 +101,7 @@ static void prvSetupTimerInterrupt( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -133,7 +133,7 @@ static const uint32_t ulCompareMatchValue = ( configPERIPHERAL_CLOCK_HZ / config
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint32_t *pulUpperCSA = NULL; uint32_t *pulUpperCSA = NULL;
uint32_t *pulLowerCSA = NULL; uint32_t *pulLowerCSA = NULL;

View File

@ -119,7 +119,7 @@ static void prvSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint32_t *pulLocal; uint32_t *pulLocal;

View File

@ -189,7 +189,7 @@ uint32_t ulPortInterruptNesting = 0UL;
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Setup the initial stack of the task. The stack is set exactly as /* Setup the initial stack of the task. The stack is set exactly as
expected by the portRESTORE_CONTEXT() macro. expected by the portRESTORE_CONTEXT() macro.

View File

@ -124,7 +124,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -198,7 +198,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -206,7 +206,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -108,7 +108,7 @@ extern void vPortStart( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint16_t usAddress; uint16_t usAddress;
StackType_t *pxTopOfHardwareStack; StackType_t *pxTopOfHardwareStack;

View File

@ -267,7 +267,7 @@ void vPortExitCritical( void )
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Setup the initial stack of the task. The stack is set exactly as /* Setup the initial stack of the task. The stack is set exactly as
expected by the portRESTORE_CONTEXT() macro. */ expected by the portRESTORE_CONTEXT() macro. */

View File

@ -109,7 +109,7 @@ uint32_t ulCriticalNesting = ( uint32_t ) 9999;
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -124,7 +124,7 @@ uint32_t ulCriticalNesting = ( uint32_t ) 9999;
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -133,7 +133,7 @@ uint32_t ulCriticalNesting = ( uint32_t ) 9999;
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -107,7 +107,7 @@ void vPortSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* /*
Place a few bytes of known values on the bottom of the stack. Place a few bytes of known values on the bottom of the stack.

View File

@ -107,7 +107,7 @@ void vPortSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint16_t *pusTopOfStack; uint16_t *pusTopOfStack;
uint32_t *pulTopOfStack; uint32_t *pulTopOfStack;

View File

@ -128,7 +128,7 @@ extern void vPortStartFirstTask( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint32_t *pulLocal; uint32_t *pulLocal;

View File

@ -180,7 +180,7 @@ static const uint32_t ulMatchValueForOneTick = ( ( configPERIPHERAL_CLOCK_HZ / p
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Offset to end up on 8 byte boundary. */ /* Offset to end up on 8 byte boundary. */
pxTopOfStack--; pxTopOfStack--;

View File

@ -107,7 +107,7 @@ extern void *pxCurrentTCB;
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* R0 is not included as it is the stack pointer. */ /* R0 is not included as it is the stack pointer. */

View File

@ -113,7 +113,7 @@ void vPortPreemptiveTick( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -108,7 +108,7 @@ __arm void vPortPreemptiveTick( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -153,7 +153,7 @@ static void prvDefaultHandler( void );
* *
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -90,7 +90,7 @@ volatile StackType_t usCriticalNesting = portINITIAL_CRITICAL_NESTING;
static void prvSetupTimerInterrupt( void ); static void prvSetupTimerInterrupt( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
*pxTopOfStack = ( StackType_t ) pxCode; /* Task function start address */ *pxTopOfStack = ( StackType_t ) pxCode; /* Task function start address */
pxTopOfStack--; pxTopOfStack--;

View File

@ -380,7 +380,7 @@ static void prvLowInterrupt( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint32_t ulAddress; uint32_t ulAddress;
uint8_t ucBlock; uint8_t ucBlock;

View File

@ -194,7 +194,7 @@ void vApplicationSetupTickTimerInterrupt( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint16_t usCode; uint16_t usCode;
UBaseType_t i; UBaseType_t i;

View File

@ -195,7 +195,7 @@ const StackType_t * const xISRStackTop = &( xISRStack[ configISR_STACK_SIZE - 7
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Ensure byte alignment is maintained when leaving this function. */ /* Ensure byte alignment is maintained when leaving this function. */
pxTopOfStack--; pxTopOfStack--;

View File

@ -201,7 +201,7 @@ const StackType_t * const xISRStackTop = &( xISRStack[ configISR_STACK_SIZE - 7
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Ensure byte alignment is maintained when leaving this function. */ /* Ensure byte alignment is maintained when leaving this function. */
pxTopOfStack--; pxTopOfStack--;

View File

@ -237,7 +237,7 @@ TIMECAPS xTimeCaps;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
xThreadState *pxThreadState = NULL; xThreadState *pxThreadState = NULL;
int8_t *pcTopOfStack = ( int8_t * ) pxTopOfStack; int8_t *pcTopOfStack = ( int8_t * ) pxTopOfStack;

View File

@ -113,7 +113,7 @@ static void __interrupt __far prvDummyISR( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* See header file for description. */ /* See header file for description. */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t DS_Reg = 0; StackType_t DS_Reg = 0;

View File

@ -110,7 +110,7 @@ static void __interrupt __far prvYieldProcessor( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* See header file for description. */ /* See header file for description. */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t DS_Reg = 0; StackType_t DS_Reg = 0;

View File

@ -119,7 +119,7 @@ extern __asm void vPortStartFirstTask( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t *pxOriginalTOS; StackType_t *pxOriginalTOS;

View File

@ -228,7 +228,7 @@ uint32_t ulPortInterruptNesting = 0UL;
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Setup the initial stack of the task. The stack is set exactly as /* Setup the initial stack of the task. The stack is set exactly as
expected by the portRESTORE_CONTEXT() macro. expected by the portRESTORE_CONTEXT() macro.

View File

@ -121,7 +121,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -206,7 +206,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -216,7 +216,7 @@ static void prvTaskExitError( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -199,7 +199,7 @@ static const uint32_t ulMatchValueForOneTick = ( ( configPERIPHERAL_CLOCK_HZ / p
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Offset to end up on 8 byte boundary. */ /* Offset to end up on 8 byte boundary. */
pxTopOfStack--; pxTopOfStack--;

View File

@ -126,7 +126,7 @@ extern void vTaskSwitchContext( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Offset to end up on 8 byte boundary. */ /* Offset to end up on 8 byte boundary. */
pxTopOfStack--; pxTopOfStack--;

View File

@ -127,7 +127,7 @@ extern void vTaskSwitchContext( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* R0 is not included as it is the stack pointer. */ /* R0 is not included as it is the stack pointer. */

View File

@ -109,7 +109,7 @@ extern uint32_t ulPortGetGBR( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Mark the end of the stack - used for debugging only and can be removed. */ /* Mark the end of the stack - used for debugging only and can be removed. */
*pxTopOfStack = 0x11111111UL; *pxTopOfStack = 0x11111111UL;

View File

@ -107,7 +107,7 @@ void prvSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* /*
Place a few bytes of known values on the bottom of the stack. Place a few bytes of known values on the bottom of the stack.

View File

@ -250,7 +250,7 @@ static void prvSetupTimerInterrupt( void );
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint32_t ulAddress; uint32_t ulAddress;
StackType_t *pxStartOfStack; StackType_t *pxStartOfStack;

View File

@ -143,7 +143,7 @@ static void prvSetupTimerInterrupt( void );
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Place a few bytes of known values on the bottom of the stack. /* Place a few bytes of known values on the bottom of the stack.
This is just useful for debugging. */ This is just useful for debugging. */

View File

@ -298,7 +298,7 @@ _xGet_DTB_PCB_bank:
* *
* See the header file portable.h. * See the header file portable.h.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Place a few bytes of known values on the bottom of the stack. /* Place a few bytes of known values on the bottom of the stack.
This is just useful for debugging. */ This is just useful for debugging. */

View File

@ -136,7 +136,7 @@ const uint32_t ulMaxSyscallInterruptPriorityConst = configMAX_SYSCALL_INTERRUPT_
/* /*
* See header file for description. * See header file for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
/* Simulate the stack frame as it would be created by a context switch /* Simulate the stack frame as it would be created by a context switch
interrupt. */ interrupt. */

View File

@ -143,7 +143,7 @@ register uint8_t ucCriticalNesting = 0x7F;
* Initialise the stack of a new task. * Initialise the stack of a new task.
* See portSAVE_CONTEXT macro for description. * See portSAVE_CONTEXT macro for description.
*/ */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
uint8_t ucScratch; uint8_t ucScratch;
/* /*

View File

@ -88,7 +88,7 @@ Changes from V2.6.1:
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* See header file for description. */ /* See header file for description. */
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{ {
StackType_t DS_Reg = 0, *pxOriginalSP; StackType_t DS_Reg = 0, *pxOriginalSP;

View File

@ -2247,7 +2247,7 @@ BaseType_t xReturn;
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
BaseType_t xQueueAddToSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) BaseType_t xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet )
{ {
BaseType_t xReturn; BaseType_t xReturn;
@ -2280,7 +2280,7 @@ BaseType_t xReturn;
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
BaseType_t xQueueRemoveFromSet( QueueSetMember_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) BaseType_t xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet )
{ {
BaseType_t xReturn; BaseType_t xReturn;
Queue_t * const pxQueueOrSemaphore = ( Queue_t * ) xQueueOrSemaphore; Queue_t * const pxQueueOrSemaphore = ( Queue_t * ) xQueueOrSemaphore;
@ -2316,9 +2316,9 @@ BaseType_t xReturn;
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
QueueSetMember_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t const xBlockTimeTicks ) QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t const xBlockTimeTicks )
{ {
QueueSetMember_t xReturn = NULL; QueueSetMemberHandle_t xReturn = NULL;
( void ) xQueueGenericReceive( ( QueueHandle_t ) xQueueSet, &xReturn, xBlockTimeTicks, pdFALSE ); /*lint !e961 Casting from one typedef to another is not redundant. */ ( void ) xQueueGenericReceive( ( QueueHandle_t ) xQueueSet, &xReturn, xBlockTimeTicks, pdFALSE ); /*lint !e961 Casting from one typedef to another is not redundant. */
return xReturn; return xReturn;
@ -2329,9 +2329,9 @@ BaseType_t xReturn;
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
QueueSetMember_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet ) QueueSetMemberHandle_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet )
{ {
QueueSetMember_t xReturn = NULL; QueueSetMemberHandle_t xReturn = NULL;
( void ) xQueueReceiveFromISR( ( QueueHandle_t ) xQueueSet, &xReturn, NULL ); /*lint !e961 Casting from one typedef to another is not redundant. */ ( void ) xQueueReceiveFromISR( ( QueueHandle_t ) xQueueSet, &xReturn, NULL ); /*lint !e961 Casting from one typedef to another is not redundant. */
return xReturn; return xReturn;

View File

@ -149,7 +149,7 @@ typedef struct tskTaskControlBlock
#endif #endif
#if ( configUSE_APPLICATION_TASK_TAG == 1 ) #if ( configUSE_APPLICATION_TASK_TAG == 1 )
pdTASK_HOOK_CODE pxTaskTag; TaskHookFunction_t pxTaskTag;
#endif #endif
#if ( configGENERATE_RUN_TIME_STATS == 1 ) #if ( configGENERATE_RUN_TIME_STATS == 1 )
@ -492,7 +492,7 @@ static void prvResetNextTaskUnblockTime( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
BaseType_t xTaskGenericCreate( pdTASK_CODE pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
{ {
BaseType_t xReturn; BaseType_t xReturn;
TCB_t * pxNewTCB; TCB_t * pxNewTCB;
@ -1990,7 +1990,7 @@ BaseType_t xSwitchRequired = pdFALSE;
#if ( configUSE_APPLICATION_TASK_TAG == 1 ) #if ( configUSE_APPLICATION_TASK_TAG == 1 )
void vTaskSetApplicationTaskTag( TaskHandle_t xTask, pdTASK_HOOK_CODE pxHookFunction ) void vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction )
{ {
TCB_t *xTCB; TCB_t *xTCB;
@ -2017,10 +2017,10 @@ BaseType_t xSwitchRequired = pdFALSE;
#if ( configUSE_APPLICATION_TASK_TAG == 1 ) #if ( configUSE_APPLICATION_TASK_TAG == 1 )
pdTASK_HOOK_CODE xTaskGetApplicationTaskTag( TaskHandle_t xTask ) TaskHookFunction_t xTaskGetApplicationTaskTag( TaskHandle_t xTask )
{ {
TCB_t *xTCB; TCB_t *xTCB;
pdTASK_HOOK_CODE xReturn; TaskHookFunction_t xReturn;
/* If xTask is NULL then we are setting our own task hook. */ /* If xTask is NULL then we are setting our own task hook. */
if( xTask == NULL ) if( xTask == NULL )

View File

@ -76,8 +76,8 @@ task.h is included from an application file. */
#include "queue.h" #include "queue.h"
#include "timers.h" #include "timers.h"
#if ( INCLUDE_xTimerPendCallbackFromISR == 1 ) && ( configUSE_TIMERS == 0 ) #if ( INCLUDE_xTimerPendFunctionCallFromISR == 1 ) && ( configUSE_TIMERS == 0 )
#error configUSE_TIMERS must be set to 1 to make the INCLUDE_xTimerPendCallbackFromISR() function available. #error configUSE_TIMERS must be set to 1 to make the INCLUDE_xTimerPendFunctionCallFromISR() function available.
#endif #endif
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the /* Lint e961 and e750 are suppressed as a MISRA exception justified because the
@ -104,7 +104,7 @@ typedef struct tmrTimerControl
TickType_t xTimerPeriodInTicks;/*<< How quickly and often the timer expires. */ TickType_t xTimerPeriodInTicks;/*<< How quickly and often the timer expires. */
UBaseType_t uxAutoReload; /*<< Set to pdTRUE if the timer should be automatically restarted once expired. Set to pdFALSE if the timer is, in effect, a one-shot timer. */ UBaseType_t uxAutoReload; /*<< Set to pdTRUE if the timer should be automatically restarted once expired. Set to pdFALSE if the timer is, in effect, a one-shot timer. */
void *pvTimerID; /*<< An ID to identify the timer. This allows the timer to be identified when the same callback is used for multiple timers. */ void *pvTimerID; /*<< An ID to identify the timer. This allows the timer to be identified when the same callback is used for multiple timers. */
tmrTIMER_CALLBACK pxCallbackFunction; /*<< The function that will be called when the timer expires. */ TimerCallbackFunction_t pxCallbackFunction; /*<< The function that will be called when the timer expires. */
} Timer_t; } Timer_t;
/* The definition of messages that can be sent and received on the timer queue. /* The definition of messages that can be sent and received on the timer queue.
@ -121,7 +121,7 @@ typedef struct tmrTimerParameters
typedef struct tmrCallbackParameters typedef struct tmrCallbackParameters
{ {
pdAPPLICATION_CALLBACK_CODE pxCallbackFunction; /* << The callback function to execute. */ PendedFunction_t pxCallbackFunction; /* << The callback function to execute. */
void *pvParameter1; /* << The value that will be used as the callback functions first parameter. */ void *pvParameter1; /* << The value that will be used as the callback functions first parameter. */
uint32_t ulParameter2; /* << The value that will be used as the callback functions second parameter. */ uint32_t ulParameter2; /* << The value that will be used as the callback functions second parameter. */
} CallbackParameters_t; } CallbackParameters_t;
@ -137,9 +137,9 @@ typedef struct tmrTimerQueueMessage
/* Don't include xCallbackParameters if it is not going to be used as /* Don't include xCallbackParameters if it is not going to be used as
it makes the structure (and therefore the timer queue) larger. */ it makes the structure (and therefore the timer queue) larger. */
#if ( INCLUDE_xTimerPendCallbackFromISR == 1 ) #if ( INCLUDE_xTimerPendFunctionCallFromISR == 1 )
CallbackParameters_t xCallbackParameters; CallbackParameters_t xCallbackParameters;
#endif /* INCLUDE_xTimerPendCallbackFromISR */ #endif /* INCLUDE_xTimerPendFunctionCallFromISR */
} u; } u;
} DaemonTaskMessage_t; } DaemonTaskMessage_t;
@ -261,7 +261,7 @@ BaseType_t xReturn = pdFAIL;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
{ {
Timer_t *pxNewTimer; Timer_t *pxNewTimer;
@ -572,7 +572,7 @@ TickType_t xTimeNow;
while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
{ {
#if ( INCLUDE_xTimerPendCallbackFromISR == 1 ) #if ( INCLUDE_xTimerPendFunctionCallFromISR == 1 )
{ {
if( xMessage.xMessageID == tmrCOMMAND_EXECUTE_CALLBACK ) if( xMessage.xMessageID == tmrCOMMAND_EXECUTE_CALLBACK )
{ {
@ -590,7 +590,7 @@ TickType_t xTimeNow;
mtCOVERAGE_TEST_MARKER(); mtCOVERAGE_TEST_MARKER();
} }
} }
#endif /* INCLUDE_xTimerPendCallbackFromISR */ #endif /* INCLUDE_xTimerPendFunctionCallFromISR */
if( xMessage.xMessageID != tmrCOMMAND_EXECUTE_CALLBACK ) if( xMessage.xMessageID != tmrCOMMAND_EXECUTE_CALLBACK )
{ {
@ -803,9 +803,9 @@ Timer_t * const pxTimer = ( Timer_t * ) xTimer;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#if( INCLUDE_xTimerPendCallbackFromISR == 1 ) #if( INCLUDE_xTimerPendFunctionCallFromISR == 1 )
BaseType_t xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackFunction, void *pvParameter1, uint32_t ulParameter2, BaseType_t *pxHigherPriorityTaskWoken ) BaseType_t xTimerPendFunctionCallFromISR( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, BaseType_t *pxHigherPriorityTaskWoken )
{ {
DaemonTaskMessage_t xMessage; DaemonTaskMessage_t xMessage;
BaseType_t xReturn; BaseType_t xReturn;
@ -813,7 +813,7 @@ Timer_t * const pxTimer = ( Timer_t * ) xTimer;
/* Complete the message with the function parameters and post it to the /* Complete the message with the function parameters and post it to the
daemon task. */ daemon task. */
xMessage.xMessageID = tmrCOMMAND_EXECUTE_CALLBACK; xMessage.xMessageID = tmrCOMMAND_EXECUTE_CALLBACK;
xMessage.u.xCallbackParameters.pxCallbackFunction = pvCallbackFunction; xMessage.u.xCallbackParameters.pxCallbackFunction = xFunctionToPend;
xMessage.u.xCallbackParameters.pvParameter1 = pvParameter1; xMessage.u.xCallbackParameters.pvParameter1 = pvParameter1;
xMessage.u.xCallbackParameters.ulParameter2 = ulParameter2; xMessage.u.xCallbackParameters.ulParameter2 = ulParameter2;
@ -822,7 +822,7 @@ Timer_t * const pxTimer = ( Timer_t * ) xTimer;
return xReturn; return xReturn;
} }
#endif /* INCLUDE_xTimerPendCallbackFromISR */ #endif /* INCLUDE_xTimerPendFunctionCallFromISR */
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* This entire source file will be skipped if the application is not configured /* This entire source file will be skipped if the application is not configured