1 /* 2 * FreeRTOS Kernel V10.6.2 3 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 * 5 * SPDX-License-Identifier: MIT 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 * this software and associated documentation files (the "Software"), to deal in 9 * the Software without restriction, including without limitation the rights to 10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 * the Software, and to permit persons to whom the Software is furnished to do so, 12 * subject to the following conditions: 13 * 14 * The above copyright notice and this permission notice shall be included in all 15 * copies or substantial portions of the Software. 16 * 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 * 24 * https://www.FreeRTOS.org 25 * https://github.com/FreeRTOS 26 * 27 */ 28 29 /* 30 * When the MPU is used the standard (non MPU) API functions are mapped to 31 * equivalents that start "MPU_", the prototypes for which are defined in this 32 * header files. This will cause the application code to call the MPU_ version 33 * which wraps the non-MPU version with privilege promoting then demoting code, 34 * so the kernel code always runs will full privileges. 35 */ 36 37 38 #ifndef MPU_PROTOTYPES_H 39 #define MPU_PROTOTYPES_H 40 41 typedef struct xTaskGenericNotifyParams 42 { 43 TaskHandle_t xTaskToNotify; 44 UBaseType_t uxIndexToNotify; 45 uint32_t ulValue; 46 eNotifyAction eAction; 47 uint32_t * pulPreviousNotificationValue; 48 } xTaskGenericNotifyParams_t; 49 50 typedef struct xTaskGenericNotifyWaitParams 51 { 52 UBaseType_t uxIndexToWaitOn; 53 uint32_t ulBitsToClearOnEntry; 54 uint32_t ulBitsToClearOnExit; 55 uint32_t * pulNotificationValue; 56 TickType_t xTicksToWait; 57 } xTaskGenericNotifyWaitParams_t; 58 59 typedef struct xTimerGenericCommandParams 60 { 61 TimerHandle_t xTimer; 62 BaseType_t xCommandID; 63 TickType_t xOptionalValue; 64 BaseType_t * pxHigherPriorityTaskWoken; 65 TickType_t xTicksToWait; 66 } xTimerGenericCommandParams_t; 67 68 typedef struct xEventGroupWaitBitsParams 69 { 70 EventGroupHandle_t xEventGroup; 71 EventBits_t uxBitsToWaitFor; 72 BaseType_t xClearOnExit; 73 BaseType_t xWaitForAllBits; 74 TickType_t xTicksToWait; 75 } xEventGroupWaitBitsParams_t; 76 77 /* MPU versions of task.h API functions. */ 78 void MPU_vTaskDelay( const TickType_t xTicksToDelay ) FREERTOS_SYSTEM_CALL; 79 BaseType_t MPU_xTaskDelayUntil( TickType_t * const pxPreviousWakeTime, 80 const TickType_t xTimeIncrement ) FREERTOS_SYSTEM_CALL; 81 BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 82 UBaseType_t MPU_uxTaskPriorityGet( const TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 83 eTaskState MPU_eTaskGetState( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 84 void MPU_vTaskGetInfo( TaskHandle_t xTask, 85 TaskStatus_t * pxTaskStatus, 86 BaseType_t xGetFreeStackSpace, 87 eTaskState eState ) FREERTOS_SYSTEM_CALL; 88 void MPU_vTaskSuspend( TaskHandle_t xTaskToSuspend ) FREERTOS_SYSTEM_CALL; 89 void MPU_vTaskResume( TaskHandle_t xTaskToResume ) FREERTOS_SYSTEM_CALL; 90 TickType_t MPU_xTaskGetTickCount( void ) FREERTOS_SYSTEM_CALL; 91 UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) FREERTOS_SYSTEM_CALL; 92 char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) FREERTOS_SYSTEM_CALL; 93 UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 94 configSTACK_DEPTH_TYPE MPU_uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 95 void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, 96 TaskHookFunction_t pxHookFunction ) FREERTOS_SYSTEM_CALL; 97 TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 98 void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, 99 BaseType_t xIndex, 100 void * pvValue ) FREERTOS_SYSTEM_CALL; 101 void * MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, 102 BaseType_t xIndex ) FREERTOS_SYSTEM_CALL; 103 TaskHandle_t MPU_xTaskGetIdleTaskHandle( void ) FREERTOS_SYSTEM_CALL; 104 UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, 105 const UBaseType_t uxArraySize, 106 configRUN_TIME_COUNTER_TYPE * const pulTotalRunTime ) FREERTOS_SYSTEM_CALL; 107 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 108 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimePercent( const TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL; 109 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetIdleRunTimeCounter( void ) FREERTOS_SYSTEM_CALL; 110 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetIdleRunTimePercent( void ) FREERTOS_SYSTEM_CALL; 111 BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, 112 UBaseType_t uxIndexToNotify, 113 uint32_t ulValue, 114 eNotifyAction eAction, 115 uint32_t * pulPreviousNotificationValue ) FREERTOS_SYSTEM_CALL; 116 BaseType_t MPU_xTaskGenericNotifyEntry( const xTaskGenericNotifyParams_t * pxParams ) FREERTOS_SYSTEM_CALL; 117 BaseType_t MPU_xTaskGenericNotifyWait( UBaseType_t uxIndexToWaitOn, 118 uint32_t ulBitsToClearOnEntry, 119 uint32_t ulBitsToClearOnExit, 120 uint32_t * pulNotificationValue, 121 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 122 BaseType_t MPU_xTaskGenericNotifyWaitEntry( const xTaskGenericNotifyWaitParams_t * pxParams ) FREERTOS_SYSTEM_CALL; 123 uint32_t MPU_ulTaskGenericNotifyTake( UBaseType_t uxIndexToWaitOn, 124 BaseType_t xClearCountOnExit, 125 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 126 BaseType_t MPU_xTaskGenericNotifyStateClear( TaskHandle_t xTask, 127 UBaseType_t uxIndexToClear ) FREERTOS_SYSTEM_CALL; 128 uint32_t MPU_ulTaskGenericNotifyValueClear( TaskHandle_t xTask, 129 UBaseType_t uxIndexToClear, 130 uint32_t ulBitsToClear ) FREERTOS_SYSTEM_CALL; 131 void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) FREERTOS_SYSTEM_CALL; 132 BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, 133 TickType_t * const pxTicksToWait ) FREERTOS_SYSTEM_CALL; 134 TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void ) FREERTOS_SYSTEM_CALL; 135 BaseType_t MPU_xTaskGetSchedulerState( void ) FREERTOS_SYSTEM_CALL; 136 137 /* Privileged only wrappers for Task APIs. These are needed so that 138 * the application can use opaque handles maintained in mpu_wrappers.c 139 * with all the APIs. */ 140 BaseType_t MPU_xTaskCreate( TaskFunction_t pxTaskCode, 141 const char * const pcName, 142 const uint16_t usStackDepth, 143 void * const pvParameters, 144 UBaseType_t uxPriority, 145 TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION; 146 TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode, 147 const char * const pcName, 148 const uint32_t ulStackDepth, 149 void * const pvParameters, 150 UBaseType_t uxPriority, 151 StackType_t * const puxStackBuffer, 152 StaticTask_t * const pxTaskBuffer ) PRIVILEGED_FUNCTION; 153 void MPU_vTaskDelete( TaskHandle_t xTaskToDelete ) PRIVILEGED_FUNCTION; 154 void MPU_vTaskPrioritySet( TaskHandle_t xTask, 155 UBaseType_t uxNewPriority ) PRIVILEGED_FUNCTION; 156 TaskHandle_t MPU_xTaskGetHandle( const char * pcNameToQuery ) PRIVILEGED_FUNCTION; 157 BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, 158 void * pvParameter ) PRIVILEGED_FUNCTION; 159 BaseType_t MPU_xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, 160 TaskHandle_t * pxCreatedTask ) PRIVILEGED_FUNCTION; 161 BaseType_t MPU_xTaskCreateRestrictedStatic( const TaskParameters_t * const pxTaskDefinition, 162 TaskHandle_t * pxCreatedTask ) PRIVILEGED_FUNCTION; 163 void vTaskAllocateMPURegions( TaskHandle_t xTaskToModify, 164 const MemoryRegion_t * const xRegions ) PRIVILEGED_FUNCTION; 165 BaseType_t MPU_xTaskGetStaticBuffers( TaskHandle_t xTask, 166 StackType_t ** ppuxStackBuffer, 167 StaticTask_t ** ppxTaskBuffer ) PRIVILEGED_FUNCTION; 168 UBaseType_t MPU_uxTaskPriorityGetFromISR( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION; 169 BaseType_t MPU_xTaskResumeFromISR( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION; 170 TaskHookFunction_t MPU_xTaskGetApplicationTaskTagFromISR( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; 171 BaseType_t MPU_xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, 172 UBaseType_t uxIndexToNotify, 173 uint32_t ulValue, 174 eNotifyAction eAction, 175 uint32_t * pulPreviousNotificationValue, 176 BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 177 void MPU_vTaskGenericNotifyGiveFromISR( TaskHandle_t xTaskToNotify, 178 UBaseType_t uxIndexToNotify, 179 BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 180 181 /* MPU versions of queue.h API functions. */ 182 BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, 183 const void * const pvItemToQueue, 184 TickType_t xTicksToWait, 185 const BaseType_t xCopyPosition ) FREERTOS_SYSTEM_CALL; 186 BaseType_t MPU_xQueueReceive( QueueHandle_t xQueue, 187 void * const pvBuffer, 188 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 189 BaseType_t MPU_xQueuePeek( QueueHandle_t xQueue, 190 void * const pvBuffer, 191 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 192 BaseType_t MPU_xQueueSemaphoreTake( QueueHandle_t xQueue, 193 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 194 UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL; 195 UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL; 196 TaskHandle_t MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore ) FREERTOS_SYSTEM_CALL; 197 BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, 198 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 199 BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) FREERTOS_SYSTEM_CALL; 200 void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, 201 const char * pcName ) FREERTOS_SYSTEM_CALL; 202 void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL; 203 const char * MPU_pcQueueGetName( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL; 204 BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, 205 QueueSetHandle_t xQueueSet ) FREERTOS_SYSTEM_CALL; 206 QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, 207 const TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 208 void MPU_vQueueSetQueueNumber( QueueHandle_t xQueue, 209 UBaseType_t uxQueueNumber ) FREERTOS_SYSTEM_CALL; 210 UBaseType_t MPU_uxQueueGetQueueNumber( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL; 211 uint8_t MPU_ucQueueGetQueueType( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL; 212 213 /* Privileged only wrappers for Queue APIs. These are needed so that 214 * the application can use opaque handles maintained in mpu_wrappers.c 215 * with all the APIs. */ 216 void MPU_vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; 217 QueueHandle_t MPU_xQueueCreateMutex( const uint8_t ucQueueType ) PRIVILEGED_FUNCTION; 218 QueueHandle_t MPU_xQueueCreateMutexStatic( const uint8_t ucQueueType, 219 StaticQueue_t * pxStaticQueue ) PRIVILEGED_FUNCTION; 220 QueueHandle_t MPU_xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, 221 const UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION; 222 QueueHandle_t MPU_xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, 223 const UBaseType_t uxInitialCount, 224 StaticQueue_t * pxStaticQueue ) PRIVILEGED_FUNCTION; 225 QueueHandle_t MPU_xQueueGenericCreate( const UBaseType_t uxQueueLength, 226 const UBaseType_t uxItemSize, 227 const uint8_t ucQueueType ) PRIVILEGED_FUNCTION; 228 QueueHandle_t MPU_xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, 229 const UBaseType_t uxItemSize, 230 uint8_t * pucQueueStorage, 231 StaticQueue_t * pxStaticQueue, 232 const uint8_t ucQueueType ) PRIVILEGED_FUNCTION; 233 QueueSetHandle_t MPU_xQueueCreateSet( const UBaseType_t uxEventQueueLength ) PRIVILEGED_FUNCTION; 234 BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, 235 QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION; 236 BaseType_t MPU_xQueueGenericReset( QueueHandle_t xQueue, 237 BaseType_t xNewQueue ) PRIVILEGED_FUNCTION; 238 BaseType_t MPU_xQueueGenericGetStaticBuffers( QueueHandle_t xQueue, 239 uint8_t ** ppucQueueStorage, 240 StaticQueue_t ** ppxStaticQueue ) PRIVILEGED_FUNCTION; 241 BaseType_t MPU_xQueueGenericSendFromISR( QueueHandle_t xQueue, 242 const void * const pvItemToQueue, 243 BaseType_t * const pxHigherPriorityTaskWoken, 244 const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION; 245 BaseType_t MPU_xQueueGiveFromISR( QueueHandle_t xQueue, 246 BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 247 BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t xQueue, 248 void * const pvBuffer ) PRIVILEGED_FUNCTION; 249 BaseType_t MPU_xQueueReceiveFromISR( QueueHandle_t xQueue, 250 void * const pvBuffer, 251 BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 252 BaseType_t MPU_xQueueIsQueueEmptyFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; 253 BaseType_t MPU_xQueueIsQueueFullFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; 254 UBaseType_t MPU_uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; 255 TaskHandle_t MPU_xQueueGetMutexHolderFromISR( QueueHandle_t xSemaphore ) PRIVILEGED_FUNCTION; 256 QueueSetMemberHandle_t MPU_xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION; 257 258 /* MPU versions of timers.h API functions. */ 259 void * MPU_pvTimerGetTimerID( const TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL; 260 void MPU_vTimerSetTimerID( TimerHandle_t xTimer, 261 void * pvNewID ) FREERTOS_SYSTEM_CALL; 262 BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL; 263 TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void ) FREERTOS_SYSTEM_CALL; 264 BaseType_t MPU_xTimerGenericCommand( TimerHandle_t xTimer, 265 const BaseType_t xCommandID, 266 const TickType_t xOptionalValue, 267 BaseType_t * const pxHigherPriorityTaskWoken, 268 const TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 269 BaseType_t MPU_xTimerGenericCommandEntry( const xTimerGenericCommandParams_t * pxParams ) FREERTOS_SYSTEM_CALL; 270 const char * MPU_pcTimerGetName( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL; 271 void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, 272 const BaseType_t uxAutoReload ) FREERTOS_SYSTEM_CALL; 273 BaseType_t MPU_xTimerGetReloadMode( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL; 274 UBaseType_t MPU_uxTimerGetReloadMode( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL; 275 TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL; 276 TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL; 277 278 /* Privileged only wrappers for Timer APIs. These are needed so that 279 * the application can use opaque handles maintained in mpu_wrappers.c 280 * with all the APIs. */ 281 TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName, 282 const TickType_t xTimerPeriodInTicks, 283 const UBaseType_t uxAutoReload, 284 void * const pvTimerID, 285 TimerCallbackFunction_t pxCallbackFunction ) PRIVILEGED_FUNCTION; 286 TimerHandle_t MPU_xTimerCreateStatic( const char * const pcTimerName, 287 const TickType_t xTimerPeriodInTicks, 288 const UBaseType_t uxAutoReload, 289 void * const pvTimerID, 290 TimerCallbackFunction_t pxCallbackFunction, 291 StaticTimer_t * pxTimerBuffer ) PRIVILEGED_FUNCTION; 292 BaseType_t MPU_xTimerGetStaticBuffer( TimerHandle_t xTimer, 293 StaticTimer_t ** ppxTimerBuffer ) PRIVILEGED_FUNCTION; 294 295 /* MPU versions of event_group.h API functions. */ 296 EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup, 297 const EventBits_t uxBitsToWaitFor, 298 const BaseType_t xClearOnExit, 299 const BaseType_t xWaitForAllBits, 300 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 301 EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) FREERTOS_SYSTEM_CALL; 302 EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, 303 const EventBits_t uxBitsToClear ) FREERTOS_SYSTEM_CALL; 304 EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, 305 const EventBits_t uxBitsToSet ) FREERTOS_SYSTEM_CALL; 306 EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, 307 const EventBits_t uxBitsToSet, 308 const EventBits_t uxBitsToWaitFor, 309 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 310 #if ( configUSE_TRACE_FACILITY == 1 ) 311 UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) FREERTOS_SYSTEM_CALL; 312 void MPU_vEventGroupSetNumber( void * xEventGroup, 313 UBaseType_t uxEventGroupNumber ) FREERTOS_SYSTEM_CALL; 314 #endif /* ( configUSE_TRACE_FACILITY == 1 )*/ 315 316 /* Privileged only wrappers for Event Group APIs. These are needed so that 317 * the application can use opaque handles maintained in mpu_wrappers.c 318 * with all the APIs. */ 319 EventGroupHandle_t MPU_xEventGroupCreate( void ) PRIVILEGED_FUNCTION; 320 EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t * pxEventGroupBuffer ) PRIVILEGED_FUNCTION; 321 void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup ) PRIVILEGED_FUNCTION; 322 BaseType_t MPU_xEventGroupGetStaticBuffer( EventGroupHandle_t xEventGroup, 323 StaticEventGroup_t ** ppxEventGroupBuffer ) PRIVILEGED_FUNCTION; 324 BaseType_t MPU_xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, 325 const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION; 326 BaseType_t MPU_xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, 327 const EventBits_t uxBitsToSet, 328 BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 329 EventBits_t MPU_xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup ) PRIVILEGED_FUNCTION; 330 331 /* MPU versions of message/stream_buffer.h API functions. */ 332 size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, 333 const void * pvTxData, 334 size_t xDataLengthBytes, 335 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 336 size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, 337 void * pvRxData, 338 size_t xBufferLengthBytes, 339 TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL; 340 BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL; 341 BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL; 342 size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL; 343 size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL; 344 BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, 345 size_t xTriggerLevel ) FREERTOS_SYSTEM_CALL; 346 size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL; 347 348 /* Privileged only wrappers for Stream Buffer APIs. These are needed so that 349 * the application can use opaque handles maintained in mpu_wrappers.c 350 * with all the APIs. */ 351 StreamBufferHandle_t MPU_xStreamBufferGenericCreate( size_t xBufferSizeBytes, 352 size_t xTriggerLevelBytes, 353 BaseType_t xIsMessageBuffer, 354 StreamBufferCallbackFunction_t pxSendCompletedCallback, 355 StreamBufferCallbackFunction_t pxReceiveCompletedCallback ) PRIVILEGED_FUNCTION; 356 StreamBufferHandle_t MPU_xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes, 357 size_t xTriggerLevelBytes, 358 BaseType_t xIsMessageBuffer, 359 uint8_t * const pucStreamBufferStorageArea, 360 StaticStreamBuffer_t * const pxStaticStreamBuffer, 361 StreamBufferCallbackFunction_t pxSendCompletedCallback, 362 StreamBufferCallbackFunction_t pxReceiveCompletedCallback ) PRIVILEGED_FUNCTION; 363 void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION; 364 BaseType_t MPU_xStreamBufferReset( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION; 365 BaseType_t MPU_xStreamBufferGetStaticBuffers( StreamBufferHandle_t xStreamBuffers, 366 uint8_t * ppucStreamBufferStorageArea, 367 StaticStreamBuffer_t * ppxStaticStreamBuffer ) PRIVILEGED_FUNCTION; 368 size_t MPU_xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer, 369 const void * pvTxData, 370 size_t xDataLengthBytes, 371 BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 372 size_t MPU_xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer, 373 void * pvRxData, 374 size_t xBufferLengthBytes, 375 BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 376 BaseType_t MPU_xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer, 377 BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 378 BaseType_t MPU_xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuffer, 379 BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; 380 381 #endif /* MPU_PROTOTYPES_H */ 382