37#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
49#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
52#if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) )
54 #ifndef configPROTECTED_KERNEL_OBJECT_POOL_SIZE
55 #error configPROTECTED_KERNEL_OBJECT_POOL_SIZE must be defined to maximum number of kernel objects in the application.
64 #define INDEX_OFFSET 1
70 typedef struct OpaqueObject * OpaqueObjectHandle_t;
75 typedef struct KernelObject
77 OpaqueObjectHandle_t xInternalObjectHandle;
78 uint32_t ulKernelObjectType;
79 void * pvKernelObjectData;
85 #define KERNEL_OBJECT_TYPE_INVALID ( 0UL )
86 #define KERNEL_OBJECT_TYPE_QUEUE ( 1UL )
87 #define KERNEL_OBJECT_TYPE_TASK ( 2UL )
88 #define KERNEL_OBJECT_TYPE_STREAM_BUFFER ( 3UL )
89 #define KERNEL_OBJECT_TYPE_EVENT_GROUP ( 4UL )
90 #define KERNEL_OBJECT_TYPE_TIMER ( 5UL )
95 #define IS_EXTERNAL_INDEX_VALID( lIndex ) \
96 ( ( ( lIndex ) >= INDEX_OFFSET ) && \
97 ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE + INDEX_OFFSET ) ) )
102 #define IS_INTERNAL_INDEX_VALID( lIndex ) \
103 ( ( ( lIndex ) >= 0 ) && \
104 ( ( lIndex ) < ( configPROTECTED_KERNEL_OBJECT_POOL_SIZE ) ) )
109 #define CONVERT_TO_EXTERNAL_INDEX( lIndex ) ( ( lIndex ) + INDEX_OFFSET )
114 #define CONVERT_TO_INTERNAL_INDEX( lIndex ) ( ( lIndex ) - INDEX_OFFSET )
119 #define mpuUINT32_MAX ( ~( ( uint32_t ) 0 ) )
124 #define mpuMULTIPLY_UINT32_WILL_OVERFLOW( a, b ) ( ( ( a ) > 0 ) && ( ( b ) > ( mpuUINT32_MAX / ( a ) ) ) )
153 static int32_t MPU_GetIndexForHandle( OpaqueObjectHandle_t xHandle,
166 static void MPU_StoreHandleAndDataAtIndex( int32_t lIndex,
167 OpaqueObjectHandle_t xHandle,
168 void * pvKernelObjectData,
180 static OpaqueObjectHandle_t MPU_GetHandleAtIndex( int32_t lIndex,
183 #if ( configUSE_TIMERS == 1 )
200 #define MPU_StoreQueueHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( lIndex, ( OpaqueObjectHandle_t ) xHandle, NULL, KERNEL_OBJECT_TYPE_QUEUE )
201 #define MPU_GetQueueHandleAtIndex( lIndex ) ( QueueHandle_t ) MPU_GetHandleAtIndex( lIndex, KERNEL_OBJECT_TYPE_QUEUE )
203 #if ( configUSE_QUEUE_SETS == 1 )
204 #define MPU_StoreQueueSetHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( lIndex, ( OpaqueObjectHandle_t ) xHandle, NULL, KERNEL_OBJECT_TYPE_QUEUE )
205 #define MPU_GetQueueSetHandleAtIndex( lIndex ) ( QueueSetHandle_t ) MPU_GetHandleAtIndex( lIndex, KERNEL_OBJECT_TYPE_QUEUE )
206 #define MPU_StoreQueueSetMemberHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( lIndex, ( OpaqueObjectHandle_t ) xHandle, NULL, KERNEL_OBJECT_TYPE_QUEUE )
207 #define MPU_GetQueueSetMemberHandleAtIndex( lIndex ) ( QueueSetMemberHandle_t ) MPU_GetHandleAtIndex( lIndex, KERNEL_OBJECT_TYPE_QUEUE )
208 #define MPU_GetIndexForQueueSetMemberHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) xHandle, KERNEL_OBJECT_TYPE_QUEUE )
214 #define MPU_StoreTaskHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( lIndex, ( OpaqueObjectHandle_t ) xHandle, NULL, KERNEL_OBJECT_TYPE_TASK )
215 #define MPU_GetTaskHandleAtIndex( lIndex ) ( TaskHandle_t ) MPU_GetHandleAtIndex( lIndex, KERNEL_OBJECT_TYPE_TASK )
216 #define MPU_GetIndexForTaskHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) xHandle, KERNEL_OBJECT_TYPE_TASK )
221 #define MPU_StoreEventGroupHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( lIndex, ( OpaqueObjectHandle_t ) xHandle, NULL, KERNEL_OBJECT_TYPE_EVENT_GROUP )
222 #define MPU_GetEventGroupHandleAtIndex( lIndex ) ( EventGroupHandle_t ) MPU_GetHandleAtIndex( lIndex, KERNEL_OBJECT_TYPE_EVENT_GROUP )
223 #define MPU_GetIndexForEventGroupHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) xHandle, KERNEL_OBJECT_TYPE_EVENT_GROUP )
228 #define MPU_StoreStreamBufferHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( lIndex, ( OpaqueObjectHandle_t ) xHandle, NULL, KERNEL_OBJECT_TYPE_STREAM_BUFFER )
229 #define MPU_GetStreamBufferHandleAtIndex( lIndex ) ( StreamBufferHandle_t ) MPU_GetHandleAtIndex( lIndex, KERNEL_OBJECT_TYPE_STREAM_BUFFER )
230 #define MPU_GetIndexForStreamBufferHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) xHandle, KERNEL_OBJECT_TYPE_STREAM_BUFFER )
232 #if ( configUSE_TIMERS == 1 )
237 #define MPU_StoreTimerHandleAtIndex( lIndex, xHandle, pxApplicationCallback ) MPU_StoreHandleAndDataAtIndex( lIndex, ( OpaqueObjectHandle_t ) xHandle, ( void * ) pxApplicationCallback, KERNEL_OBJECT_TYPE_TIMER )
238 #define MPU_GetTimerHandleAtIndex( lIndex ) ( TimerHandle_t ) MPU_GetHandleAtIndex( lIndex, KERNEL_OBJECT_TYPE_TIMER )
239 #define MPU_GetIndexForTimerHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) xHandle, KERNEL_OBJECT_TYPE_TIMER )
248 PRIVILEGED_DATA static KernelObject_t xKernelObjectPool[ configPROTECTED_KERNEL_OBJECT_POOL_SIZE ] = {
NULL };
251 static int32_t MPU_GetFreeIndexInKernelObjectPool(
void )
253 int32_t i, lFreeIndex = -1;
261 for( i = 0; i < configPROTECTED_KERNEL_OBJECT_POOL_SIZE; i++ )
263 if( xKernelObjectPool[ i ].xInternalObjectHandle ==
NULL )
266 xKernelObjectPool[ i ].xInternalObjectHandle = ( OpaqueObjectHandle_t ) ( ~0 );
278 static void MPU_SetIndexFreeInKernelObjectPool( int32_t lIndex )
284 xKernelObjectPool[ lIndex ].xInternalObjectHandle =
NULL;
285 xKernelObjectPool[ lIndex ].ulKernelObjectType = KERNEL_OBJECT_TYPE_INVALID;
286 xKernelObjectPool[ lIndex ].pvKernelObjectData =
NULL;
292 static int32_t MPU_GetIndexForHandle( OpaqueObjectHandle_t xHandle,
293 uint32_t ulKernelObjectType )
295 int32_t i, lIndex = -1;
299 for( i = 0; i < configPROTECTED_KERNEL_OBJECT_POOL_SIZE; i++ )
301 if( ( xKernelObjectPool[ i ].xInternalObjectHandle == xHandle ) &&
302 ( xKernelObjectPool[ i ].ulKernelObjectType == ulKernelObjectType ) )
313 static void MPU_StoreHandleAndDataAtIndex( int32_t lIndex,
314 OpaqueObjectHandle_t xHandle,
315 void * pvKernelObjectData,
316 uint32_t ulKernelObjectType )
319 xKernelObjectPool[ lIndex ].xInternalObjectHandle = xHandle;
320 xKernelObjectPool[ lIndex ].ulKernelObjectType = ulKernelObjectType;
321 xKernelObjectPool[ lIndex ].pvKernelObjectData = pvKernelObjectData;
325 static OpaqueObjectHandle_t MPU_GetHandleAtIndex( int32_t lIndex,
326 uint32_t ulKernelObjectType )
328 OpaqueObjectHandle_t xObjectHandle =
NULL;
332 if( xKernelObjectPool[ lIndex ].ulKernelObjectType == ulKernelObjectType )
334 xObjectHandle = xKernelObjectPool[ lIndex ].xInternalObjectHandle;
337 return xObjectHandle;
341 #if ( configENABLE_ACCESS_CONTROL_LIST == 1 )
343 void vGrantAccessToKernelObject(
TaskHandle_t xExternalTaskHandle,
344 int32_t lExternalKernelObjectHandle )
346 int32_t lExternalTaskIndex;
349 if( IS_EXTERNAL_INDEX_VALID( lExternalKernelObjectHandle ) !=
pdFALSE )
351 if( xExternalTaskHandle ==
NULL )
353 vPortGrantAccessToKernelObject( xExternalTaskHandle, CONVERT_TO_INTERNAL_INDEX( lExternalKernelObjectHandle ) );
357 lExternalTaskIndex = ( int32_t ) xExternalTaskHandle;
359 if( IS_EXTERNAL_INDEX_VALID( lExternalTaskIndex ) !=
pdFALSE )
361 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lExternalTaskIndex ) );
363 if( xInternalTaskHandle !=
NULL )
365 vPortGrantAccessToKernelObject( xInternalTaskHandle,
366 CONVERT_TO_INTERNAL_INDEX( lExternalKernelObjectHandle ) );
376 #if ( configENABLE_ACCESS_CONTROL_LIST == 1 )
378 void vRevokeAccessToKernelObject(
TaskHandle_t xExternalTaskHandle,
379 int32_t lExternalKernelObjectHandle )
381 int32_t lExternalTaskIndex;
384 if( IS_EXTERNAL_INDEX_VALID( lExternalKernelObjectHandle ) !=
pdFALSE )
386 if( xExternalTaskHandle ==
NULL )
388 vPortRevokeAccessToKernelObject( xExternalTaskHandle, CONVERT_TO_INTERNAL_INDEX( lExternalKernelObjectHandle ) );
392 lExternalTaskIndex = ( int32_t ) xExternalTaskHandle;
394 if( IS_EXTERNAL_INDEX_VALID( lExternalTaskIndex ) !=
pdFALSE )
396 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lExternalTaskIndex ) );
398 if( xInternalTaskHandle !=
NULL )
400 vPortRevokeAccessToKernelObject( xInternalTaskHandle,
401 CONVERT_TO_INTERNAL_INDEX( lExternalKernelObjectHandle ) );
411 #if ( configUSE_TIMERS == 1 )
413 static void MPU_TimerCallback(
TimerHandle_t xInternalHandle )
415 int32_t i, lIndex = -1;
422 for( i = 0; i < configPROTECTED_KERNEL_OBJECT_POOL_SIZE; i++ )
424 if( ( (
TimerHandle_t ) xKernelObjectPool[ i ].xInternalObjectHandle == xInternalHandle ) &&
425 ( xKernelObjectPool[ i ].ulKernelObjectType == KERNEL_OBJECT_TYPE_TIMER ) )
433 xExternalHandle = (
TimerHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
436 pxApplicationCallBack( xExternalHandle );
446 #if ( INCLUDE_xTaskDelayUntil == 1 )
457 if( ( pxPreviousWakeTime !=
NULL ) && ( xTimeIncrement > 0U ) )
459 xIsPreviousWakeTimeAccessible = xPortIsAuthorizedToAccessBuffer( pxPreviousWakeTime,
463 if( xIsPreviousWakeTimeAccessible ==
pdTRUE )
475 #if ( INCLUDE_xTaskAbortDelay == 1 )
486 lIndex = ( int32_t ) xTask;
488 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
490 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
492 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
494 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
496 if( xInternalTaskHandle !=
NULL )
509 #if ( INCLUDE_vTaskDelay == 1 )
513 void MPU_vTaskDelayImpl(
TickType_t xTicksToDelay )
521 #if ( INCLUDE_uxTaskPriorityGet == 1 )
538 lIndex = ( int32_t ) pxTask;
540 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
542 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
544 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
546 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
548 if( xInternalTaskHandle !=
NULL )
562 #if ( INCLUDE_eTaskGetState == 1 )
573 lIndex = ( int32_t ) pxTask;
575 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
577 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
579 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
581 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
583 if( xInternalTaskHandle !=
NULL )
596 #if ( configUSE_TRACE_FACILITY == 1 )
613 xIsTaskStatusWriteable = xPortIsAuthorizedToAccessBuffer( pxTaskStatus,
617 if( xIsTaskStatusWriteable ==
pdTRUE )
621 vTaskGetInfo( xTask, pxTaskStatus, xGetFreeStackSpace, eState );
625 lIndex = ( int32_t ) xTask;
627 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
629 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
631 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
633 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
635 if( xInternalTaskHandle !=
NULL )
637 vTaskGetInfo( xInternalTaskHandle, pxTaskStatus, xGetFreeStackSpace, eState );
648 #if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )
664 #if ( INCLUDE_vTaskSuspend == 1 )
668 void MPU_vTaskSuspendImpl(
TaskHandle_t pxTaskToSuspend )
674 if( pxTaskToSuspend ==
NULL )
682 #if ( INCLUDE_xTaskGetSchedulerState == 1 )
685 if( portIS_TASK_PRIVILEGED() ==
pdTRUE )
688 lIndex = ( int32_t ) pxTaskToSuspend;
690 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
692 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
694 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
696 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
698 if( xInternalTaskHandle !=
NULL )
711 #if ( INCLUDE_vTaskSuspend == 1 )
721 lIndex = ( int32_t ) pxTaskToResume;
723 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
725 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
727 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
729 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
731 if( xInternalTaskHandle !=
NULL )
768 char * MPU_pcTaskGetNameImpl(
TaskHandle_t xTaskToQuery )
770 char * pcReturn =
NULL;
774 if( xTaskToQuery ==
NULL )
780 lIndex = ( int32_t ) xTaskToQuery;
782 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
784 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
786 if( xInternalTaskHandle !=
NULL )
797 #if ( configGENERATE_RUN_TIME_STATS == 1 )
814 lIndex = ( int32_t ) xTask;
816 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
818 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
820 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
822 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
824 if( xInternalTaskHandle !=
NULL )
838 #if ( configGENERATE_RUN_TIME_STATS == 1 )
855 lIndex = ( int32_t ) xTask;
857 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
859 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
861 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
863 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
865 if( xInternalTaskHandle !=
NULL )
879 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )
895 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )
911 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
913 void MPU_vTaskSetApplicationTaskTagImpl(
TaskHandle_t xTask,
916 void MPU_vTaskSetApplicationTaskTagImpl(
TaskHandle_t xTask,
925 vTaskSetApplicationTaskTag( xTask, pxTagValue );
929 lIndex = ( int32_t ) xTask;
931 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
933 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
935 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
937 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
939 if( xInternalTaskHandle !=
NULL )
941 vTaskSetApplicationTaskTag( xInternalTaskHandle, pxTagValue );
951 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
964 xReturn = xTaskGetApplicationTaskTag( xTask );
968 lIndex = ( int32_t ) xTask;
970 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
972 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
974 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
976 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
978 if( xInternalTaskHandle !=
NULL )
980 xReturn = xTaskGetApplicationTaskTag( xInternalTaskHandle );
992 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
994 void MPU_vTaskSetThreadLocalStoragePointerImpl(
TaskHandle_t xTaskToSet,
998 void MPU_vTaskSetThreadLocalStoragePointerImpl(
TaskHandle_t xTaskToSet,
1006 if( xTaskToSet ==
NULL )
1008 vTaskSetThreadLocalStoragePointer( xTaskToSet, xIndex, pvValue );
1012 lIndex = ( int32_t ) xTaskToSet;
1014 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1016 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1018 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
1020 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1022 if( xInternalTaskHandle !=
NULL )
1024 vTaskSetThreadLocalStoragePointer( xInternalTaskHandle, xIndex, pvValue );
1034 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
1036 void * MPU_pvTaskGetThreadLocalStoragePointerImpl(
TaskHandle_t xTaskToQuery,
1039 void * MPU_pvTaskGetThreadLocalStoragePointerImpl(
TaskHandle_t xTaskToQuery,
1042 void * pvReturn =
NULL;
1047 if( xTaskToQuery ==
NULL )
1049 pvReturn = pvTaskGetThreadLocalStoragePointer( xTaskToQuery, xIndex );
1053 lIndex = ( int32_t ) xTaskToQuery;
1055 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1057 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1059 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
1061 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1063 if( xInternalTaskHandle !=
NULL )
1065 pvReturn = pvTaskGetThreadLocalStoragePointer( xInternalTaskHandle, xIndex );
1077 #if ( configUSE_TRACE_FACILITY == 1 )
1090 uint32_t ulArraySize = ( uint32_t ) uxArraySize;
1091 uint32_t ulTaskStatusSize = ( uint32_t )
sizeof(
TaskStatus_t );
1093 if( mpuMULTIPLY_UINT32_WILL_OVERFLOW( ulTaskStatusSize, ulArraySize ) == 0 )
1095 xIsTaskStatusArrayWriteable = xPortIsAuthorizedToAccessBuffer( pxTaskStatusArray,
1096 ulTaskStatusSize * ulArraySize,
1099 if( pulTotalRunTime !=
NULL )
1101 xIsTotalRunTimeWriteable = xPortIsAuthorizedToAccessBuffer( pulTotalRunTime,
1106 if( ( xIsTaskStatusArrayWriteable ==
pdTRUE ) &&
1107 ( ( pulTotalRunTime ==
NULL ) || ( xIsTotalRunTimeWriteable ==
pdTRUE ) ) )
1119 #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 )
1136 lIndex = ( int32_t ) xTask;
1138 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1140 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1142 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
1144 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1146 if( xInternalTaskHandle !=
NULL )
1160 #if ( INCLUDE_uxTaskGetStackHighWaterMark2 == 1 )
1177 lIndex = ( int32_t ) xTask;
1179 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1181 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1183 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
1185 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1187 if( xInternalTaskHandle !=
NULL )
1201 #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) )
1213 if( xInternalTaskHandle !=
NULL )
1215 lIndex = MPU_GetIndexForTaskHandle( xInternalTaskHandle );
1219 xExternalTaskHandle = (
TaskHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
1223 return xExternalTaskHandle;
1229 #if ( INCLUDE_xTaskGetSchedulerState == 1 )
1233 BaseType_t MPU_xTaskGetSchedulerStateImpl(
void )
1247 void MPU_vTaskSetTimeOutStateImpl(
TimeOut_t *
const pxTimeOut )
1251 if( pxTimeOut !=
NULL )
1253 xIsTimeOutWriteable = xPortIsAuthorizedToAccessBuffer( pxTimeOut,
1257 if( xIsTimeOutWriteable ==
pdTRUE )
1275 if( ( pxTimeOut !=
NULL ) && ( pxTicksToWait !=
NULL ) )
1277 xIsTimeOutWriteable = xPortIsAuthorizedToAccessBuffer( pxTimeOut,
1280 xIsTicksToWaitWriteable = xPortIsAuthorizedToAccessBuffer( pxTicksToWait,
1284 if( ( xIsTimeOutWriteable ==
pdTRUE ) && ( xIsTicksToWaitWriteable ==
pdTRUE ) )
1294 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1300 uint32_t * pulPreviousNotificationValue )
1327 if( pxParams !=
NULL )
1329 xAreParamsReadable = xPortIsAuthorizedToAccessBuffer( pxParams,
1334 if( xAreParamsReadable ==
pdTRUE )
1351 ( xIsPreviousNotificationValueWriteable ==
pdTRUE ) )
1355 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1357 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1359 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
1361 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1363 if( xInternalTaskHandle !=
NULL )
1383 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1386 uint32_t ulBitsToClearOnEntry,
1387 uint32_t ulBitsToClearOnExit,
1388 uint32_t * pulNotificationValue,
1413 if( pxParams !=
NULL )
1415 xAreParamsReadable = xPortIsAuthorizedToAccessBuffer( pxParams,
1420 if( xAreParamsReadable ==
pdTRUE )
1426 xIsNotificationValueWritable = xPortIsAuthorizedToAccessBuffer( pxParams->
pulNotificationValue,
1432 ( xIsNotificationValueWritable ==
pdTRUE ) )
1449 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1451 uint32_t MPU_ulTaskGenericNotifyTakeImpl(
UBaseType_t uxIndexToWaitOn,
1455 uint32_t MPU_ulTaskGenericNotifyTakeImpl(
UBaseType_t uxIndexToWaitOn,
1459 uint32_t ulReturn = 0;
1472 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1493 lIndex = ( int32_t ) xTask;
1495 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1497 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1499 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
1501 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1503 if( xInternalTaskHandle !=
NULL )
1518 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1520 uint32_t MPU_ulTaskGenericNotifyValueClearImpl(
TaskHandle_t xTask,
1524 uint32_t MPU_ulTaskGenericNotifyValueClearImpl(
TaskHandle_t xTask,
1526 uint32_t ulBitsToClear )
1528 uint32_t ulReturn = 0;
1541 lIndex = ( int32_t ) xTask;
1543 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1545 xCallingTaskIsAuthorizedToAccessTask = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1547 if( xCallingTaskIsAuthorizedToAccessTask ==
pdTRUE )
1549 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1551 if( xInternalTaskHandle !=
NULL )
1571 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
1574 const char *
const pcName,
1575 uint16_t usStackDepth,
1576 void * pvParameters,
1584 lIndex = MPU_GetFreeIndexInKernelObjectPool();
1591 xReturn = xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, &( xInternalTaskHandle ) );
1593 if( ( xReturn ==
pdPASS ) && ( xInternalTaskHandle !=
NULL ) )
1595 MPU_StoreTaskHandleAtIndex( lIndex, xInternalTaskHandle );
1597 if( pxCreatedTask !=
NULL )
1599 *pxCreatedTask = (
TaskHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
1604 MPU_SetIndexFreeInKernelObjectPool( lIndex );
1615 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
1618 const char *
const pcName,
1619 const uint32_t ulStackDepth,
1620 void *
const pvParameters,
1629 lIndex = MPU_GetFreeIndexInKernelObjectPool();
1633 xInternalTaskHandle = xTaskCreateStatic( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer );
1635 if( xInternalTaskHandle !=
NULL )
1637 MPU_StoreTaskHandleAtIndex( lIndex, xInternalTaskHandle );
1639 #if ( configENABLE_ACCESS_CONTROL_LIST == 1 )
1644 vPortGrantAccessToKernelObject( xInternalTaskHandle, lIndex );
1649 xExternalTaskHandle = (
TaskHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
1653 MPU_SetIndexFreeInKernelObjectPool( lIndex );
1657 return xExternalTaskHandle;
1663 #if ( INCLUDE_vTaskDelete == 1 )
1670 if( pxTaskToDelete ==
NULL )
1673 lIndex = MPU_GetIndexForTaskHandle( xInternalTaskHandle );
1679 MPU_SetIndexFreeInKernelObjectPool( lIndex );
1684 lIndex = ( int32_t ) pxTaskToDelete;
1686 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1688 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1690 if( xInternalTaskHandle !=
NULL )
1693 MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1703 #if ( INCLUDE_vTaskPrioritySet == 1 )
1711 if( pxTask ==
NULL )
1717 lIndex = ( int32_t ) pxTask;
1719 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1721 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1723 if( xInternalTaskHandle !=
NULL )
1734 #if ( INCLUDE_xTaskGetHandle == 1 )
1744 if( xInternalTaskHandle !=
NULL )
1746 lIndex = MPU_GetIndexForTaskHandle( xInternalTaskHandle );
1750 xExternalTaskHandle = (
TaskHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
1754 return xExternalTaskHandle;
1761 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
1764 void * pvParameter )
1776 lIndex = ( int32_t ) xTask;
1778 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1780 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1782 if( xInternalTaskHandle !=
NULL )
1795 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
1804 lIndex = MPU_GetFreeIndexInKernelObjectPool();
1808 xReturn = xTaskCreateRestricted( pxTaskDefinition, &( xInternalTaskHandle ) );
1810 if( ( xReturn ==
pdPASS ) && ( xInternalTaskHandle !=
NULL ) )
1812 MPU_StoreTaskHandleAtIndex( lIndex, xInternalTaskHandle );
1814 #if ( configENABLE_ACCESS_CONTROL_LIST == 1 )
1819 vPortGrantAccessToKernelObject( xInternalTaskHandle, lIndex );
1824 if( pxCreatedTask !=
NULL )
1826 *pxCreatedTask = (
TaskHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
1831 MPU_SetIndexFreeInKernelObjectPool( lIndex );
1841 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
1850 lIndex = MPU_GetFreeIndexInKernelObjectPool();
1854 xReturn = xTaskCreateRestrictedStatic( pxTaskDefinition, &( xInternalTaskHandle ) );
1856 if( ( xReturn ==
pdPASS ) && ( xInternalTaskHandle !=
NULL ) )
1858 MPU_StoreTaskHandleAtIndex( lIndex, xInternalTaskHandle );
1860 #if ( configENABLE_ACCESS_CONTROL_LIST == 1 )
1865 vPortGrantAccessToKernelObject( xInternalTaskHandle, lIndex );
1870 if( pxCreatedTask !=
NULL )
1872 *pxCreatedTask = (
TaskHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
1877 MPU_SetIndexFreeInKernelObjectPool( lIndex );
1887 void MPU_vTaskAllocateMPURegions(
TaskHandle_t xTaskToModify,
1893 if( xTaskToModify ==
NULL )
1899 lIndex = ( int32_t ) xTaskToModify;
1901 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1903 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1905 if( xInternalTaskHandle !=
NULL )
1914 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
1927 xReturn = xTaskGetStaticBuffers( xInternalTaskHandle, ppuxStackBuffer, ppxTaskBuffer );
1931 lIndex = ( int32_t ) xTask;
1933 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1935 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1937 if( xInternalTaskHandle !=
NULL )
1939 xReturn = xTaskGetStaticBuffers( xInternalTaskHandle, ppuxStackBuffer, ppxTaskBuffer );
1950 #if ( INCLUDE_uxTaskPriorityGet == 1 )
1964 lIndex = ( int32_t ) xTask;
1966 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1968 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1970 if( xInternalTaskHandle !=
NULL )
1983 #if ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) )
1991 lIndex = ( int32_t ) xTaskToResume;
1993 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
1995 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
1997 if( xInternalTaskHandle !=
NULL )
2009 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
2019 xReturn = xTaskGetApplicationTaskTagFromISR( xTask );
2023 lIndex = ( int32_t ) xTask;
2025 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2027 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2029 if( xInternalTaskHandle !=
NULL )
2031 xReturn = xTaskGetApplicationTaskTagFromISR( xInternalTaskHandle );
2042 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
2048 uint32_t * pulPreviousNotificationValue,
2055 lIndex = ( int32_t ) xTaskToNotify;
2057 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2059 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2061 if( xInternalTaskHandle !=
NULL )
2063 xReturn =
xTaskGenericNotifyFromISR( xInternalTaskHandle, uxIndexToNotify, ulValue, eAction, pulPreviousNotificationValue, pxHigherPriorityTaskWoken );
2073 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
2082 lIndex = ( int32_t ) xTaskToNotify;
2084 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2086 xInternalTaskHandle = MPU_GetTaskHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2088 if( xInternalTaskHandle !=
NULL )
2102 const void *
const pvItemToQueue,
2107 const void *
const pvItemToQueue,
2118 lIndex = ( int32_t ) xQueue;
2120 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2122 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2124 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2126 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2128 if( xInternalQueueHandle !=
NULL )
2133 if( ( !( ( pvItemToQueue ==
NULL ) && ( uxQueueItemSize != (
UBaseType_t ) 0U ) ) ) &&
2140 if( pvItemToQueue !=
NULL )
2142 xIsItemToQueueReadable = xPortIsAuthorizedToAccessBuffer( pvItemToQueue,
2147 if( ( pvItemToQueue ==
NULL ) || ( xIsItemToQueueReadable ==
pdTRUE ) )
2149 xReturn =
xQueueGenericSend( xInternalQueueHandle, pvItemToQueue, xTicksToWait, xCopyPosition );
2169 lIndex = ( int32_t ) pxQueue;
2171 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2173 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2175 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2177 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2179 if( xInternalQueueHandle !=
NULL )
2199 lIndex = ( int32_t ) xQueue;
2201 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2203 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2205 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2207 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2209 if( xInternalQueueHandle !=
NULL )
2221 void *
const pvBuffer,
2225 void *
const pvBuffer,
2235 lIndex = ( int32_t ) pxQueue;
2237 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2239 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2241 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2243 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2245 if( xInternalQueueHandle !=
NULL )
2249 if( ( !( ( ( pvBuffer ) ==
NULL ) && ( uxQueueItemSize != (
UBaseType_t ) 0U ) ) )
2255 xIsReceiveBufferWritable = xPortIsAuthorizedToAccessBuffer( pvBuffer,
2259 if( xIsReceiveBufferWritable ==
pdTRUE )
2261 xReturn =
xQueueReceive( xInternalQueueHandle, pvBuffer, xTicksToWait );
2273 void *
const pvBuffer,
2277 void *
const pvBuffer,
2287 lIndex = ( int32_t ) xQueue;
2289 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2291 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2293 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2295 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2297 if( xInternalQueueHandle !=
NULL )
2301 if( ( !( ( ( pvBuffer ) ==
NULL ) && ( uxQueueItemSize != (
UBaseType_t ) 0U ) ) )
2307 xIsReceiveBufferWritable = xPortIsAuthorizedToAccessBuffer( pvBuffer,
2311 if( xIsReceiveBufferWritable ==
pdTRUE )
2313 xReturn =
xQueuePeek( xInternalQueueHandle, pvBuffer, xTicksToWait );
2336 lIndex = ( int32_t ) xQueue;
2338 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2340 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2342 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2344 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2346 if( xInternalQueueHandle !=
NULL )
2350 if( ( uxQueueItemSize == 0 )
2366 #if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) )
2374 int32_t lIndex, lMutexHolderTaskIndex;
2379 lIndex = ( int32_t ) xSemaphore;
2381 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2383 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2385 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2387 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2389 if( xInternalQueueHandle !=
NULL )
2393 if( xMutexHolderTaskInternalHandle !=
NULL )
2395 lMutexHolderTaskIndex = MPU_GetIndexForTaskHandle( xMutexHolderTaskInternalHandle );
2397 if( lMutexHolderTaskIndex != -1 )
2399 xMutexHolderTaskExternalHandle = (
TaskHandle_t ) ( CONVERT_TO_EXTERNAL_INDEX( lMutexHolderTaskIndex ) );
2406 return xMutexHolderTaskExternalHandle;
2412 #if ( configUSE_RECURSIVE_MUTEXES == 1 )
2426 lIndex = ( int32_t ) xMutex;
2428 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2430 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2432 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2434 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2436 if( xInternalQueueHandle !=
NULL )
2440 if( uxQueueItemSize == 0 )
2454 #if ( configUSE_RECURSIVE_MUTEXES == 1 )
2465 lIndex = ( int32_t ) xMutex;
2467 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2469 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2471 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2473 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2475 if( xInternalQueueHandle !=
NULL )
2488 #if ( configUSE_QUEUE_SETS == 1 )
2499 int32_t lIndexQueueSet, lIndexSelectedMember;
2502 lIndexQueueSet = ( int32_t ) xQueueSet;
2504 if( IS_EXTERNAL_INDEX_VALID( lIndexQueueSet ) !=
pdFALSE )
2506 xCallingTaskIsAuthorizedToAccessQueueSet = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSet ) );
2508 if( xCallingTaskIsAuthorizedToAccessQueueSet ==
pdTRUE )
2510 xInternalQueueSetHandle = MPU_GetQueueSetHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSet ) );
2512 if( xInternalQueueSetHandle !=
NULL )
2514 xSelectedMemberInternal =
xQueueSelectFromSet( xInternalQueueSetHandle, xBlockTimeTicks );
2516 if( xSelectedMemberInternal !=
NULL )
2518 lIndexSelectedMember = MPU_GetIndexForQueueSetMemberHandle( xSelectedMemberInternal );
2520 if( lIndexSelectedMember != -1 )
2522 xSelectedMemberExternal = (
QueueSetMemberHandle_t ) ( CONVERT_TO_EXTERNAL_INDEX( lIndexSelectedMember ) );
2529 return xSelectedMemberExternal;
2535 #if ( configUSE_QUEUE_SETS == 1 )
2546 int32_t lIndexQueueSet, lIndexQueueSetMember;
2550 lIndexQueueSet = ( int32_t ) xQueueSet;
2551 lIndexQueueSetMember = ( int32_t ) xQueueOrSemaphore;
2553 if( ( IS_EXTERNAL_INDEX_VALID( lIndexQueueSet ) !=
pdFALSE ) &&
2554 ( IS_EXTERNAL_INDEX_VALID( lIndexQueueSetMember ) !=
pdFALSE ) )
2556 xCallingTaskIsAuthorizedToAccessQueueSet = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSet ) );
2557 xCallingTaskIsAuthorizedToAccessQueueSetMember = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSetMember ) );
2559 if( ( xCallingTaskIsAuthorizedToAccessQueueSet ==
pdTRUE ) && ( xCallingTaskIsAuthorizedToAccessQueueSetMember ==
pdTRUE ) )
2561 xInternalQueueSetHandle = MPU_GetQueueSetHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSet ) );
2562 xInternalQueueSetMemberHandle = MPU_GetQueueSetMemberHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSetMember ) );
2564 if( ( xInternalQueueSetHandle !=
NULL ) && ( xInternalQueueSetMemberHandle !=
NULL ) )
2566 xReturn =
xQueueAddToSet( xInternalQueueSetMemberHandle, xInternalQueueSetHandle );
2577 #if configQUEUE_REGISTRY_SIZE > 0
2583 const char * pcName )
2589 lIndex = ( int32_t ) xQueue;
2591 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2593 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2595 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2597 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2599 if( xInternalQueueHandle !=
NULL )
2610 #if configQUEUE_REGISTRY_SIZE > 0
2620 lIndex = ( int32_t ) xQueue;
2622 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2624 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2626 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2628 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2630 if( xInternalQueueHandle !=
NULL )
2641 #if configQUEUE_REGISTRY_SIZE > 0
2647 const char * pcReturn =
NULL;
2652 lIndex = ( int32_t ) xQueue;
2654 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2656 xCallingTaskIsAuthorizedToAccessQueue = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2658 if( xCallingTaskIsAuthorizedToAccessQueue ==
pdTRUE )
2660 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2662 if( xInternalQueueHandle !=
NULL )
2685 lIndex = ( int32_t ) xQueue;
2687 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2689 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2691 if( xInternalQueueHandle !=
NULL )
2694 MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2700 #if ( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
2708 lIndex = MPU_GetFreeIndexInKernelObjectPool();
2714 if( xInternalQueueHandle !=
NULL )
2716 MPU_StoreQueueHandleAtIndex( lIndex, xInternalQueueHandle );
2717 xExternalQueueHandle = (
QueueHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
2721 MPU_SetIndexFreeInKernelObjectPool( lIndex );
2725 return xExternalQueueHandle;
2731 #if ( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
2740 lIndex = MPU_GetFreeIndexInKernelObjectPool();
2746 if( xInternalQueueHandle !=
NULL )
2748 MPU_StoreQueueHandleAtIndex( lIndex, xInternalQueueHandle );
2749 xExternalQueueHandle = (
QueueHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
2753 MPU_SetIndexFreeInKernelObjectPool( lIndex );
2757 return xExternalQueueHandle;
2763 #if ( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
2772 lIndex = MPU_GetFreeIndexInKernelObjectPool();
2778 if( xInternalQueueHandle !=
NULL )
2780 MPU_StoreQueueHandleAtIndex( lIndex, xInternalQueueHandle );
2781 xExternalQueueHandle = (
QueueHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
2785 MPU_SetIndexFreeInKernelObjectPool( lIndex );
2789 return xExternalQueueHandle;
2795 #if ( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
2805 lIndex = MPU_GetFreeIndexInKernelObjectPool();
2811 if( xInternalQueueHandle !=
NULL )
2813 MPU_StoreQueueHandleAtIndex( lIndex, xInternalQueueHandle );
2814 xExternalQueueHandle = (
QueueHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
2818 MPU_SetIndexFreeInKernelObjectPool( lIndex );
2822 return xExternalQueueHandle;
2828 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
2832 uint8_t ucQueueType )
2838 lIndex = MPU_GetFreeIndexInKernelObjectPool();
2842 xInternalQueueHandle = xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );
2844 if( xInternalQueueHandle !=
NULL )
2846 MPU_StoreQueueHandleAtIndex( lIndex, xInternalQueueHandle );
2847 xExternalQueueHandle = (
QueueHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
2851 MPU_SetIndexFreeInKernelObjectPool( lIndex );
2855 return xExternalQueueHandle;
2861 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
2865 uint8_t * pucQueueStorage,
2867 const uint8_t ucQueueType )
2873 lIndex = MPU_GetFreeIndexInKernelObjectPool();
2877 xInternalQueueHandle = xQueueGenericCreateStatic( uxQueueLength, uxItemSize, pucQueueStorage, pxStaticQueue, ucQueueType );
2879 if( xInternalQueueHandle !=
NULL )
2881 MPU_StoreQueueHandleAtIndex( lIndex, xInternalQueueHandle );
2882 xExternalQueueHandle = (
QueueHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
2886 MPU_SetIndexFreeInKernelObjectPool( lIndex );
2890 return xExternalQueueHandle;
2903 lIndex = ( uint32_t ) xQueue;
2905 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2907 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2909 if( xInternalQueueHandle !=
NULL )
2919 #if ( ( configUSE_QUEUE_SETS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
2927 lIndex = MPU_GetFreeIndexInKernelObjectPool();
2933 if( xInternalQueueSetHandle !=
NULL )
2935 MPU_StoreQueueSetHandleAtIndex( lIndex, xInternalQueueSetHandle );
2936 xExternalQueueSetHandle = (
QueueSetHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
2940 MPU_SetIndexFreeInKernelObjectPool( lIndex );
2944 return xExternalQueueSetHandle;
2950 #if ( configUSE_QUEUE_SETS == 1 )
2958 int32_t lIndexQueueSet, lIndexQueueSetMember;
2960 lIndexQueueSet = ( int32_t ) xQueueSet;
2961 lIndexQueueSetMember = ( int32_t ) xQueueOrSemaphore;
2963 if( ( IS_EXTERNAL_INDEX_VALID( lIndexQueueSet ) !=
pdFALSE ) &&
2964 ( IS_EXTERNAL_INDEX_VALID( lIndexQueueSetMember ) !=
pdFALSE ) )
2966 xInternalQueueSetHandle = MPU_GetQueueSetHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSet ) );
2967 xInternalQueueSetMemberHandle = MPU_GetQueueSetMemberHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSetMember ) );
2969 if( ( xInternalQueueSetHandle !=
NULL ) && ( xInternalQueueSetMemberHandle !=
NULL ) )
2981 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
2984 uint8_t ** ppucQueueStorage,
2991 lIndex = ( int32_t ) xQueue;
2993 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
2995 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
2997 if( xInternalQueueHandle !=
NULL )
2999 xReturn = xQueueGenericGetStaticBuffers( xInternalQueueHandle, ppucQueueStorage, ppxStaticQueue );
3010 const void *
const pvItemToQueue,
3011 BaseType_t *
const pxHigherPriorityTaskWoken,
3018 lIndex = ( int32_t ) xQueue;
3020 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3022 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3024 if( xInternalQueueHandle !=
NULL )
3026 xReturn =
xQueueGenericSendFromISR( xInternalQueueHandle, pvItemToQueue, pxHigherPriorityTaskWoken, xCopyPosition );
3036 BaseType_t *
const pxHigherPriorityTaskWoken )
3042 lIndex = ( int32_t ) xQueue;
3044 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3046 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3048 if( xInternalQueueHandle !=
NULL )
3060 void *
const pvBuffer )
3066 lIndex = ( int32_t ) xQueue;
3068 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3070 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3072 if( xInternalQueueHandle !=
NULL )
3084 void *
const pvBuffer,
3085 BaseType_t *
const pxHigherPriorityTaskWoken )
3091 lIndex = ( int32_t ) xQueue;
3093 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3095 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3097 if( xInternalQueueHandle !=
NULL )
3114 lIndex = ( int32_t ) xQueue;
3116 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3118 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3120 if( xInternalQueueHandle !=
NULL )
3136 lIndex = ( int32_t ) xQueue;
3138 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3140 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3142 if( xInternalQueueHandle !=
NULL )
3159 lIndex = ( int32_t ) xQueue;
3161 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3163 xInternalQueueHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3165 if( xInternalQueueHandle !=
NULL )
3176 #if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) )
3182 int32_t lIndex, lMutexHolderTaskIndex;
3185 lIndex = ( int32_t ) xSemaphore;
3187 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3189 xInternalSemaphoreHandle = MPU_GetQueueHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3191 if( xInternalSemaphoreHandle !=
NULL )
3195 if( xMutexHolderTaskInternalHandle !=
NULL )
3197 lMutexHolderTaskIndex = MPU_GetIndexForTaskHandle( xMutexHolderTaskInternalHandle );
3199 if( lMutexHolderTaskIndex != -1 )
3201 xMutexHolderTaskExternalHandle = (
TaskHandle_t ) ( CONVERT_TO_EXTERNAL_INDEX( lMutexHolderTaskIndex ) );
3207 return xMutexHolderTaskExternalHandle;
3213 #if ( configUSE_QUEUE_SETS == 1 )
3220 int32_t lIndexQueueSet, lIndexSelectedMember;
3222 lIndexQueueSet = ( int32_t ) xQueueSet;
3224 if( IS_EXTERNAL_INDEX_VALID( lIndexQueueSet ) !=
pdFALSE )
3226 xInternalQueueSetHandle = MPU_GetQueueSetHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndexQueueSet ) );
3228 if( xInternalQueueSetHandle !=
NULL )
3232 if( xSelectedMemberInternal !=
NULL )
3234 lIndexSelectedMember = MPU_GetIndexForQueueSetMemberHandle( xSelectedMemberInternal );
3236 if( lIndexSelectedMember != -1 )
3238 xSelectedMemberExternal = (
QueueSetMemberHandle_t ) ( CONVERT_TO_EXTERNAL_INDEX( lIndexSelectedMember ) );
3244 return xSelectedMemberExternal;
3254 #if ( configUSE_TIMERS == 1 )
3258 void * MPU_pvTimerGetTimerIDImpl(
const TimerHandle_t xTimer )
3260 void * pvReturn =
NULL;
3265 lIndex = ( int32_t ) xTimer;
3267 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3269 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3271 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3273 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3275 if( xInternalTimerHandle !=
NULL )
3288 #if ( configUSE_TIMERS == 1 )
3300 lIndex = ( int32_t ) xTimer;
3302 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3304 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3306 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3308 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3310 if( xInternalTimerHandle !=
NULL )
3321 #if ( configUSE_TIMERS == 1 )
3332 lIndex = ( int32_t ) xTimer;
3334 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3336 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3338 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3340 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3342 if( xInternalTimerHandle !=
NULL )
3355 #if ( configUSE_TIMERS == 1 )
3359 TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandleImpl(
void )
3371 #if ( configUSE_TIMERS == 1 )
3376 BaseType_t *
const pxHigherPriorityTaskWoken,
3404 if( pxParams !=
NULL )
3406 xAreParamsReadable = xPortIsAuthorizedToAccessBuffer( pxParams,
3411 if( xAreParamsReadable ==
pdTRUE )
3421 ( xIsHigherPriorityTaskWokenWriteable ==
pdTRUE ) )
3423 lIndex = ( int32_t ) ( pxParams->
xTimer );
3425 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3427 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3429 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3431 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3433 if( xInternalTimerHandle !=
NULL )
3457 if( pxParams !=
NULL )
3459 lIndex = ( int32_t ) ( pxParams->
xTimer );
3461 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3463 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3465 if( xInternalTimerHandle !=
NULL )
3482 #if ( configUSE_TIMERS == 1 )
3488 const char * pcReturn =
NULL;
3493 lIndex = ( int32_t ) xTimer;
3495 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3497 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3499 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3501 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3503 if( xInternalTimerHandle !=
NULL )
3516 #if ( configUSE_TIMERS == 1 )
3528 lIndex = ( int32_t ) xTimer;
3530 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3532 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3534 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3536 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3538 if( xInternalTimerHandle !=
NULL )
3549 #if ( configUSE_TIMERS == 1 )
3560 lIndex = ( int32_t ) xTimer;
3562 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3564 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3566 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3568 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3570 if( xInternalTimerHandle !=
NULL )
3583 #if ( configUSE_TIMERS == 1 )
3594 lIndex = ( int32_t ) xTimer;
3596 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3598 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3600 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3602 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3604 if( xInternalTimerHandle !=
NULL )
3617 #if ( configUSE_TIMERS == 1 )
3628 lIndex = ( int32_t ) xTimer;
3630 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3632 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3634 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3636 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3638 if( xInternalTimerHandle !=
NULL )
3651 #if ( configUSE_TIMERS == 1 )
3662 lIndex = ( int32_t ) xTimer;
3664 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3666 xCallingTaskIsAuthorizedToAccessTimer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3668 if( xCallingTaskIsAuthorizedToAccessTimer ==
pdTRUE )
3670 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3672 if( xInternalTimerHandle !=
NULL )
3690 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 )
3695 void *
const pvTimerID,
3702 lIndex = MPU_GetFreeIndexInKernelObjectPool();
3706 xInternalTimerHandle = xTimerCreate( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, MPU_TimerCallback );
3708 if( xInternalTimerHandle !=
NULL )
3710 MPU_StoreTimerHandleAtIndex( lIndex, xInternalTimerHandle, pxCallbackFunction );
3711 xExternalTimerHandle = (
TimerHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
3715 MPU_SetIndexFreeInKernelObjectPool( lIndex );
3719 return xExternalTimerHandle;
3725 #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 )
3730 void *
const pvTimerID,
3738 lIndex = MPU_GetFreeIndexInKernelObjectPool();
3742 xInternalTimerHandle = xTimerCreateStatic( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, MPU_TimerCallback, pxTimerBuffer );
3744 if( xInternalTimerHandle !=
NULL )
3746 MPU_StoreTimerHandleAtIndex( lIndex, xInternalTimerHandle, pxCallbackFunction );
3747 xExternalTimerHandle = (
TimerHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
3751 MPU_SetIndexFreeInKernelObjectPool( lIndex );
3755 return xExternalTimerHandle;
3761 #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 )
3770 lIndex = ( int32_t ) xTimer;
3772 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3774 xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3776 if( xInternalTimerHandle !=
NULL )
3778 xReturn = xTimerGetStaticBuffer( xInternalTimerHandle, ppxTimerBuffer );
3822 if( pxParams !=
NULL )
3824 xAreParamsReadable = xPortIsAuthorizedToAccessBuffer( pxParams,
3829 if( xAreParamsReadable ==
pdTRUE )
3840 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3842 xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3844 if( xCallingTaskIsAuthorizedToAccessEventGroup ==
pdTRUE )
3846 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3848 if( xInternalEventGroupHandle !=
NULL )
3878 lIndex = ( int32_t ) xEventGroup;
3880 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3882 xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3884 if( xCallingTaskIsAuthorizedToAccessEventGroup ==
pdTRUE )
3886 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3888 if( xInternalEventGroupHandle !=
NULL )
3913 lIndex = ( int32_t ) xEventGroup;
3915 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3917 xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3919 if( xCallingTaskIsAuthorizedToAccessEventGroup ==
pdTRUE )
3921 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3923 if( xInternalEventGroupHandle !=
NULL )
3951 ( uxBitsToWaitFor != 0 )
3957 lIndex = ( int32_t ) xEventGroup;
3959 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3961 xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3963 if( xCallingTaskIsAuthorizedToAccessEventGroup ==
pdTRUE )
3965 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3967 if( xInternalEventGroupHandle !=
NULL )
3969 xReturn =
xEventGroupSync( xInternalEventGroupHandle, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
3979 #if ( configUSE_TRACE_FACILITY == 1 )
3983 UBaseType_t MPU_uxEventGroupGetNumberImpl(
void * xEventGroup )
3990 lIndex = ( int32_t ) xEventGroup;
3992 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
3994 xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
3996 if( xCallingTaskIsAuthorizedToAccessEventGroup ==
pdTRUE )
3998 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4000 if( xInternalEventGroupHandle !=
NULL )
4002 xReturn = uxEventGroupGetNumber( xInternalEventGroupHandle );
4013 #if ( configUSE_TRACE_FACILITY == 1 )
4015 void MPU_vEventGroupSetNumberImpl(
void * xEventGroup,
4018 void MPU_vEventGroupSetNumberImpl(
void * xEventGroup,
4025 lIndex = ( int32_t ) xEventGroup;
4027 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4029 xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4031 if( xCallingTaskIsAuthorizedToAccessEventGroup ==
pdTRUE )
4033 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4035 if( xInternalEventGroupHandle !=
NULL )
4037 vEventGroupSetNumber( xInternalEventGroupHandle, uxEventGroupNumber );
4051 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
4059 lIndex = MPU_GetFreeIndexInKernelObjectPool();
4063 xInternalEventGroupHandle = xEventGroupCreate();
4065 if( xInternalEventGroupHandle !=
NULL )
4067 MPU_StoreEventGroupHandleAtIndex( lIndex, xInternalEventGroupHandle );
4068 xExternalEventGroupHandle = (
EventGroupHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
4072 MPU_SetIndexFreeInKernelObjectPool( lIndex );
4076 return xExternalEventGroupHandle;
4082 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
4090 lIndex = MPU_GetFreeIndexInKernelObjectPool();
4094 xInternalEventGroupHandle = xEventGroupCreateStatic( pxEventGroupBuffer );
4096 if( xInternalEventGroupHandle !=
NULL )
4098 MPU_StoreEventGroupHandleAtIndex( lIndex, xInternalEventGroupHandle );
4099 xExternalEventGroupHandle = (
EventGroupHandle_t ) CONVERT_TO_EXTERNAL_INDEX( lIndex );
4103 MPU_SetIndexFreeInKernelObjectPool( lIndex );
4107 return xExternalEventGroupHandle;
4118 lIndex = ( int32_t ) xEventGroup;
4120 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4122 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4124 if( xInternalEventGroupHandle !=
NULL )
4127 MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4133 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
4142 lIndex = ( int32_t ) xEventGroup;
4144 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4146 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4148 if( xInternalEventGroupHandle !=
NULL )
4150 xReturn = xEventGroupGetStaticBuffer( xInternalEventGroupHandle, ppxEventGroupBuffer );
4160 #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
4169 lIndex = ( int32_t ) xEventGroup;
4171 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4173 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4175 if( xInternalEventGroupHandle !=
NULL )
4187 #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
4197 lIndex = ( int32_t ) xEventGroup;
4199 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4201 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4203 if( xInternalEventGroupHandle !=
NULL )
4221 lIndex = ( int32_t ) xEventGroup;
4223 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4225 xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4227 if( xInternalEventGroupHandle !=
NULL )
4242 const void * pvTxData,
4243 size_t xDataLengthBytes,
4247 const void * pvTxData,
4248 size_t xDataLengthBytes,
4257 if( pvTxData !=
NULL )
4259 xIsTxDataBufferReadable = xPortIsAuthorizedToAccessBuffer( pvTxData,
4263 if( xIsTxDataBufferReadable ==
pdTRUE )
4265 lIndex = ( int32_t ) xStreamBuffer;
4267 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4269 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4271 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4273 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4275 if( xInternalStreamBufferHandle !=
NULL )
4277 xReturn =
xStreamBufferSend( xInternalStreamBufferHandle, pvTxData, xDataLengthBytes, xTicksToWait );
4290 size_t xBufferLengthBytes,
4295 size_t xBufferLengthBytes,
4304 if( pvRxData !=
NULL )
4306 xIsRxDataBufferWriteable = xPortIsAuthorizedToAccessBuffer( pvRxData,
4310 if( xIsRxDataBufferWriteable ==
pdTRUE )
4312 lIndex = ( int32_t ) xStreamBuffer;
4314 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4316 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4318 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4320 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4322 if( xInternalStreamBufferHandle !=
NULL )
4324 xReturn =
xStreamBufferReceive( xInternalStreamBufferHandle, pvRxData, xBufferLengthBytes, xTicksToWait );
4344 lIndex = ( int32_t ) xStreamBuffer;
4346 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4348 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4350 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4352 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4354 if( xInternalStreamBufferHandle !=
NULL )
4374 lIndex = ( int32_t ) xStreamBuffer;
4376 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4378 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4380 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4382 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4384 if( xInternalStreamBufferHandle !=
NULL )
4404 lIndex = ( int32_t ) xStreamBuffer;
4406 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4408 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4410 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4412 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4414 if( xInternalStreamBufferHandle !=
NULL )
4434 lIndex = ( int32_t ) xStreamBuffer;
4436 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4438 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4440 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4442 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4444 if( xInternalStreamBufferHandle !=
NULL )
4459 size_t xTriggerLevel )
4466 lIndex = ( int32_t ) xStreamBuffer;
4468 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4470 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4472 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4474 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4476 if( xInternalStreamBufferHandle !=
NULL )
4496 lIndex = ( int32_t ) xStreamBuffer;
4498 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4500 xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4502 if( xCallingTaskIsAuthorizedToAccessStreamBuffer ==
pdTRUE )
4504 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4506 if( xInternalStreamBufferHandle !=
NULL )
4522 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
4525 size_t xTriggerLevelBytes,
4539 ( pxReceiveCompletedCallback ==
NULL ) );
4541 if( ( pxSendCompletedCallback ==
NULL ) &&
4542 ( pxReceiveCompletedCallback ==
NULL ) )
4544 lIndex = MPU_GetFreeIndexInKernelObjectPool();
4554 if( xInternalStreamBufferHandle !=
NULL )
4556 MPU_StoreStreamBufferHandleAtIndex( lIndex, xInternalStreamBufferHandle );
4561 MPU_SetIndexFreeInKernelObjectPool( lIndex );
4568 xExternalStreamBufferHandle =
NULL;
4571 return xExternalStreamBufferHandle;
4577 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
4580 size_t xTriggerLevelBytes,
4582 uint8_t *
const pucStreamBufferStorageArea,
4596 ( pxReceiveCompletedCallback ==
NULL ) );
4598 if( ( pxSendCompletedCallback ==
NULL ) &&
4599 ( pxReceiveCompletedCallback ==
NULL ) )
4601 lIndex = MPU_GetFreeIndexInKernelObjectPool();
4608 pucStreamBufferStorageArea,
4609 pxStaticStreamBuffer,
4613 if( xInternalStreamBufferHandle !=
NULL )
4615 MPU_StoreStreamBufferHandleAtIndex( lIndex, xInternalStreamBufferHandle );
4620 MPU_SetIndexFreeInKernelObjectPool( lIndex );
4627 xExternalStreamBufferHandle =
NULL;
4630 return xExternalStreamBufferHandle;
4641 lIndex = ( int32_t ) xStreamBuffer;
4643 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4645 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4647 if( xInternalStreamBufferHandle !=
NULL )
4652 MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4663 lIndex = ( int32_t ) xStreamBuffer;
4665 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4667 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4669 if( xInternalStreamBufferHandle !=
NULL )
4679 #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
4682 uint8_t * ppucStreamBufferStorageArea,
4689 lIndex = ( int32_t ) xStreamBuffers;
4691 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4693 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4695 if( xInternalStreamBufferHandle !=
NULL )
4708 const void * pvTxData,
4709 size_t xDataLengthBytes,
4710 BaseType_t *
const pxHigherPriorityTaskWoken )
4716 lIndex = ( int32_t ) xStreamBuffer;
4718 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4720 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4722 if( xInternalStreamBufferHandle !=
NULL )
4724 xReturn =
xStreamBufferSendFromISR( xInternalStreamBufferHandle, pvTxData, xDataLengthBytes, pxHigherPriorityTaskWoken );
4734 size_t xBufferLengthBytes,
4735 BaseType_t *
const pxHigherPriorityTaskWoken )
4741 lIndex = ( int32_t ) xStreamBuffer;
4743 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4745 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4747 if( xInternalStreamBufferHandle !=
NULL )
4764 lIndex = ( int32_t ) xStreamBuffer;
4766 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4768 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4770 if( xInternalStreamBufferHandle !=
NULL )
4787 lIndex = ( int32_t ) xStreamBuffer;
4789 if( IS_EXTERNAL_INDEX_VALID( lIndex ) !=
pdFALSE )
4791 xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
4793 if( xInternalStreamBufferHandle !=
NULL )
4807 #if configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS == 1
4808 #include "application_defined_privileged_functions.h"
4820 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
4828 #if ( configUSE_TIMERS == 1 )
4844 #if ( INCLUDE_xTaskAbortDelay == 1 )
4850 #if ( INCLUDE_vTaskDelay == 1 )
4856 #if ( INCLUDE_uxTaskPriorityGet == 1 )
4862 #if ( INCLUDE_eTaskGetState == 1 )
4868 #if ( configUSE_TRACE_FACILITY == 1 )
4874 #if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )
4880 #if ( INCLUDE_vTaskSuspend == 1 )
4900 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )
4901 (
UBaseType_t ) MPU_ulTaskGetIdleRunTimePercentImpl,
4902 (
UBaseType_t ) MPU_ulTaskGetIdleRunTimeCounterImpl,
4908 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
4909 (
UBaseType_t ) MPU_vTaskSetApplicationTaskTagImpl,
4910 (
UBaseType_t ) MPU_xTaskGetApplicationTaskTagImpl,
4916 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
4917 (
UBaseType_t ) MPU_vTaskSetThreadLocalStoragePointerImpl,
4918 (
UBaseType_t ) MPU_pvTaskGetThreadLocalStoragePointerImpl,
4924 #if ( configUSE_TRACE_FACILITY == 1 )
4930 #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 )
4931 (
UBaseType_t ) MPU_uxTaskGetStackHighWaterMarkImpl,
4936 #if ( INCLUDE_uxTaskGetStackHighWaterMark2 == 1 )
4937 (
UBaseType_t ) MPU_uxTaskGetStackHighWaterMark2Impl,
4942 #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) )
4943 (
UBaseType_t ) MPU_xTaskGetCurrentTaskHandleImpl,
4948 #if ( INCLUDE_xTaskGetSchedulerState == 1 )
4957 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
4959 (
UBaseType_t ) MPU_xTaskGenericNotifyStateClearImpl,
4960 (
UBaseType_t ) MPU_ulTaskGenericNotifyValueClearImpl,
4974 #if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) )
4980 #if ( configUSE_RECURSIVE_MUTEXES == 1 )
4988 #if ( configUSE_QUEUE_SETS == 1 )
4996 #if configQUEUE_REGISTRY_SIZE > 0
5006 #if ( configUSE_TIMERS == 1 )
5010 (
UBaseType_t ) MPU_xTimerGetTimerDaemonTaskHandleImpl,
5046 (
UBaseType_t ) MPU_xStreamBufferSpacesAvailableImpl,
5047 (
UBaseType_t ) MPU_xStreamBufferBytesAvailableImpl,
5048 (
UBaseType_t ) MPU_xStreamBufferSetTriggerLevelImpl,
5049 (
UBaseType_t ) MPU_xStreamBufferNextMessageLengthBytesImpl
#define configUSE_TRACE_FACILITY
#define INCLUDE_xTaskDelayUntil
#define configMAX_PRIORITIES
#define INCLUDE_xTaskGetSchedulerState
struct xSTATIC_QUEUE StaticQueue_t
#define portPRIVILEGE_BIT
#define traceSTREAM_BUFFER_CREATE_FAILED(xIsMessageBuffer)
struct xSTATIC_STREAM_BUFFER StaticStreamBuffer_t
#define vQueueAddToRegistry(xQueue, pcName)
#define configTASK_NOTIFICATION_ARRAY_ENTRIES
#define traceSTREAM_BUFFER_CREATE_STATIC_FAILED(xReturn, xIsMessageBuffer)
struct xSTATIC_TIMER StaticTimer_t
#define configRUN_TIME_COUNTER_TYPE
#define configGENERATE_RUN_TIME_STATS
#define configSTACK_DEPTH_TYPE
#define pcQueueGetName(xQueue)
struct xSTATIC_TCB StaticTask_t
#define vQueueUnregisterQueue(xQueue)
struct xSTATIC_EVENT_GROUP StaticEventGroup_t
EventBits_t xEventGroupWaitBits(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait)
void vEventGroupDelete(EventGroupHandle_t xEventGroup)
event_groups.h
EventBits_t xEventGroupClearBits(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear)
EventBits_t xEventGroupSetBits(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet)
EventBits_t xEventGroupSync(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait)
EventBits_t xEventGroupGetBitsFromISR(EventGroupHandle_t xEventGroup)
#define xEventGroupClearBitsFromISR(xEventGroup, uxBitsToClear)
#define eventEVENT_BITS_CONTROL_BYTES
#define xEventGroupSetBitsFromISR(xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken)
struct EventGroupDef_t * EventGroupHandle_t
UBaseType_t MPU_uxTaskPriorityGetFromISR(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
QueueHandle_t MPU_xQueueCreateMutexStatic(const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskGenericNotifyEntry(const xTaskGenericNotifyParams_t *pxParams) FREERTOS_SYSTEM_CALL
QueueHandle_t MPU_xQueueGenericCreate(const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType) PRIVILEGED_FUNCTION
struct xTaskGenericNotifyWaitParams xTaskGenericNotifyWaitParams_t
void MPU_vEventGroupDelete(EventGroupHandle_t xEventGroup) PRIVILEGED_FUNCTION
void MPU_vTaskGenericNotifyGiveFromISR(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueueGenericSendFromISR(QueueHandle_t xQueue, const void *const pvItemToQueue, BaseType_t *const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskGenericNotifyFromISR(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueueRemoveFromSet(QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
TaskHookFunction_t MPU_xTaskGetApplicationTaskTagFromISR(TaskHandle_t xTask) PRIVILEGED_FUNCTION
StreamBufferHandle_t MPU_xStreamBufferGenericCreateStatic(size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xStreamBufferType, uint8_t *const pucStreamBufferStorageArea, StaticStreamBuffer_t *const pxStaticStreamBuffer, StreamBufferCallbackFunction_t pxSendCompletedCallback, StreamBufferCallbackFunction_t pxReceiveCompletedCallback) PRIVILEGED_FUNCTION
void MPU_vTaskDelete(TaskHandle_t xTaskToDelete) PRIVILEGED_FUNCTION
struct xTimerGenericCommandParams xTimerGenericCommandParams_t
EventBits_t MPU_xEventGroupGetBitsFromISR(EventGroupHandle_t xEventGroup) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskGenericNotifyWaitEntry(const xTaskGenericNotifyWaitParams_t *pxParams) FREERTOS_SYSTEM_CALL
QueueHandle_t MPU_xQueueGenericCreateStatic(const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType) PRIVILEGED_FUNCTION
size_t MPU_xStreamBufferReceiveFromISR(StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueueGiveFromISR(QueueHandle_t xQueue, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
struct xEventGroupWaitBitsParams xEventGroupWaitBitsParams_t
BaseType_t MPU_xQueueIsQueueFullFromISR(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
EventGroupHandle_t MPU_xEventGroupCreate(void) PRIVILEGED_FUNCTION
QueueHandle_t MPU_xQueueCreateCountingSemaphoreStatic(const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue) PRIVILEGED_FUNCTION
TimerHandle_t MPU_xTimerCreateStatic(const char *const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void *const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer) PRIVILEGED_FUNCTION
void MPU_vTaskPrioritySet(TaskHandle_t xTask, UBaseType_t uxNewPriority) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskGenericNotify(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue) FREERTOS_SYSTEM_CALL
void MPU_vQueueDelete(QueueHandle_t xQueue) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskGenericNotifyWait(UBaseType_t uxIndexToWaitOn, uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait) FREERTOS_SYSTEM_CALL
BaseType_t MPU_xTimerGenericCommandEntry(const xTimerGenericCommandParams_t *pxParams) FREERTOS_SYSTEM_CALL
BaseType_t MPU_xEventGroupSetBitsFromISR(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskResumeFromISR(TaskHandle_t xTaskToResume) PRIVILEGED_FUNCTION
BaseType_t MPU_xStreamBufferReceiveCompletedFromISR(StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
QueueSetHandle_t MPU_xQueueCreateSet(const UBaseType_t uxEventQueueLength) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskGetStaticBuffers(TaskHandle_t xTask, StackType_t **ppuxStackBuffer, StaticTask_t **ppxTaskBuffer) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueueGenericGetStaticBuffers(QueueHandle_t xQueue, uint8_t **ppucQueueStorage, StaticQueue_t **ppxStaticQueue) PRIVILEGED_FUNCTION
BaseType_t MPU_xStreamBufferGetStaticBuffers(StreamBufferHandle_t xStreamBuffers, uint8_t *ppucStreamBufferStorageArea, StaticStreamBuffer_t *ppxStaticStreamBuffer) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskCreate(TaskFunction_t pxTaskCode, const char *const pcName, const uint16_t usStackDepth, void *const pvParameters, UBaseType_t uxPriority, TaskHandle_t *const pxCreatedTask) PRIVILEGED_FUNCTION
StreamBufferHandle_t MPU_xStreamBufferGenericCreate(size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xStreamBufferType, StreamBufferCallbackFunction_t pxSendCompletedCallback, StreamBufferCallbackFunction_t pxReceiveCompletedCallback) PRIVILEGED_FUNCTION
BaseType_t MPU_xStreamBufferSendCompletedFromISR(StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueuePeekFromISR(QueueHandle_t xQueue, void *const pvBuffer) PRIVILEGED_FUNCTION
BaseType_t MPU_xEventGroupGetStaticBuffer(EventGroupHandle_t xEventGroup, StaticEventGroup_t **ppxEventGroupBuffer) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueueGenericReset(QueueHandle_t xQueue, BaseType_t xNewQueue) PRIVILEGED_FUNCTION
QueueHandle_t MPU_xQueueCreateCountingSemaphore(const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount) PRIVILEGED_FUNCTION
QueueSetMemberHandle_t MPU_xQueueSelectFromSetFromISR(QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
EventBits_t MPU_xEventGroupWaitBitsEntry(const xEventGroupWaitBitsParams_t *pxParams) FREERTOS_SYSTEM_CALL
BaseType_t MPU_xTaskCreateRestrictedStatic(const TaskParameters_t *const pxTaskDefinition, TaskHandle_t *pxCreatedTask) PRIVILEGED_FUNCTION
void vTaskAllocateMPURegions(TaskHandle_t xTaskToModify, const MemoryRegion_t *const xRegions) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueueIsQueueEmptyFromISR(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
struct xTaskGenericNotifyParams xTaskGenericNotifyParams_t
EventGroupHandle_t MPU_xEventGroupCreateStatic(StaticEventGroup_t *pxEventGroupBuffer) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskCallApplicationTaskHook(TaskHandle_t xTask, void *pvParameter) PRIVILEGED_FUNCTION
TaskHandle_t MPU_xQueueGetMutexHolderFromISR(QueueHandle_t xSemaphore) PRIVILEGED_FUNCTION
BaseType_t MPU_xEventGroupClearBitsFromISR(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear) PRIVILEGED_FUNCTION
BaseType_t MPU_xStreamBufferReset(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
UBaseType_t MPU_uxQueueMessagesWaitingFromISR(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
void MPU_vStreamBufferDelete(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
BaseType_t MPU_xTaskCreateRestricted(const TaskParameters_t *const pxTaskDefinition, TaskHandle_t *pxCreatedTask) PRIVILEGED_FUNCTION
size_t MPU_xStreamBufferSendFromISR(StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
TaskHandle_t MPU_xTaskCreateStatic(TaskFunction_t pxTaskCode, const char *const pcName, const uint32_t ulStackDepth, void *const pvParameters, UBaseType_t uxPriority, StackType_t *const puxStackBuffer, StaticTask_t *const pxTaskBuffer) PRIVILEGED_FUNCTION
BaseType_t MPU_xQueueReceiveFromISR(QueueHandle_t xQueue, void *const pvBuffer, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t MPU_xTimerGetStaticBuffer(TimerHandle_t xTimer, StaticTimer_t **ppxTimerBuffer) PRIVILEGED_FUNCTION
QueueHandle_t MPU_xQueueCreateMutex(const uint8_t ucQueueType) PRIVILEGED_FUNCTION
EventBits_t MPU_xEventGroupWaitBits(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait) FREERTOS_SYSTEM_CALL
TimerHandle_t MPU_xTimerCreate(const char *const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void *const pvTimerID, TimerCallbackFunction_t pxCallbackFunction) PRIVILEGED_FUNCTION
BaseType_t MPU_xTimerGenericCommand(TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t *const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait) FREERTOS_SYSTEM_CALL
TaskHandle_t MPU_xTaskGetHandle(const char *pcNameToQuery) PRIVILEGED_FUNCTION
#define PRIVILEGED_FUNCTION
unsigned long UBaseType_t
portSTACK_TYPE StackType_t
void(* TaskFunction_t)(void *)
BaseType_t xQueueSemaphoreTake(QueueHandle_t xQueue, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
struct QueueDefinition * QueueSetHandle_t
Type by which queue sets are referenced.
BaseType_t xQueueGenericSendFromISR(QueueHandle_t xQueue, const void *const pvItemToQueue, BaseType_t *const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition) PRIVILEGED_FUNCTION
BaseType_t xQueueGenericReset(QueueHandle_t xQueue, BaseType_t xNewQueue) PRIVILEGED_FUNCTION
UBaseType_t uxQueueMessagesWaitingFromISR(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
BaseType_t xQueuePeek(QueueHandle_t xQueue, void *const pvBuffer, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
BaseType_t xQueueGiveMutexRecursive(QueueHandle_t xMutex) PRIVILEGED_FUNCTION
struct QueueDefinition * QueueHandle_t
QueueHandle_t xQueueCreateCountingSemaphoreStatic(const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue) PRIVILEGED_FUNCTION
void vQueueDelete(QueueHandle_t xQueue) PRIVILEGED_FUNCTION
QueueSetMemberHandle_t xQueueSelectFromSet(QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait) PRIVILEGED_FUNCTION
BaseType_t xQueueTakeMutexRecursive(QueueHandle_t xMutex, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
BaseType_t xQueueGenericSend(QueueHandle_t xQueue, const void *const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition) PRIVILEGED_FUNCTION
BaseType_t xQueueIsQueueFullFromISR(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
BaseType_t xQueueIsQueueEmptyFromISR(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
UBaseType_t uxQueueSpacesAvailable(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
BaseType_t xQueueRemoveFromSet(QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
UBaseType_t uxQueueGetQueueLength(QueueHandle_t xQueue) PRIVILEGED_FUNCTION
BaseType_t xQueuePeekFromISR(QueueHandle_t xQueue, void *const pvBuffer) PRIVILEGED_FUNCTION
TaskHandle_t xQueueGetMutexHolder(QueueHandle_t xSemaphore) PRIVILEGED_FUNCTION
QueueSetMemberHandle_t xQueueSelectFromSetFromISR(QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
QueueHandle_t xQueueCreateCountingSemaphore(const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount) PRIVILEGED_FUNCTION
QueueHandle_t xQueueCreateMutex(const uint8_t ucQueueType) PRIVILEGED_FUNCTION
BaseType_t xQueueReceiveFromISR(QueueHandle_t xQueue, void *const pvBuffer, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t xQueueGiveFromISR(QueueHandle_t xQueue, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
QueueSetHandle_t xQueueCreateSet(const UBaseType_t uxEventQueueLength) PRIVILEGED_FUNCTION
UBaseType_t uxQueueMessagesWaiting(const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
BaseType_t xQueueAddToSet(QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
BaseType_t xQueueReceive(QueueHandle_t xQueue, void *const pvBuffer, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
UBaseType_t uxQueueGetQueueItemSize(QueueHandle_t xQueue) PRIVILEGED_FUNCTION
QueueHandle_t xQueueCreateMutexStatic(const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue) PRIVILEGED_FUNCTION
struct QueueDefinition * QueueSetMemberHandle_t
Queue sets can contain both queues and semaphores, so the QueueSetMemberHandle_t is defined as a type...
void vStreamBufferDelete(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
StreamBufferHandle_t xStreamBufferGenericCreateStatic(size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer, uint8_t *const pucStreamBufferStorageArea, StaticStreamBuffer_t *const pxStaticStreamBuffer, StreamBufferCallbackFunction_t pxSendCompletedCallback, StreamBufferCallbackFunction_t pxReceiveCompletedCallback) PRIVILEGED_FUNCTION
size_t xStreamBufferSendFromISR(StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t xStreamBufferSetTriggerLevel(StreamBufferHandle_t xStreamBuffer, size_t xTriggerLevel) PRIVILEGED_FUNCTION
size_t xStreamBufferSend(StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
void(* StreamBufferCallbackFunction_t)(StreamBufferHandle_t xStreamBuffer, BaseType_t xIsInsideISR, BaseType_t *const pxHigherPriorityTaskWoken)
Type used as a stream buffer's optional callback.
BaseType_t xStreamBufferReset(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
size_t xStreamBufferReceive(StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
size_t xStreamBufferReceiveFromISR(StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
struct StreamBufferDef_t * StreamBufferHandle_t
StreamBufferHandle_t xStreamBufferGenericCreate(size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer, StreamBufferCallbackFunction_t pxSendCompletedCallback, StreamBufferCallbackFunction_t pxReceiveCompletedCallback) PRIVILEGED_FUNCTION
size_t xStreamBufferSpacesAvailable(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
size_t xStreamBufferNextMessageLengthBytes(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
BaseType_t xStreamBufferSendCompletedFromISR(StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t xStreamBufferReceiveCompletedFromISR(StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
BaseType_t xStreamBufferIsFull(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
size_t xStreamBufferBytesAvailable(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
BaseType_t xStreamBufferIsEmpty(StreamBufferHandle_t xStreamBuffer) PRIVILEGED_FUNCTION
BaseType_t xWaitForAllBits
EventBits_t uxBitsToWaitFor
EventGroupHandle_t xEventGroup
TaskHandle_t xTaskToNotify
UBaseType_t uxIndexToNotify
uint32_t * pulPreviousNotificationValue
UBaseType_t uxIndexToWaitOn
uint32_t ulBitsToClearOnEntry
uint32_t ulBitsToClearOnExit
uint32_t * pulNotificationValue
TickType_t xOptionalValue
BaseType_t * pxHigherPriorityTaskWoken
BaseType_t xTaskResumeAll(void) PRIVILEGED_FUNCTION
BaseType_t xTaskGetSchedulerState(void) PRIVILEGED_FUNCTION
configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimeCounter(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
#define taskSCHEDULER_NOT_STARTED
#define taskSCHEDULER_SUSPENDED
uint32_t ulTaskGenericNotifyValueClear(TaskHandle_t xTask, UBaseType_t uxIndexToClear, uint32_t ulBitsToClear) PRIVILEGED_FUNCTION
UBaseType_t uxTaskPriorityGet(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
void vTaskPrioritySet(TaskHandle_t xTask, UBaseType_t uxNewPriority) PRIVILEGED_FUNCTION
struct tskTaskControlBlock * TaskHandle_t
configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimePercent(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
void vTaskDelete(TaskHandle_t xTaskToDelete) PRIVILEGED_FUNCTION
void vTaskSuspendAll(void) PRIVILEGED_FUNCTION
struct xTASK_PARAMETERS TaskParameters_t
BaseType_t xTaskCheckForTimeOut(TimeOut_t *const pxTimeOut, TickType_t *const pxTicksToWait) PRIVILEGED_FUNCTION
TaskHandle_t xTaskGetIdleTaskHandle(void) PRIVILEGED_FUNCTION
xTaskGetIdleTaskHandle() is only available if INCLUDE_xTaskGetIdleTaskHandle is set to 1 in FreeRTOSC...
TaskHandle_t xTaskGetHandle(const char *pcNameToQuery) PRIVILEGED_FUNCTION
void vTaskGenericNotifyGiveFromISR(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
struct xTIME_OUT TimeOut_t
BaseType_t xTaskGenericNotifyFromISR(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
void vTaskSetTimeOutState(TimeOut_t *const pxTimeOut) PRIVILEGED_FUNCTION
UBaseType_t uxTaskGetNumberOfTasks(void) PRIVILEGED_FUNCTION
#define tskMPU_READ_PERMISSION
TickType_t xTaskGetTickCount(void) PRIVILEGED_FUNCTION
UBaseType_t uxTaskPriorityGetFromISR(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.
UBaseType_t uxTaskGetStackHighWaterMark(TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.h
configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2(TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.h
void vTaskResume(TaskHandle_t xTaskToResume) PRIVILEGED_FUNCTION
void vTaskSuspend(TaskHandle_t xTaskToSuspend) PRIVILEGED_FUNCTION
configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimeCounter(void) PRIVILEGED_FUNCTION
TaskHandle_t xTaskGetCurrentTaskHandle(void) PRIVILEGED_FUNCTION
UBaseType_t uxTaskGetSystemState(TaskStatus_t *const pxTaskStatusArray, const UBaseType_t uxArraySize, configRUN_TIME_COUNTER_TYPE *const pulTotalRunTime) PRIVILEGED_FUNCTION
configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for uxTaskGetSystemState() to be av...
BaseType_t xTaskGenericNotifyStateClear(TaskHandle_t xTask, UBaseType_t uxIndexToClear) PRIVILEGED_FUNCTION
eTaskState eTaskGetState(TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.
#define tskMPU_WRITE_PERMISSION
void vTaskDelay(const TickType_t xTicksToDelay) PRIVILEGED_FUNCTION
BaseType_t xTaskGenericNotifyWait(UBaseType_t uxIndexToWaitOn, uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
uint32_t ulTaskGenericNotifyTake(UBaseType_t uxIndexToWaitOn, BaseType_t xClearCountOnExit, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
#define taskEXIT_CRITICAL()
BaseType_t xTaskCallApplicationTaskHook(TaskHandle_t xTask, void *pvParameter) PRIVILEGED_FUNCTION
task.h
#define taskENTER_CRITICAL()
configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimePercent(void) PRIVILEGED_FUNCTION
struct xMEMORY_REGION MemoryRegion_t
void vTaskGetInfo(TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState) PRIVILEGED_FUNCTION
BaseType_t xTaskGenericNotify(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue) PRIVILEGED_FUNCTION
struct xTASK_STATUS TaskStatus_t
@ eSetValueWithoutOverwrite
char * pcTaskGetName(TaskHandle_t xTaskToQuery) PRIVILEGED_FUNCTION
BaseType_t xTaskResumeFromISR(TaskHandle_t xTaskToResume) PRIVILEGED_FUNCTION
BaseType_t xTaskDelayUntil(TickType_t *const pxPreviousWakeTime, const TickType_t xTimeIncrement) PRIVILEGED_FUNCTION
BaseType_t(* TaskHookFunction_t)(void *)
BaseType_t xTaskAbortDelay(TaskHandle_t xTask) PRIVILEGED_FUNCTION
static PRIVILEGED_DATA TaskHandle_t xIdleTaskHandle
Holds the handle of the idle task.
TickType_t xTimerGetExpiryTime(TimerHandle_t xTimer) PRIVILEGED_FUNCTION
TickType_t xTimerGetExpiryTime( TimerHandle_t xTimer );.
UBaseType_t uxTimerGetReloadMode(TimerHandle_t xTimer) PRIVILEGED_FUNCTION
UBaseType_t uxTimerGetReloadMode( TimerHandle_t xTimer );.
void * pvTimerGetTimerID(const TimerHandle_t xTimer) PRIVILEGED_FUNCTION
TimerHandle_t xTimerCreate( const char * const pcTimerName, TickType_t...
BaseType_t xTimerGetReloadMode(TimerHandle_t xTimer) PRIVILEGED_FUNCTION
BaseType_t xTimerGetReloadMode( TimerHandle_t xTimer );.
BaseType_t xTimerGenericCommand(TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t *const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait) PRIVILEGED_FUNCTION
void vTimerSetTimerID(TimerHandle_t xTimer, void *pvNewID) PRIVILEGED_FUNCTION
void vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID );
TickType_t xTimerGetPeriod(TimerHandle_t xTimer) PRIVILEGED_FUNCTION
TickType_t xTimerGetPeriod( TimerHandle_t xTimer );.
BaseType_t xTimerIsTimerActive(TimerHandle_t xTimer) PRIVILEGED_FUNCTION
BaseType_t xTimerIsTimerActive( TimerHandle_t xTimer );.
const char * pcTimerGetName(TimerHandle_t xTimer) PRIVILEGED_FUNCTION
const char * const pcTimerGetName( TimerHandle_t xTimer );
void vTimerSetReloadMode(TimerHandle_t xTimer, const BaseType_t xAutoReload) PRIVILEGED_FUNCTION
void vTimerSetReloadMode( TimerHandle_t xTimer, const BaseType_t xAutoReload );
void(* TimerCallbackFunction_t)(TimerHandle_t xTimer)
TaskHandle_t xTimerGetTimerDaemonTaskHandle(void) PRIVILEGED_FUNCTION
TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );.
struct tmrTimerControl * TimerHandle_t