mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 13:01:57 -04:00
Add Trace Hook Macros to all API calls (#786)
This pull-request adds out-of-the-box support for different tracing tools. New trace hook macros have been added for all public API functions, one for each function entry and one for each exit. There are no functional changes, as the macros are by default empty. For more information see following forum post: https://forums.freertos.org/t/add-tracing-functionality-for-all-api-calls/18007.
This commit is contained in:
parent
15e0364968
commit
83861f5b1d
16
croutine.c
16
croutine.c
|
@ -107,6 +107,8 @@
|
|||
BaseType_t xReturn;
|
||||
CRCB_t * pxCoRoutine;
|
||||
|
||||
traceENTER_xCoRoutineCreate( pxCoRoutineCode, uxPriority, uxIndex );
|
||||
|
||||
/* Allocate the memory that will store the co-routine control block. */
|
||||
pxCoRoutine = ( CRCB_t * ) pvPortMalloc( sizeof( CRCB_t ) );
|
||||
|
||||
|
@ -156,6 +158,8 @@
|
|||
xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
|
||||
}
|
||||
|
||||
traceRETURN_xCoRoutineCreate( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -165,6 +169,8 @@
|
|||
{
|
||||
TickType_t xTimeToWake;
|
||||
|
||||
traceENTER_vCoRoutineAddToDelayedList( xTicksToDelay, pxEventList );
|
||||
|
||||
/* Calculate the time to wake - this may overflow but this is
|
||||
* not a problem. */
|
||||
xTimeToWake = xCoRoutineTickCount + xTicksToDelay;
|
||||
|
@ -196,6 +202,8 @@
|
|||
* function must be called with interrupts disabled. */
|
||||
vListInsert( pxEventList, &( pxCurrentCoRoutine->xEventListItem ) );
|
||||
}
|
||||
|
||||
traceRETURN_vCoRoutineAddToDelayedList();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -283,6 +291,8 @@
|
|||
|
||||
void vCoRoutineSchedule( void )
|
||||
{
|
||||
traceENTER_vCoRoutineSchedule();
|
||||
|
||||
/* Only run a co-routine after prvInitialiseCoRoutineLists() has been
|
||||
* called. prvInitialiseCoRoutineLists() is called automatically when a
|
||||
* co-routine is created. */
|
||||
|
@ -313,6 +323,8 @@
|
|||
/* Call the co-routine. */
|
||||
( pxCurrentCoRoutine->pxCoRoutineFunction )( pxCurrentCoRoutine, pxCurrentCoRoutine->uxIndex );
|
||||
}
|
||||
|
||||
traceRETURN_vCoRoutineSchedule();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -341,6 +353,8 @@
|
|||
CRCB_t * pxUnblockedCRCB;
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xCoRoutineRemoveFromEventList( pxEventList );
|
||||
|
||||
/* This function is called from within an interrupt. It can only access
|
||||
* event lists and the pending ready list. This function assumes that a
|
||||
* check has already been made to ensure pxEventList is not empty. */
|
||||
|
@ -357,6 +371,8 @@
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xCoRoutineRemoveFromEventList( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
{
|
||||
EventGroup_t * pxEventBits;
|
||||
|
||||
traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer );
|
||||
|
||||
/* A StaticEventGroup_t object must be provided. */
|
||||
configASSERT( pxEventGroupBuffer );
|
||||
|
||||
|
@ -122,6 +124,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
traceEVENT_GROUP_CREATE_FAILED();
|
||||
}
|
||||
|
||||
traceRETURN_xEventGroupCreateStatic( pxEventBits );
|
||||
|
||||
return pxEventBits;
|
||||
}
|
||||
|
||||
|
@ -134,6 +138,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
{
|
||||
EventGroup_t * pxEventBits;
|
||||
|
||||
traceENTER_xEventGroupCreate();
|
||||
|
||||
/* Allocate the event group. Justification for MISRA deviation as
|
||||
* follows: pvPortMalloc() always ensures returned memory blocks are
|
||||
* aligned per the requirements of the MCU stack. In this case
|
||||
|
@ -170,6 +176,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
traceEVENT_GROUP_CREATE_FAILED(); /*lint !e9063 Else branch only exists to allow tracing and does not generate code if trace macros are not defined. */
|
||||
}
|
||||
|
||||
traceRETURN_xEventGroupCreate( pxEventBits );
|
||||
|
||||
return pxEventBits;
|
||||
}
|
||||
|
||||
|
@ -186,6 +194,8 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
|
|||
BaseType_t xAlreadyYielded;
|
||||
BaseType_t xTimeoutOccurred = pdFALSE;
|
||||
|
||||
traceENTER_xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
|
||||
|
||||
configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
|
||||
configASSERT( uxBitsToWaitFor != 0 );
|
||||
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
|
||||
|
@ -303,6 +313,8 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
|
|||
/* Prevent compiler warnings when trace macros are not used. */
|
||||
( void ) xTimeoutOccurred;
|
||||
|
||||
traceRETURN_xEventGroupSync( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -318,6 +330,8 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
|
|||
BaseType_t xWaitConditionMet, xAlreadyYielded;
|
||||
BaseType_t xTimeoutOccurred = pdFALSE;
|
||||
|
||||
traceENTER_xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
|
||||
|
||||
/* Check the user is not attempting to wait on the bits used by the kernel
|
||||
* itself, and that at least one bit is being requested. */
|
||||
configASSERT( xEventGroup );
|
||||
|
@ -467,6 +481,8 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
|
|||
/* Prevent compiler warnings when trace macros are not used. */
|
||||
( void ) xTimeoutOccurred;
|
||||
|
||||
traceRETURN_xEventGroupWaitBits( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -477,6 +493,8 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
|
|||
EventGroup_t * pxEventBits = xEventGroup;
|
||||
EventBits_t uxReturn;
|
||||
|
||||
traceENTER_xEventGroupClearBits( xEventGroup, uxBitsToClear );
|
||||
|
||||
/* Check the user is not attempting to clear the bits used by the kernel
|
||||
* itself. */
|
||||
configASSERT( xEventGroup );
|
||||
|
@ -495,6 +513,8 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xEventGroupClearBits( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -506,9 +526,13 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
|
|||
{
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xEventGroupClearBitsFromISR( xEventGroup, uxBitsToClear );
|
||||
|
||||
traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear );
|
||||
xReturn = xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToClear, NULL ); /*lint !e9087 Can't avoid cast to void* as a generic callback function not specific to this use case. Callback casts back to original type so safe. */
|
||||
|
||||
traceRETURN_xEventGroupClearBitsFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -521,12 +545,16 @@ EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
|
|||
EventGroup_t const * const pxEventBits = xEventGroup;
|
||||
EventBits_t uxReturn;
|
||||
|
||||
traceENTER_xEventGroupGetBitsFromISR( xEventGroup );
|
||||
|
||||
uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();
|
||||
{
|
||||
uxReturn = pxEventBits->uxEventBits;
|
||||
}
|
||||
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
traceRETURN_xEventGroupGetBitsFromISR( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -542,6 +570,8 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
|||
EventGroup_t * pxEventBits = xEventGroup;
|
||||
BaseType_t xMatchFound = pdFALSE;
|
||||
|
||||
traceENTER_xEventGroupSetBits( xEventGroup, uxBitsToSet );
|
||||
|
||||
/* Check the user is not attempting to set the bits used by the kernel
|
||||
* itself. */
|
||||
configASSERT( xEventGroup );
|
||||
|
@ -623,6 +653,8 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
|||
}
|
||||
( void ) xTaskResumeAll();
|
||||
|
||||
traceRETURN_xEventGroupSetBits( pxEventBits->uxEventBits );
|
||||
|
||||
return pxEventBits->uxEventBits;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -632,6 +664,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
|||
EventGroup_t * pxEventBits = xEventGroup;
|
||||
const List_t * pxTasksWaitingForBits;
|
||||
|
||||
traceENTER_vEventGroupDelete( xEventGroup );
|
||||
|
||||
configASSERT( pxEventBits );
|
||||
|
||||
pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
|
||||
|
@ -670,6 +704,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
|||
}
|
||||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
|
||||
traceRETURN_vEventGroupDelete();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -680,6 +716,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
|||
BaseType_t xReturn;
|
||||
EventGroup_t * pxEventBits = xEventGroup;
|
||||
|
||||
traceENTER_xEventGroupGetStaticBuffer( xEventGroup, ppxEventGroupBuffer );
|
||||
|
||||
configASSERT( pxEventBits );
|
||||
configASSERT( ppxEventGroupBuffer );
|
||||
|
||||
|
@ -704,6 +742,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
|||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
|
||||
traceRETURN_xEventGroupGetStaticBuffer( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
|
@ -714,7 +754,11 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
|||
void vEventGroupSetBitsCallback( void * pvEventGroup,
|
||||
const uint32_t ulBitsToSet )
|
||||
{
|
||||
traceENTER_vEventGroupSetBitsCallback( pvEventGroup, ulBitsToSet );
|
||||
|
||||
( void ) xEventGroupSetBits( pvEventGroup, ( EventBits_t ) ulBitsToSet ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
|
||||
|
||||
traceRETURN_vEventGroupSetBitsCallback();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -723,7 +767,11 @@ void vEventGroupSetBitsCallback( void * pvEventGroup,
|
|||
void vEventGroupClearBitsCallback( void * pvEventGroup,
|
||||
const uint32_t ulBitsToClear )
|
||||
{
|
||||
traceENTER_vEventGroupClearBitsCallback( pvEventGroup, ulBitsToClear );
|
||||
|
||||
( void ) xEventGroupClearBits( pvEventGroup, ( EventBits_t ) ulBitsToClear ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
|
||||
|
||||
traceRETURN_vEventGroupClearBitsCallback();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -772,9 +820,13 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
{
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken );
|
||||
|
||||
traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet );
|
||||
xReturn = xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken ); /*lint !e9087 Can't avoid cast to void* as a generic callback function not specific to this use case. Callback casts back to original type so safe. */
|
||||
|
||||
traceRETURN_xEventGroupSetBitsFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -788,6 +840,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
UBaseType_t xReturn;
|
||||
EventGroup_t const * pxEventBits = ( EventGroup_t * ) xEventGroup; /*lint !e9087 !e9079 EventGroupHandle_t is a pointer to an EventGroup_t, but EventGroupHandle_t is kept opaque outside of this file for data hiding purposes. */
|
||||
|
||||
traceENTER_uxEventGroupGetNumber( xEventGroup );
|
||||
|
||||
if( xEventGroup == NULL )
|
||||
{
|
||||
xReturn = 0;
|
||||
|
@ -797,6 +851,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
xReturn = pxEventBits->uxEventGroupNumber;
|
||||
}
|
||||
|
||||
traceRETURN_uxEventGroupGetNumber( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -808,7 +864,11 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
|
|||
void vEventGroupSetNumber( void * xEventGroup,
|
||||
UBaseType_t uxEventGroupNumber )
|
||||
{
|
||||
traceENTER_vEventGroupSetNumber( xEventGroup, uxEventGroupNumber );
|
||||
|
||||
( ( EventGroup_t * ) xEventGroup )->uxEventGroupNumber = uxEventGroupNumber; /*lint !e9087 !e9079 EventGroupHandle_t is a pointer to an EventGroup_t, but EventGroupHandle_t is kept opaque outside of this file for data hiding purposes. */
|
||||
|
||||
traceRETURN_vEventGroupSetNumber();
|
||||
}
|
||||
|
||||
#endif /* configUSE_TRACE_FACILITY */
|
||||
|
|
1536
include/FreeRTOS.h
1536
include/FreeRTOS.h
File diff suppressed because it is too large
Load diff
26
list.c
26
list.c
|
@ -49,6 +49,8 @@
|
|||
|
||||
void vListInitialise( List_t * const pxList )
|
||||
{
|
||||
traceENTER_vListInitialise( pxList );
|
||||
|
||||
/* The list structure contains a list item which is used to mark the
|
||||
* end of the list. To initialise the list the list end is inserted
|
||||
* as the only list entry. */
|
||||
|
@ -80,11 +82,15 @@ void vListInitialise( List_t * const pxList )
|
|||
* configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
||||
listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList );
|
||||
listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList );
|
||||
|
||||
traceRETURN_vListInitialise();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vListInitialiseItem( ListItem_t * const pxItem )
|
||||
{
|
||||
traceENTER_vListInitialiseItem( pxItem );
|
||||
|
||||
/* Make sure the list item is not recorded as being on a list. */
|
||||
pxItem->pxContainer = NULL;
|
||||
|
||||
|
@ -92,6 +98,8 @@ void vListInitialiseItem( ListItem_t * const pxItem )
|
|||
* configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
||||
listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
|
||||
listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
|
||||
|
||||
traceRETURN_vListInitialiseItem();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -100,6 +108,8 @@ void vListInsertEnd( List_t * const pxList,
|
|||
{
|
||||
ListItem_t * const pxIndex = pxList->pxIndex;
|
||||
|
||||
traceENTER_vListInsertEnd( pxList, pxNewListItem );
|
||||
|
||||
/* Only effective when configASSERT() is also defined, these tests may catch
|
||||
* the list data structures being overwritten in memory. They will not catch
|
||||
* data errors caused by incorrect configuration or use of FreeRTOS. */
|
||||
|
@ -122,6 +132,8 @@ void vListInsertEnd( List_t * const pxList,
|
|||
pxNewListItem->pxContainer = pxList;
|
||||
|
||||
( pxList->uxNumberOfItems )++;
|
||||
|
||||
traceRETURN_vListInsertEnd();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -131,6 +143,8 @@ void vListInsert( List_t * const pxList,
|
|||
ListItem_t * pxIterator;
|
||||
const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
|
||||
|
||||
traceENTER_vListInsert( pxList, pxNewListItem );
|
||||
|
||||
/* Only effective when configASSERT() is also defined, these tests may catch
|
||||
* the list data structures being overwritten in memory. They will not catch
|
||||
* data errors caused by incorrect configuration or use of FreeRTOS. */
|
||||
|
@ -193,15 +207,21 @@ void vListInsert( List_t * const pxList,
|
|||
pxNewListItem->pxContainer = pxList;
|
||||
|
||||
( pxList->uxNumberOfItems )++;
|
||||
|
||||
traceRETURN_vListInsert();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
|
||||
{
|
||||
/* The list item knows which list it is in. Obtain the list from the list
|
||||
* item. */
|
||||
/* The list item knows which list it is in. Obtain the list from the list
|
||||
* item. */
|
||||
List_t * const pxList = pxItemToRemove->pxContainer;
|
||||
|
||||
traceENTER_uxListRemove( pxItemToRemove );
|
||||
|
||||
|
||||
|
||||
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
|
||||
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
|
||||
|
||||
|
@ -221,6 +241,8 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
|
|||
pxItemToRemove->pxContainer = NULL;
|
||||
( pxList->uxNumberOfItems )--;
|
||||
|
||||
traceRETURN_uxListRemove( pxList->uxNumberOfItems );
|
||||
|
||||
return pxList->uxNumberOfItems;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
201
queue.c
201
queue.c
|
@ -303,6 +303,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
BaseType_t xReturn = pdPASS;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueGenericReset( xQueue, xNewQueue );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
|
||||
if( ( pxQueue != NULL ) &&
|
||||
|
@ -360,6 +362,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
|
||||
/* A value is returned for calling semantic consistency with previous
|
||||
* versions. */
|
||||
traceRETURN_xQueueGenericReset( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -374,6 +378,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
{
|
||||
Queue_t * pxNewQueue = NULL;
|
||||
|
||||
traceENTER_xQueueGenericCreateStatic( uxQueueLength, uxItemSize, pucQueueStorage, pxStaticQueue, ucQueueType );
|
||||
|
||||
/* The StaticQueue_t structure and the queue storage area must be
|
||||
* supplied. */
|
||||
configASSERT( pxStaticQueue );
|
||||
|
@ -421,6 +427,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xQueueGenericCreateStatic( pxNewQueue );
|
||||
|
||||
return pxNewQueue;
|
||||
}
|
||||
|
||||
|
@ -436,6 +444,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueGenericGetStaticBuffers( xQueue, ppucQueueStorage, ppxStaticQueue );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( ppxStaticQueue );
|
||||
|
||||
|
@ -470,6 +480,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
|
||||
traceRETURN_xQueueGenericGetStaticBuffers( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -486,6 +498,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
size_t xQueueSizeInBytes;
|
||||
uint8_t * pucQueueStorage;
|
||||
|
||||
traceENTER_xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );
|
||||
|
||||
if( ( uxQueueLength > ( UBaseType_t ) 0 ) &&
|
||||
/* Check for multiplication overflow. */
|
||||
( ( SIZE_MAX / uxQueueLength ) >= uxItemSize ) &&
|
||||
|
@ -538,6 +552,8 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xQueueGenericCreate( pxNewQueue );
|
||||
|
||||
return pxNewQueue;
|
||||
}
|
||||
|
||||
|
@ -627,9 +643,13 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
QueueHandle_t xNewQueue;
|
||||
const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0;
|
||||
|
||||
traceENTER_xQueueCreateMutex( ucQueueType );
|
||||
|
||||
xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType );
|
||||
prvInitialiseMutex( ( Queue_t * ) xNewQueue );
|
||||
|
||||
traceRETURN_xQueueCreateMutex( xNewQueue );
|
||||
|
||||
return xNewQueue;
|
||||
}
|
||||
|
||||
|
@ -644,6 +664,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
QueueHandle_t xNewQueue;
|
||||
const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0;
|
||||
|
||||
traceENTER_xQueueCreateMutexStatic( ucQueueType, pxStaticQueue );
|
||||
|
||||
/* Prevent compiler warnings about unused parameters if
|
||||
* configUSE_TRACE_FACILITY does not equal 1. */
|
||||
( void ) ucQueueType;
|
||||
|
@ -651,6 +673,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
xNewQueue = xQueueGenericCreateStatic( uxMutexLength, uxMutexSize, NULL, pxStaticQueue, ucQueueType );
|
||||
prvInitialiseMutex( ( Queue_t * ) xNewQueue );
|
||||
|
||||
traceRETURN_xQueueCreateMutexStatic( xNewQueue );
|
||||
|
||||
return xNewQueue;
|
||||
}
|
||||
|
||||
|
@ -664,6 +688,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
TaskHandle_t pxReturn;
|
||||
Queue_t * const pxSemaphore = ( Queue_t * ) xSemaphore;
|
||||
|
||||
traceENTER_xQueueGetMutexHolder( xSemaphore );
|
||||
|
||||
configASSERT( xSemaphore );
|
||||
|
||||
/* This function is called by xSemaphoreGetMutexHolder(), and should not
|
||||
|
@ -684,6 +710,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xQueueGetMutexHolder( pxReturn );
|
||||
|
||||
return pxReturn;
|
||||
} /*lint !e818 xSemaphore cannot be a pointer to const because it is a typedef. */
|
||||
|
||||
|
@ -696,6 +724,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
{
|
||||
TaskHandle_t pxReturn;
|
||||
|
||||
traceENTER_xQueueGetMutexHolderFromISR( xSemaphore );
|
||||
|
||||
configASSERT( xSemaphore );
|
||||
|
||||
/* Mutexes cannot be used in interrupt service routines, so the mutex
|
||||
|
@ -710,6 +740,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
pxReturn = NULL;
|
||||
}
|
||||
|
||||
traceRETURN_xQueueGetMutexHolderFromISR( pxReturn );
|
||||
|
||||
return pxReturn;
|
||||
} /*lint !e818 xSemaphore cannot be a pointer to const because it is a typedef. */
|
||||
|
||||
|
@ -723,6 +755,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxMutex = ( Queue_t * ) xMutex;
|
||||
|
||||
traceENTER_xQueueGiveMutexRecursive( xMutex );
|
||||
|
||||
configASSERT( pxMutex );
|
||||
|
||||
/* If this is the task that holds the mutex then xMutexHolder will not
|
||||
|
@ -765,6 +799,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex );
|
||||
}
|
||||
|
||||
traceRETURN_xQueueGiveMutexRecursive( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -779,6 +815,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxMutex = ( Queue_t * ) xMutex;
|
||||
|
||||
traceENTER_xQueueTakeMutexRecursive( xMutex, xTicksToWait );
|
||||
|
||||
configASSERT( pxMutex );
|
||||
|
||||
/* Comments regarding mutual exclusion as per those within
|
||||
|
@ -808,6 +846,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
}
|
||||
}
|
||||
|
||||
traceRETURN_xQueueTakeMutexRecursive( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -822,6 +862,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
{
|
||||
QueueHandle_t xHandle = NULL;
|
||||
|
||||
traceENTER_xQueueCreateCountingSemaphoreStatic( uxMaxCount, uxInitialCount, pxStaticQueue );
|
||||
|
||||
if( ( uxMaxCount != 0 ) &&
|
||||
( uxInitialCount <= uxMaxCount ) )
|
||||
{
|
||||
|
@ -844,6 +886,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xQueueCreateCountingSemaphoreStatic( xHandle );
|
||||
|
||||
return xHandle;
|
||||
}
|
||||
|
||||
|
@ -857,6 +901,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
{
|
||||
QueueHandle_t xHandle = NULL;
|
||||
|
||||
traceENTER_xQueueCreateCountingSemaphore( uxMaxCount, uxInitialCount );
|
||||
|
||||
if( ( uxMaxCount != 0 ) &&
|
||||
( uxInitialCount <= uxMaxCount ) )
|
||||
{
|
||||
|
@ -879,6 +925,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xQueueCreateCountingSemaphore( xHandle );
|
||||
|
||||
return xHandle;
|
||||
}
|
||||
|
||||
|
@ -894,6 +942,8 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
TimeOut_t xTimeOut;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueGenericSend( xQueue, pvItemToQueue, xTicksToWait, xCopyPosition );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
||||
|
@ -1015,6 +1065,9 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
#endif /* configUSE_QUEUE_SETS */
|
||||
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xQueueGenericSend( pdPASS );
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
else
|
||||
|
@ -1028,6 +1081,8 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
/* Return to the original privilege level before exiting
|
||||
* the function. */
|
||||
traceQUEUE_SEND_FAILED( pxQueue );
|
||||
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
||||
|
||||
return errQUEUE_FULL;
|
||||
}
|
||||
else if( xEntryTimeSet == pdFALSE )
|
||||
|
@ -1099,6 +1154,8 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
( void ) xTaskResumeAll();
|
||||
|
||||
traceQUEUE_SEND_FAILED( pxQueue );
|
||||
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
||||
|
||||
return errQUEUE_FULL;
|
||||
}
|
||||
} /*lint -restore */
|
||||
|
@ -1114,6 +1171,8 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
|||
UBaseType_t uxSavedInterruptStatus;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueGenericSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken, xCopyPosition );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
||||
|
@ -1266,6 +1325,8 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
|||
}
|
||||
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
traceRETURN_xQueueGenericSendFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1277,6 +1338,8 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
|||
UBaseType_t uxSavedInterruptStatus;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueGiveFromISR( xQueue, pxHigherPriorityTaskWoken );
|
||||
|
||||
/* Similar to xQueueGenericSendFromISR() but used with semaphores where the
|
||||
* item size is 0. Don't directly wake a task that was blocked on a queue
|
||||
* read, instead return a flag to say whether a context switch is required or
|
||||
|
@ -1432,6 +1495,8 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
|||
}
|
||||
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
traceRETURN_xQueueGiveFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1444,6 +1509,8 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||
TimeOut_t xTimeOut;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueReceive( xQueue, pvBuffer, xTicksToWait );
|
||||
|
||||
/* Check the pointer is not NULL. */
|
||||
configASSERT( ( pxQueue ) );
|
||||
|
||||
|
@ -1496,6 +1563,9 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||
}
|
||||
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xQueueReceive( pdPASS );
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
else
|
||||
|
@ -1505,7 +1575,10 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||
/* The queue was empty and no block time is specified (or
|
||||
* the block time has expired) so leave now. */
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
||||
traceRETURN_xQueueReceive( errQUEUE_EMPTY );
|
||||
|
||||
return errQUEUE_EMPTY;
|
||||
}
|
||||
else if( xEntryTimeSet == pdFALSE )
|
||||
|
@ -1576,6 +1649,8 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
||||
{
|
||||
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
||||
traceRETURN_xQueueReceive( errQUEUE_EMPTY );
|
||||
|
||||
return errQUEUE_EMPTY;
|
||||
}
|
||||
else
|
||||
|
@ -1598,6 +1673,8 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
|
|||
BaseType_t xInheritanceOccurred = pdFALSE;
|
||||
#endif
|
||||
|
||||
traceENTER_xQueueSemaphoreTake( xQueue, xTicksToWait );
|
||||
|
||||
/* Check the queue pointer is not NULL. */
|
||||
configASSERT( ( pxQueue ) );
|
||||
|
||||
|
@ -1667,6 +1744,9 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
|
|||
}
|
||||
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xQueueSemaphoreTake( pdPASS );
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
else
|
||||
|
@ -1676,7 +1756,10 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
|
|||
/* The semaphore count was 0 and no block time is specified
|
||||
* (or the block time has expired) so exit now. */
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
||||
traceRETURN_xQueueSemaphoreTake( errQUEUE_EMPTY );
|
||||
|
||||
return errQUEUE_EMPTY;
|
||||
}
|
||||
else if( xEntryTimeSet == pdFALSE )
|
||||
|
@ -1794,6 +1877,8 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
|
|||
#endif /* configUSE_MUTEXES */
|
||||
|
||||
traceQUEUE_RECEIVE_FAILED( pxQueue );
|
||||
traceRETURN_xQueueSemaphoreTake( errQUEUE_EMPTY );
|
||||
|
||||
return errQUEUE_EMPTY;
|
||||
}
|
||||
else
|
||||
|
@ -1814,6 +1899,8 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||
int8_t * pcOriginalReadPosition;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueuePeek( xQueue, pvBuffer, xTicksToWait );
|
||||
|
||||
/* Check the pointer is not NULL. */
|
||||
configASSERT( ( pxQueue ) );
|
||||
|
||||
|
@ -1872,6 +1959,9 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||
}
|
||||
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xQueuePeek( pdPASS );
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
else
|
||||
|
@ -1881,7 +1971,10 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||
/* The queue was empty and no block time is specified (or
|
||||
* the block time has expired) so leave now. */
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceQUEUE_PEEK_FAILED( pxQueue );
|
||||
traceRETURN_xQueuePeek( errQUEUE_EMPTY );
|
||||
|
||||
return errQUEUE_EMPTY;
|
||||
}
|
||||
else if( xEntryTimeSet == pdFALSE )
|
||||
|
@ -1953,6 +2046,8 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
||||
{
|
||||
traceQUEUE_PEEK_FAILED( pxQueue );
|
||||
traceRETURN_xQueuePeek( errQUEUE_EMPTY );
|
||||
|
||||
return errQUEUE_EMPTY;
|
||||
}
|
||||
else
|
||||
|
@ -1972,6 +2067,8 @@ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue,
|
|||
UBaseType_t uxSavedInterruptStatus;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueReceiveFromISR( xQueue, pvBuffer, pxHigherPriorityTaskWoken );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
|
||||
|
@ -2053,6 +2150,8 @@ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue,
|
|||
}
|
||||
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
traceRETURN_xQueueReceiveFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2065,6 +2164,8 @@ BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
|
|||
int8_t * pcOriginalReadPosition;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueuePeekFromISR( xQueue, pvBuffer );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( pxQueue->uxItemSize != 0 ); /* Can't peek a semaphore. */
|
||||
|
@ -2108,6 +2209,8 @@ BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
|
|||
}
|
||||
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
traceRETURN_xQueuePeekFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2116,6 +2219,8 @@ UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue )
|
|||
{
|
||||
UBaseType_t uxReturn;
|
||||
|
||||
traceENTER_uxQueueMessagesWaiting( xQueue );
|
||||
|
||||
configASSERT( xQueue );
|
||||
|
||||
taskENTER_CRITICAL();
|
||||
|
@ -2124,6 +2229,8 @@ UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue )
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_uxQueueMessagesWaiting( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
} /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2133,6 +2240,8 @@ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue )
|
|||
UBaseType_t uxReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_uxQueueSpacesAvailable( xQueue );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
|
||||
taskENTER_CRITICAL();
|
||||
|
@ -2141,6 +2250,8 @@ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue )
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_uxQueueSpacesAvailable( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
} /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2150,9 +2261,13 @@ UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue )
|
|||
UBaseType_t uxReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_uxQueueMessagesWaitingFromISR( xQueue );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
uxReturn = pxQueue->uxMessagesWaiting;
|
||||
|
||||
traceRETURN_uxQueueMessagesWaitingFromISR( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
} /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2161,6 +2276,8 @@ void vQueueDelete( QueueHandle_t xQueue )
|
|||
{
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_vQueueDelete( xQueue );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
traceQUEUE_DELETE( pxQueue );
|
||||
|
||||
|
@ -2196,6 +2313,8 @@ void vQueueDelete( QueueHandle_t xQueue )
|
|||
( void ) pxQueue;
|
||||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
|
||||
traceRETURN_vQueueDelete();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -2203,6 +2322,10 @@ void vQueueDelete( QueueHandle_t xQueue )
|
|||
|
||||
UBaseType_t uxQueueGetQueueNumber( QueueHandle_t xQueue )
|
||||
{
|
||||
traceENTER_uxQueueGetQueueNumber( xQueue );
|
||||
|
||||
traceRETURN_uxQueueGetQueueNumber( ( ( Queue_t * ) xQueue )->uxQueueNumber );
|
||||
|
||||
return ( ( Queue_t * ) xQueue )->uxQueueNumber;
|
||||
}
|
||||
|
||||
|
@ -2214,7 +2337,11 @@ void vQueueDelete( QueueHandle_t xQueue )
|
|||
void vQueueSetQueueNumber( QueueHandle_t xQueue,
|
||||
UBaseType_t uxQueueNumber )
|
||||
{
|
||||
traceENTER_vQueueSetQueueNumber( xQueue, uxQueueNumber );
|
||||
|
||||
( ( Queue_t * ) xQueue )->uxQueueNumber = uxQueueNumber;
|
||||
|
||||
traceRETURN_vQueueSetQueueNumber();
|
||||
}
|
||||
|
||||
#endif /* configUSE_TRACE_FACILITY */
|
||||
|
@ -2224,6 +2351,10 @@ void vQueueDelete( QueueHandle_t xQueue )
|
|||
|
||||
uint8_t ucQueueGetQueueType( QueueHandle_t xQueue )
|
||||
{
|
||||
traceENTER_ucQueueGetQueueType( xQueue );
|
||||
|
||||
traceRETURN_ucQueueGetQueueType( ( ( Queue_t * ) xQueue )->ucQueueType );
|
||||
|
||||
return ( ( Queue_t * ) xQueue )->ucQueueType;
|
||||
}
|
||||
|
||||
|
@ -2232,12 +2363,20 @@ void vQueueDelete( QueueHandle_t xQueue )
|
|||
|
||||
UBaseType_t uxQueueGetQueueItemSize( QueueHandle_t xQueue ) /* PRIVILEGED_FUNCTION */
|
||||
{
|
||||
traceENTER_uxQueueGetQueueItemSize( xQueue );
|
||||
|
||||
traceRETURN_uxQueueGetQueueItemSize( ( ( Queue_t * ) xQueue )->uxItemSize );
|
||||
|
||||
return ( ( Queue_t * ) xQueue )->uxItemSize;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
UBaseType_t uxQueueGetQueueLength( QueueHandle_t xQueue ) /* PRIVILEGED_FUNCTION */
|
||||
{
|
||||
traceENTER_uxQueueGetQueueLength( xQueue );
|
||||
|
||||
traceRETURN_uxQueueGetQueueLength( ( ( Queue_t * ) xQueue )->uxLength );
|
||||
|
||||
return ( ( Queue_t * ) xQueue )->uxLength;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2519,6 +2658,8 @@ BaseType_t xQueueIsQueueEmptyFromISR( const QueueHandle_t xQueue )
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueIsQueueEmptyFromISR( xQueue );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
|
||||
if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
|
||||
|
@ -2530,6 +2671,8 @@ BaseType_t xQueueIsQueueEmptyFromISR( const QueueHandle_t xQueue )
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xQueueIsQueueEmptyFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2560,6 +2703,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueIsQueueFullFromISR( xQueue );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
|
||||
if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
|
||||
|
@ -2571,6 +2716,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xQueueIsQueueFullFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -2584,6 +2731,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueCRSend( xQueue, pvItemToQueue, xTicksToWait );
|
||||
|
||||
/* If the queue is already full we may have to block. A critical section
|
||||
* is required to prevent an interrupt removing something from the queue
|
||||
* between the check to see if the queue is full and blocking on the queue. */
|
||||
|
@ -2648,6 +2797,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
}
|
||||
portENABLE_INTERRUPTS();
|
||||
|
||||
traceRETURN_xQueueCRSend( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -2663,6 +2814,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueCRReceive( xQueue, pvBuffer, xTicksToWait );
|
||||
|
||||
/* If the queue is already empty we may have to block. A critical section
|
||||
* is required to prevent an interrupt adding something to the queue
|
||||
* between the check to see if the queue is empty and blocking on the queue. */
|
||||
|
@ -2742,6 +2895,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
}
|
||||
portENABLE_INTERRUPTS();
|
||||
|
||||
traceRETURN_xQueueCRReceive( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -2756,6 +2911,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
{
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueCRSendFromISR( xQueue, pvItemToQueue, xCoRoutinePreviouslyWoken );
|
||||
|
||||
/* Cannot block within an ISR so if there is no space on the queue then
|
||||
* exit without doing anything. */
|
||||
if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )
|
||||
|
@ -2792,6 +2949,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xQueueCRSendFromISR( xCoRoutinePreviouslyWoken );
|
||||
|
||||
return xCoRoutinePreviouslyWoken;
|
||||
}
|
||||
|
||||
|
@ -2807,6 +2966,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_xQueueCRReceiveFromISR( xQueue, pvBuffer, pxCoRoutineWoken );
|
||||
|
||||
/* We cannot block from an ISR, so check there is data available. If
|
||||
* not then just leave without doing anything. */
|
||||
if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 )
|
||||
|
@ -2856,6 +3017,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
xReturn = pdFAIL;
|
||||
}
|
||||
|
||||
traceRETURN_xQueueCRReceiveFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -2870,6 +3033,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
UBaseType_t ux;
|
||||
QueueRegistryItem_t * pxEntryToWrite = NULL;
|
||||
|
||||
traceENTER_vQueueAddToRegistry( xQueue, pcQueueName );
|
||||
|
||||
configASSERT( xQueue );
|
||||
|
||||
if( pcQueueName != NULL )
|
||||
|
@ -2904,6 +3069,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
|
||||
traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName );
|
||||
}
|
||||
|
||||
traceRETURN_vQueueAddToRegistry();
|
||||
}
|
||||
|
||||
#endif /* configQUEUE_REGISTRY_SIZE */
|
||||
|
@ -2916,6 +3083,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
UBaseType_t ux;
|
||||
const char * pcReturn = NULL; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
|
||||
traceENTER_pcQueueGetName( xQueue );
|
||||
|
||||
configASSERT( xQueue );
|
||||
|
||||
/* Note there is nothing here to protect against another task adding or
|
||||
|
@ -2934,6 +3103,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
}
|
||||
}
|
||||
|
||||
traceRETURN_pcQueueGetName( pcReturn );
|
||||
|
||||
return pcReturn;
|
||||
} /*lint !e818 xQueue cannot be a pointer to const because it is a typedef. */
|
||||
|
||||
|
@ -2946,6 +3117,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
{
|
||||
UBaseType_t ux;
|
||||
|
||||
traceENTER_vQueueUnregisterQueue( xQueue );
|
||||
|
||||
configASSERT( xQueue );
|
||||
|
||||
/* See if the handle of the queue being unregistered in actually in the
|
||||
|
@ -2968,6 +3141,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
|
||||
traceRETURN_vQueueUnregisterQueue();
|
||||
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
||||
|
||||
#endif /* configQUEUE_REGISTRY_SIZE */
|
||||
|
@ -2981,6 +3156,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
{
|
||||
Queue_t * const pxQueue = xQueue;
|
||||
|
||||
traceENTER_vQueueWaitForMessageRestricted( xQueue, xTicksToWait, xWaitIndefinitely );
|
||||
|
||||
/* This function should not be called by application code hence the
|
||||
* 'Restricted' in its name. It is not part of the public API. It is
|
||||
* designed for use by kernel code, and has special calling requirements.
|
||||
|
@ -3008,6 +3185,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
}
|
||||
|
||||
prvUnlockQueue( pxQueue );
|
||||
|
||||
traceRETURN_vQueueWaitForMessageRestricted();
|
||||
}
|
||||
|
||||
#endif /* configUSE_TIMERS */
|
||||
|
@ -3019,8 +3198,12 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
{
|
||||
QueueSetHandle_t pxQueue;
|
||||
|
||||
traceENTER_xQueueCreateSet( uxEventQueueLength );
|
||||
|
||||
pxQueue = xQueueGenericCreate( uxEventQueueLength, ( UBaseType_t ) sizeof( Queue_t * ), queueQUEUE_TYPE_SET );
|
||||
|
||||
traceRETURN_xQueueCreateSet( pxQueue );
|
||||
|
||||
return pxQueue;
|
||||
}
|
||||
|
||||
|
@ -3034,6 +3217,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
{
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xQueueAddToSet( xQueueOrSemaphore, xQueueSet );
|
||||
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
if( ( ( Queue_t * ) xQueueOrSemaphore )->pxQueueSetContainer != NULL )
|
||||
|
@ -3055,6 +3240,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xQueueAddToSet( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -3069,6 +3256,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
BaseType_t xReturn;
|
||||
Queue_t * const pxQueueOrSemaphore = ( Queue_t * ) xQueueOrSemaphore;
|
||||
|
||||
traceENTER_xQueueRemoveFromSet( xQueueOrSemaphore, xQueueSet );
|
||||
|
||||
if( pxQueueOrSemaphore->pxQueueSetContainer != xQueueSet )
|
||||
{
|
||||
/* The queue was not a member of the set. */
|
||||
|
@ -3092,6 +3281,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
xReturn = pdPASS;
|
||||
}
|
||||
|
||||
traceRETURN_xQueueRemoveFromSet( xReturn );
|
||||
|
||||
return xReturn;
|
||||
} /*lint !e818 xQueueSet could not be declared as pointing to const as it is a typedef. */
|
||||
|
||||
|
@ -3105,7 +3296,12 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
{
|
||||
QueueSetMemberHandle_t xReturn = NULL;
|
||||
|
||||
traceENTER_xQueueSelectFromSet( xQueueSet, xTicksToWait );
|
||||
|
||||
( void ) xQueueReceive( ( QueueHandle_t ) xQueueSet, &xReturn, xTicksToWait ); /*lint !e961 Casting from one typedef to another is not redundant. */
|
||||
|
||||
traceRETURN_xQueueSelectFromSet( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -3118,7 +3314,12 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||
{
|
||||
QueueSetMemberHandle_t xReturn = NULL;
|
||||
|
||||
traceENTER_xQueueSelectFromSetFromISR( xQueueSet );
|
||||
|
||||
( void ) xQueueReceiveFromISR( ( QueueHandle_t ) xQueueSet, &xReturn, NULL ); /*lint !e961 Casting from one typedef to another is not redundant. */
|
||||
|
||||
traceRETURN_xQueueSelectFromSetFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
|
|
@ -326,6 +326,8 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
void * pvAllocatedMemory;
|
||||
uint8_t ucFlags;
|
||||
|
||||
traceENTER_xStreamBufferGenericCreate( xBufferSizeBytes, xTriggerLevelBytes, xIsMessageBuffer, pxSendCompletedCallback, pxReceiveCompletedCallback );
|
||||
|
||||
/* In case the stream buffer is going to be used as a message buffer
|
||||
* (that is, it will hold discrete messages with a little meta data that
|
||||
* says how big the next message is) check the buffer will be large enough
|
||||
|
@ -387,6 +389,8 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer );
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferGenericCreate( pvAllocatedMemory );
|
||||
|
||||
return ( StreamBufferHandle_t ) pvAllocatedMemory; /*lint !e9087 !e826 Safe cast as allocated memory is aligned. */
|
||||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
|
@ -406,6 +410,8 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
StreamBufferHandle_t xReturn;
|
||||
uint8_t ucFlags;
|
||||
|
||||
traceENTER_xStreamBufferGenericCreateStatic( xBufferSizeBytes, xTriggerLevelBytes, xIsMessageBuffer, pucStreamBufferStorageArea, pxStaticStreamBuffer, pxSendCompletedCallback, pxReceiveCompletedCallback );
|
||||
|
||||
configASSERT( pucStreamBufferStorageArea );
|
||||
configASSERT( pxStaticStreamBuffer );
|
||||
configASSERT( xTriggerLevelBytes <= xBufferSizeBytes );
|
||||
|
@ -468,6 +474,8 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer );
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferGenericCreateStatic( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif /* ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
|
@ -481,6 +489,8 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
BaseType_t xReturn;
|
||||
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||
|
||||
traceENTER_xStreamBufferGetStaticBuffers( xStreamBuffer, ppucStreamBufferStorageArea, ppxStaticStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
configASSERT( ppucStreamBufferStorageArea );
|
||||
configASSERT( ppxStaticStreamBuffer );
|
||||
|
@ -496,6 +506,8 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferGetStaticBuffers( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
|
@ -505,6 +517,8 @@ void vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer )
|
|||
{
|
||||
StreamBuffer_t * pxStreamBuffer = xStreamBuffer;
|
||||
|
||||
traceENTER_vStreamBufferDelete( xStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
traceSTREAM_BUFFER_DELETE( xStreamBuffer );
|
||||
|
@ -531,6 +545,8 @@ void vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer )
|
|||
* freed - just scrub the structure so future use will assert. */
|
||||
( void ) memset( pxStreamBuffer, 0x00, sizeof( StreamBuffer_t ) );
|
||||
}
|
||||
|
||||
traceRETURN_vStreamBufferDelete();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -544,6 +560,8 @@ BaseType_t xStreamBufferReset( StreamBufferHandle_t xStreamBuffer )
|
|||
UBaseType_t uxStreamBufferNumber;
|
||||
#endif
|
||||
|
||||
traceENTER_xStreamBufferReset( xStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||
|
@ -587,6 +605,8 @@ BaseType_t xStreamBufferReset( StreamBufferHandle_t xStreamBuffer )
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xStreamBufferReset( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -597,6 +617,8 @@ BaseType_t xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
|
|||
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xStreamBufferSetTriggerLevel( xStreamBuffer, xTriggerLevel );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
/* It is not valid for the trigger level to be 0. */
|
||||
|
@ -617,6 +639,8 @@ BaseType_t xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferSetTriggerLevel( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -627,6 +651,8 @@ size_t xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer )
|
|||
size_t xSpace;
|
||||
size_t xOriginalTail;
|
||||
|
||||
traceENTER_xStreamBufferSpacesAvailable( xStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
/* The code below reads xTail and then xHead. This is safe if the stream
|
||||
|
@ -650,6 +676,8 @@ size_t xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer )
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferSpacesAvailable( xSpace );
|
||||
|
||||
return xSpace;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -659,9 +687,14 @@ size_t xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer )
|
|||
const StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||
size_t xReturn;
|
||||
|
||||
traceENTER_xStreamBufferBytesAvailable( xStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
xReturn = prvBytesInBuffer( pxStreamBuffer );
|
||||
|
||||
traceRETURN_xStreamBufferBytesAvailable( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -677,6 +710,8 @@ size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
|
|||
TimeOut_t xTimeOut;
|
||||
size_t xMaxReportedSpace = 0;
|
||||
|
||||
traceENTER_xStreamBufferSend( xStreamBuffer, pvTxData, xDataLengthBytes, xTicksToWait );
|
||||
|
||||
configASSERT( pvTxData );
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
|
@ -793,6 +828,8 @@ size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
|
|||
traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer );
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferSend( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -806,6 +843,8 @@ size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
|
|||
size_t xReturn, xSpace;
|
||||
size_t xRequiredSpace = xDataLengthBytes;
|
||||
|
||||
traceENTER_xStreamBufferSendFromISR( xStreamBuffer, pvTxData, xDataLengthBytes, pxHigherPriorityTaskWoken );
|
||||
|
||||
configASSERT( pvTxData );
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
|
@ -843,6 +882,7 @@ size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
|
|||
}
|
||||
|
||||
traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xReturn );
|
||||
traceRETURN_xStreamBufferSendFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
@ -906,6 +946,8 @@ size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
|
|||
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||
size_t xReceivedLength = 0, xBytesAvailable, xBytesToStoreMessageLength;
|
||||
|
||||
traceENTER_xStreamBufferReceive( xStreamBuffer, pvRxData, xBufferLengthBytes, xTicksToWait );
|
||||
|
||||
configASSERT( pvRxData );
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
|
@ -998,6 +1040,8 @@ size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferReceive( xReceivedLength );
|
||||
|
||||
return xReceivedLength;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1008,6 +1052,8 @@ size_t xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer )
|
|||
size_t xReturn, xBytesAvailable;
|
||||
configMESSAGE_BUFFER_LENGTH_TYPE xTempReturn;
|
||||
|
||||
traceENTER_xStreamBufferNextMessageLengthBytes( xStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
/* Ensure the stream buffer is being used as a message buffer. */
|
||||
|
@ -1038,6 +1084,8 @@ size_t xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer )
|
|||
xReturn = 0;
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferNextMessageLengthBytes( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1050,6 +1098,8 @@ size_t xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer,
|
|||
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||
size_t xReceivedLength = 0, xBytesAvailable, xBytesToStoreMessageLength;
|
||||
|
||||
traceENTER_xStreamBufferReceiveFromISR( xStreamBuffer, pvRxData, xBufferLengthBytes, pxHigherPriorityTaskWoken );
|
||||
|
||||
configASSERT( pvRxData );
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
|
@ -1094,6 +1144,7 @@ size_t xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer,
|
|||
}
|
||||
|
||||
traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength );
|
||||
traceRETURN_xStreamBufferReceiveFromISR( xReceivedLength );
|
||||
|
||||
return xReceivedLength;
|
||||
}
|
||||
|
@ -1157,6 +1208,8 @@ BaseType_t xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer )
|
|||
BaseType_t xReturn;
|
||||
size_t xTail;
|
||||
|
||||
traceENTER_xStreamBufferIsEmpty( xStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
/* True if no bytes are available. */
|
||||
|
@ -1171,6 +1224,8 @@ BaseType_t xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer )
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferIsEmpty( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1181,6 +1236,8 @@ BaseType_t xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer )
|
|||
size_t xBytesToStoreMessageLength;
|
||||
const StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||
|
||||
traceENTER_xStreamBufferIsFull( xStreamBuffer );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
/* This generic version of the receive function is used by both message
|
||||
|
@ -1206,6 +1263,8 @@ BaseType_t xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer )
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xStreamBufferIsFull( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1217,6 +1276,8 @@ BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer
|
|||
BaseType_t xReturn;
|
||||
UBaseType_t uxSavedInterruptStatus;
|
||||
|
||||
traceENTER_xStreamBufferSendCompletedFromISR( xStreamBuffer, pxHigherPriorityTaskWoken );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();
|
||||
|
@ -1237,6 +1298,8 @@ BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer
|
|||
}
|
||||
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
traceRETURN_xStreamBufferSendCompletedFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1248,6 +1311,8 @@ BaseType_t xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuf
|
|||
BaseType_t xReturn;
|
||||
UBaseType_t uxSavedInterruptStatus;
|
||||
|
||||
traceENTER_xStreamBufferReceiveCompletedFromISR( xStreamBuffer, pxHigherPriorityTaskWoken );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();
|
||||
|
@ -1268,6 +1333,8 @@ BaseType_t xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuf
|
|||
}
|
||||
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
traceRETURN_xStreamBufferReceiveCompletedFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1426,6 +1493,10 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
|
||||
UBaseType_t uxStreamBufferGetStreamBufferNumber( StreamBufferHandle_t xStreamBuffer )
|
||||
{
|
||||
traceENTER_uxStreamBufferGetStreamBufferNumber( xStreamBuffer );
|
||||
|
||||
traceRETURN_uxStreamBufferGetStreamBufferNumber( xStreamBuffer->uxStreamBufferNumber );
|
||||
|
||||
return xStreamBuffer->uxStreamBufferNumber;
|
||||
}
|
||||
|
||||
|
@ -1437,7 +1508,11 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
void vStreamBufferSetStreamBufferNumber( StreamBufferHandle_t xStreamBuffer,
|
||||
UBaseType_t uxStreamBufferNumber )
|
||||
{
|
||||
traceENTER_vStreamBufferSetStreamBufferNumber( xStreamBuffer, uxStreamBufferNumber );
|
||||
|
||||
xStreamBuffer->uxStreamBufferNumber = uxStreamBufferNumber;
|
||||
|
||||
traceRETURN_vStreamBufferSetStreamBufferNumber();
|
||||
}
|
||||
|
||||
#endif /* configUSE_TRACE_FACILITY */
|
||||
|
@ -1447,6 +1522,10 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
|||
|
||||
uint8_t ucStreamBufferGetStreamBufferType( StreamBufferHandle_t xStreamBuffer )
|
||||
{
|
||||
traceENTER_ucStreamBufferGetStreamBufferType( xStreamBuffer );
|
||||
|
||||
traceRETURN_ucStreamBufferGetStreamBufferType( ( uint8_t ) ( xStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) );
|
||||
|
||||
return( ( uint8_t ) ( xStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) );
|
||||
}
|
||||
|
||||
|
|
89
timers.c
89
timers.c
|
@ -235,6 +235,8 @@
|
|||
{
|
||||
BaseType_t xReturn = pdFAIL;
|
||||
|
||||
traceENTER_xTimerCreateTimerTask();
|
||||
|
||||
/* This function is called when the scheduler is started if
|
||||
* configUSE_TIMERS is set to 1. Check that the infrastructure used by the
|
||||
* timer service task has been created/initialised. If timers have already
|
||||
|
@ -280,6 +282,9 @@
|
|||
}
|
||||
|
||||
configASSERT( xReturn );
|
||||
|
||||
traceRETURN_xTimerCreateTimerTask( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -294,6 +299,8 @@
|
|||
{
|
||||
Timer_t * pxNewTimer;
|
||||
|
||||
traceENTER_xTimerCreate( pcTimerName, xTimerPeriodInTicks, xAutoReload, pvTimerID, pxCallbackFunction );
|
||||
|
||||
pxNewTimer = ( Timer_t * ) pvPortMalloc( sizeof( Timer_t ) ); /*lint !e9087 !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack, and the first member of Timer_t is always a pointer to the timer's name. */
|
||||
|
||||
if( pxNewTimer != NULL )
|
||||
|
@ -305,6 +312,8 @@
|
|||
prvInitialiseNewTimer( pcTimerName, xTimerPeriodInTicks, xAutoReload, pvTimerID, pxCallbackFunction, pxNewTimer );
|
||||
}
|
||||
|
||||
traceRETURN_xTimerCreate( pxNewTimer );
|
||||
|
||||
return pxNewTimer;
|
||||
}
|
||||
|
||||
|
@ -322,6 +331,8 @@
|
|||
{
|
||||
Timer_t * pxNewTimer;
|
||||
|
||||
traceENTER_xTimerCreateStatic( pcTimerName, xTimerPeriodInTicks, xAutoReload, pvTimerID, pxCallbackFunction, pxTimerBuffer );
|
||||
|
||||
#if ( configASSERT_DEFINED == 1 )
|
||||
{
|
||||
/* Sanity check that the size of the structure used to declare a
|
||||
|
@ -347,6 +358,8 @@
|
|||
prvInitialiseNewTimer( pcTimerName, xTimerPeriodInTicks, xAutoReload, pvTimerID, pxCallbackFunction, pxNewTimer );
|
||||
}
|
||||
|
||||
traceRETURN_xTimerCreateStatic( pxNewTimer );
|
||||
|
||||
return pxNewTimer;
|
||||
}
|
||||
|
||||
|
@ -395,6 +408,8 @@
|
|||
|
||||
( void ) pxHigherPriorityTaskWoken;
|
||||
|
||||
traceENTER_xTimerGenericCommandFromTask( xTimer, xCommandID, xOptionalValue, pxHigherPriorityTaskWoken, xTicksToWait );
|
||||
|
||||
configASSERT( xTimer );
|
||||
|
||||
/* Send a message to the timer service task to perform a particular action
|
||||
|
@ -427,6 +442,8 @@
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xTimerGenericCommandFromTask( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -442,6 +459,8 @@
|
|||
|
||||
( void ) xTicksToWait;
|
||||
|
||||
traceENTER_xTimerGenericCommandFromISR( xTimer, xCommandID, xOptionalValue, pxHigherPriorityTaskWoken, xTicksToWait );
|
||||
|
||||
configASSERT( xTimer );
|
||||
|
||||
/* Send a message to the timer service task to perform a particular action
|
||||
|
@ -467,15 +486,22 @@
|
|||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceRETURN_xTimerGenericCommandFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
TaskHandle_t xTimerGetTimerDaemonTaskHandle( void )
|
||||
{
|
||||
traceENTER_xTimerGetTimerDaemonTaskHandle();
|
||||
|
||||
/* If xTimerGetTimerDaemonTaskHandle() is called before the scheduler has been
|
||||
* started, then xTimerTaskHandle will be NULL. */
|
||||
configASSERT( ( xTimerTaskHandle != NULL ) );
|
||||
|
||||
traceRETURN_xTimerGetTimerDaemonTaskHandle( xTimerTaskHandle );
|
||||
|
||||
return xTimerTaskHandle;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -484,7 +510,12 @@
|
|||
{
|
||||
Timer_t * pxTimer = xTimer;
|
||||
|
||||
traceENTER_xTimerGetPeriod( xTimer );
|
||||
|
||||
configASSERT( xTimer );
|
||||
|
||||
traceRETURN_xTimerGetPeriod( pxTimer->xTimerPeriodInTicks );
|
||||
|
||||
return pxTimer->xTimerPeriodInTicks;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -494,6 +525,8 @@
|
|||
{
|
||||
Timer_t * pxTimer = xTimer;
|
||||
|
||||
traceENTER_vTimerSetReloadMode( xTimer, xAutoReload );
|
||||
|
||||
configASSERT( xTimer );
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
|
@ -507,6 +540,8 @@
|
|||
}
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_vTimerSetReloadMode();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -515,6 +550,8 @@
|
|||
Timer_t * pxTimer = xTimer;
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xTimerGetReloadMode( xTimer );
|
||||
|
||||
configASSERT( xTimer );
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
|
@ -531,12 +568,22 @@
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xTimerGetReloadMode( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
UBaseType_t uxTimerGetReloadMode( TimerHandle_t xTimer )
|
||||
{
|
||||
return ( UBaseType_t ) xTimerGetReloadMode( xTimer );
|
||||
UBaseType_t uxReturn;
|
||||
|
||||
traceENTER_uxTimerGetReloadMode( xTimer );
|
||||
|
||||
uxReturn = ( UBaseType_t ) xTimerGetReloadMode( xTimer );
|
||||
|
||||
traceRETURN_uxTimerGetReloadMode( uxReturn );
|
||||
|
||||
return uxReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -545,8 +592,13 @@
|
|||
Timer_t * pxTimer = xTimer;
|
||||
TickType_t xReturn;
|
||||
|
||||
traceENTER_xTimerGetExpiryTime( xTimer );
|
||||
|
||||
configASSERT( xTimer );
|
||||
xReturn = listGET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ) );
|
||||
|
||||
traceRETURN_xTimerGetExpiryTime( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -558,6 +610,8 @@
|
|||
BaseType_t xReturn;
|
||||
Timer_t * pxTimer = xTimer;
|
||||
|
||||
traceENTER_xTimerGetStaticBuffer( xTimer, ppxTimerBuffer );
|
||||
|
||||
configASSERT( ppxTimerBuffer != NULL );
|
||||
|
||||
if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) != 0 )
|
||||
|
@ -570,6 +624,8 @@
|
|||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
traceRETURN_xTimerGetStaticBuffer( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
|
@ -579,7 +635,12 @@
|
|||
{
|
||||
Timer_t * pxTimer = xTimer;
|
||||
|
||||
traceENTER_pcTimerGetName( xTimer );
|
||||
|
||||
configASSERT( xTimer );
|
||||
|
||||
traceRETURN_pcTimerGetName( pxTimer->pcTimerName );
|
||||
|
||||
return pxTimer->pcTimerName;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1057,6 +1118,8 @@
|
|||
BaseType_t xReturn;
|
||||
Timer_t * pxTimer = xTimer;
|
||||
|
||||
traceENTER_xTimerIsTimerActive( xTimer );
|
||||
|
||||
configASSERT( xTimer );
|
||||
|
||||
/* Is the timer in the list of active timers? */
|
||||
|
@ -1073,6 +1136,8 @@
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_xTimerIsTimerActive( xReturn );
|
||||
|
||||
return xReturn;
|
||||
} /*lint !e818 Can't be pointer to const due to the typedef. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1082,6 +1147,8 @@
|
|||
Timer_t * const pxTimer = xTimer;
|
||||
void * pvReturn;
|
||||
|
||||
traceENTER_pvTimerGetTimerID( xTimer );
|
||||
|
||||
configASSERT( xTimer );
|
||||
|
||||
taskENTER_CRITICAL();
|
||||
|
@ -1090,6 +1157,8 @@
|
|||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_pvTimerGetTimerID( pvReturn );
|
||||
|
||||
return pvReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -1099,6 +1168,8 @@
|
|||
{
|
||||
Timer_t * const pxTimer = xTimer;
|
||||
|
||||
traceENTER_vTimerSetTimerID( xTimer, pvNewID );
|
||||
|
||||
configASSERT( xTimer );
|
||||
|
||||
taskENTER_CRITICAL();
|
||||
|
@ -1106,6 +1177,8 @@
|
|||
pxTimer->pvTimerID = pvNewID;
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
traceRETURN_vTimerSetTimerID();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -1119,6 +1192,8 @@
|
|||
DaemonTaskMessage_t xMessage;
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xTimerPendFunctionCallFromISR( xFunctionToPend, pvParameter1, ulParameter2, pxHigherPriorityTaskWoken );
|
||||
|
||||
/* Complete the message with the function parameters and post it to the
|
||||
* daemon task. */
|
||||
xMessage.xMessageID = tmrCOMMAND_EXECUTE_CALLBACK_FROM_ISR;
|
||||
|
@ -1129,6 +1204,7 @@
|
|||
xReturn = xQueueSendFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken );
|
||||
|
||||
tracePEND_FUNC_CALL_FROM_ISR( xFunctionToPend, pvParameter1, ulParameter2, xReturn );
|
||||
traceRETURN_xTimerPendFunctionCallFromISR( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
@ -1146,6 +1222,8 @@
|
|||
DaemonTaskMessage_t xMessage;
|
||||
BaseType_t xReturn;
|
||||
|
||||
traceENTER_xTimerPendFunctionCall( xFunctionToPend, pvParameter1, ulParameter2, xTicksToWait );
|
||||
|
||||
/* This function can only be called after a timer has been created or
|
||||
* after the scheduler has been started because, until then, the timer
|
||||
* queue does not exist. */
|
||||
|
@ -1161,6 +1239,7 @@
|
|||
xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait );
|
||||
|
||||
tracePEND_FUNC_CALL( xFunctionToPend, pvParameter1, ulParameter2, xReturn );
|
||||
traceRETURN_xTimerPendFunctionCall( xReturn );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
@ -1172,6 +1251,10 @@
|
|||
|
||||
UBaseType_t uxTimerGetTimerNumber( TimerHandle_t xTimer )
|
||||
{
|
||||
traceENTER_uxTimerGetTimerNumber( xTimer );
|
||||
|
||||
traceRETURN_uxTimerGetTimerNumber( ( ( Timer_t * ) xTimer )->uxTimerNumber );
|
||||
|
||||
return ( ( Timer_t * ) xTimer )->uxTimerNumber;
|
||||
}
|
||||
|
||||
|
@ -1183,7 +1266,11 @@
|
|||
void vTimerSetTimerNumber( TimerHandle_t xTimer,
|
||||
UBaseType_t uxTimerNumber )
|
||||
{
|
||||
traceENTER_vTimerSetTimerNumber( xTimer, uxTimerNumber );
|
||||
|
||||
( ( Timer_t * ) xTimer )->uxTimerNumber = uxTimerNumber;
|
||||
|
||||
traceRETURN_vTimerSetTimerNumber();
|
||||
}
|
||||
|
||||
#endif /* configUSE_TRACE_FACILITY */
|
||||
|
|
Loading…
Reference in a new issue