1 /* 2 * FreeRTOS Kernel V11.1.0 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 /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 30 * all the API functions to use the MPU wrappers. That should only be done when 31 * task.h is included from an application file. */ 32 #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 33 34 /* Scheduler includes. */ 35 #include "FreeRTOS.h" 36 #include "task.h" 37 #include "queue.h" 38 #include "timers.h" 39 #include "event_groups.h" 40 #include "stream_buffer.h" 41 #include "mpu_prototypes.h" 42 #include "mpu_syscall_numbers.h" 43 44 #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 45 /*-----------------------------------------------------------*/ 46 47 #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) 48 49 #if ( INCLUDE_xTaskDelayUntil == 1 ) 50 51 BaseType_t MPU_xTaskDelayUntil( TickType_t * const pxPreviousWakeTime, 52 const TickType_t xTimeIncrement ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 53 MPU_xTaskDelayUntil(TickType_t * const pxPreviousWakeTime,const TickType_t xTimeIncrement)54 BaseType_t MPU_xTaskDelayUntil( TickType_t * const pxPreviousWakeTime, 55 const TickType_t xTimeIncrement ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 56 { 57 __asm volatile 58 ( 59 " .syntax unified \n" 60 " .extern MPU_xTaskDelayUntilImpl \n" 61 " \n" 62 " push {r0} \n" 63 " mrs r0, control \n" 64 " tst r0, #1 \n" 65 " pop {r0} \n" 66 " bne MPU_xTaskDelayUntil_Unpriv \n" 67 " MPU_xTaskDelayUntil_Priv: \n" 68 " b MPU_xTaskDelayUntilImpl \n" 69 " MPU_xTaskDelayUntil_Unpriv: \n" 70 " svc %0 \n" 71 " \n" 72 : : "i" ( SYSTEM_CALL_xTaskDelayUntil ) : "memory" 73 ); 74 } 75 76 #endif /* if ( INCLUDE_xTaskDelayUntil == 1 ) */ 77 /*-----------------------------------------------------------*/ 78 79 #if ( INCLUDE_xTaskAbortDelay == 1 ) 80 81 BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 82 MPU_xTaskAbortDelay(TaskHandle_t xTask)83 BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 84 { 85 __asm volatile 86 ( 87 " .syntax unified \n" 88 " .extern MPU_xTaskAbortDelayImpl \n" 89 " \n" 90 " push {r0} \n" 91 " mrs r0, control \n" 92 " tst r0, #1 \n" 93 " pop {r0} \n" 94 " bne MPU_xTaskAbortDelay_Unpriv \n" 95 " MPU_xTaskAbortDelay_Priv: \n" 96 " b MPU_xTaskAbortDelayImpl \n" 97 " MPU_xTaskAbortDelay_Unpriv: \n" 98 " svc %0 \n" 99 " \n" 100 : : "i" ( SYSTEM_CALL_xTaskAbortDelay ) : "memory" 101 ); 102 } 103 104 #endif /* if ( INCLUDE_xTaskAbortDelay == 1 ) */ 105 /*-----------------------------------------------------------*/ 106 107 #if ( INCLUDE_vTaskDelay == 1 ) 108 109 void MPU_vTaskDelay( const TickType_t xTicksToDelay ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 110 MPU_vTaskDelay(const TickType_t xTicksToDelay)111 void MPU_vTaskDelay( const TickType_t xTicksToDelay ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 112 { 113 __asm volatile 114 ( 115 " .syntax unified \n" 116 " .extern MPU_vTaskDelayImpl \n" 117 " \n" 118 " push {r0} \n" 119 " mrs r0, control \n" 120 " tst r0, #1 \n" 121 " pop {r0} \n" 122 " bne MPU_vTaskDelay_Unpriv \n" 123 " MPU_vTaskDelay_Priv: \n" 124 " b MPU_vTaskDelayImpl \n" 125 " MPU_vTaskDelay_Unpriv: \n" 126 " svc %0 \n" 127 " \n" 128 : : "i" ( SYSTEM_CALL_vTaskDelay ) : "memory" 129 ); 130 } 131 132 #endif /* if ( INCLUDE_vTaskDelay == 1 ) */ 133 /*-----------------------------------------------------------*/ 134 135 #if ( INCLUDE_uxTaskPriorityGet == 1 ) 136 137 UBaseType_t MPU_uxTaskPriorityGet( const TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 138 MPU_uxTaskPriorityGet(const TaskHandle_t xTask)139 UBaseType_t MPU_uxTaskPriorityGet( const TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 140 { 141 __asm volatile 142 ( 143 " .syntax unified \n" 144 " .extern MPU_uxTaskPriorityGetImpl \n" 145 " \n" 146 " push {r0} \n" 147 " mrs r0, control \n" 148 " tst r0, #1 \n" 149 " pop {r0} \n" 150 " bne MPU_uxTaskPriorityGet_Unpriv \n" 151 " MPU_uxTaskPriorityGet_Priv: \n" 152 " b MPU_uxTaskPriorityGetImpl \n" 153 " MPU_uxTaskPriorityGet_Unpriv: \n" 154 " svc %0 \n" 155 " \n" 156 : : "i" ( SYSTEM_CALL_uxTaskPriorityGet ) : "memory" 157 ); 158 } 159 160 #endif /* if ( INCLUDE_uxTaskPriorityGet == 1 ) */ 161 /*-----------------------------------------------------------*/ 162 163 #if ( INCLUDE_eTaskGetState == 1 ) 164 165 eTaskState MPU_eTaskGetState( TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 166 MPU_eTaskGetState(TaskHandle_t xTask)167 eTaskState MPU_eTaskGetState( TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 168 { 169 __asm volatile 170 ( 171 " .syntax unified \n" 172 " .extern MPU_eTaskGetStateImpl \n" 173 " \n" 174 " push {r0} \n" 175 " mrs r0, control \n" 176 " tst r0, #1 \n" 177 " pop {r0} \n" 178 " bne MPU_eTaskGetState_Unpriv \n" 179 " MPU_eTaskGetState_Priv: \n" 180 " b MPU_eTaskGetStateImpl \n" 181 " MPU_eTaskGetState_Unpriv: \n" 182 " svc %0 \n" 183 " \n" 184 : : "i" ( SYSTEM_CALL_eTaskGetState ) : "memory" 185 ); 186 } 187 188 #endif /* if ( INCLUDE_eTaskGetState == 1 ) */ 189 /*-----------------------------------------------------------*/ 190 191 #if ( configUSE_TRACE_FACILITY == 1 ) 192 193 void MPU_vTaskGetInfo( TaskHandle_t xTask, 194 TaskStatus_t * pxTaskStatus, 195 BaseType_t xGetFreeStackSpace, 196 eTaskState eState ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 197 MPU_vTaskGetInfo(TaskHandle_t xTask,TaskStatus_t * pxTaskStatus,BaseType_t xGetFreeStackSpace,eTaskState eState)198 void MPU_vTaskGetInfo( TaskHandle_t xTask, 199 TaskStatus_t * pxTaskStatus, 200 BaseType_t xGetFreeStackSpace, 201 eTaskState eState ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 202 { 203 __asm volatile 204 ( 205 " .syntax unified \n" 206 " .extern MPU_vTaskGetInfoImpl \n" 207 " \n" 208 " push {r0} \n" 209 " mrs r0, control \n" 210 " tst r0, #1 \n" 211 " pop {r0} \n" 212 " bne MPU_vTaskGetInfo_Unpriv \n" 213 " MPU_vTaskGetInfo_Priv: \n" 214 " b MPU_vTaskGetInfoImpl \n" 215 " MPU_vTaskGetInfo_Unpriv: \n" 216 " svc %0 \n" 217 " \n" 218 : : "i" ( SYSTEM_CALL_vTaskGetInfo ) : "memory" 219 ); 220 } 221 222 #endif /* if ( configUSE_TRACE_FACILITY == 1 ) */ 223 /*-----------------------------------------------------------*/ 224 225 #if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) 226 227 TaskHandle_t MPU_xTaskGetIdleTaskHandle( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 228 MPU_xTaskGetIdleTaskHandle(void)229 TaskHandle_t MPU_xTaskGetIdleTaskHandle( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 230 { 231 __asm volatile 232 ( 233 " .syntax unified \n" 234 " .extern MPU_xTaskGetIdleTaskHandleImpl \n" 235 " \n" 236 " push {r0} \n" 237 " mrs r0, control \n" 238 " tst r0, #1 \n" 239 " pop {r0} \n" 240 " bne MPU_xTaskGetIdleTaskHandle_Unpriv \n" 241 " MPU_xTaskGetIdleTaskHandle_Priv: \n" 242 " b MPU_xTaskGetIdleTaskHandleImpl \n" 243 " MPU_xTaskGetIdleTaskHandle_Unpriv: \n" 244 " svc %0 \n" 245 " \n" 246 : : "i" ( SYSTEM_CALL_xTaskGetIdleTaskHandle ) : "memory" 247 ); 248 } 249 250 #endif /* if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) */ 251 /*-----------------------------------------------------------*/ 252 253 #if ( INCLUDE_vTaskSuspend == 1 ) 254 255 void MPU_vTaskSuspend( TaskHandle_t xTaskToSuspend ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 256 MPU_vTaskSuspend(TaskHandle_t xTaskToSuspend)257 void MPU_vTaskSuspend( TaskHandle_t xTaskToSuspend ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 258 { 259 __asm volatile 260 ( 261 " .syntax unified \n" 262 " .extern MPU_vTaskSuspendImpl \n" 263 " \n" 264 " push {r0} \n" 265 " mrs r0, control \n" 266 " tst r0, #1 \n" 267 " pop {r0} \n" 268 " bne MPU_vTaskSuspend_Unpriv \n" 269 " MPU_vTaskSuspend_Priv: \n" 270 " b MPU_vTaskSuspendImpl \n" 271 " MPU_vTaskSuspend_Unpriv: \n" 272 " svc %0 \n" 273 " \n" 274 : : "i" ( SYSTEM_CALL_vTaskSuspend ) : "memory" 275 ); 276 } 277 278 #endif /* if ( INCLUDE_vTaskSuspend == 1 ) */ 279 /*-----------------------------------------------------------*/ 280 281 #if ( INCLUDE_vTaskSuspend == 1 ) 282 283 void MPU_vTaskResume( TaskHandle_t xTaskToResume ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 284 MPU_vTaskResume(TaskHandle_t xTaskToResume)285 void MPU_vTaskResume( TaskHandle_t xTaskToResume ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 286 { 287 __asm volatile 288 ( 289 " .syntax unified \n" 290 " .extern MPU_vTaskResumeImpl \n" 291 " \n" 292 " push {r0} \n" 293 " mrs r0, control \n" 294 " tst r0, #1 \n" 295 " pop {r0} \n" 296 " bne MPU_vTaskResume_Unpriv \n" 297 " MPU_vTaskResume_Priv: \n" 298 " b MPU_vTaskResumeImpl \n" 299 " MPU_vTaskResume_Unpriv: \n" 300 " svc %0 \n" 301 " \n" 302 : : "i" ( SYSTEM_CALL_vTaskResume ) : "memory" 303 ); 304 } 305 306 #endif /* if ( INCLUDE_vTaskSuspend == 1 ) */ 307 /*-----------------------------------------------------------*/ 308 309 TickType_t MPU_xTaskGetTickCount( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 310 MPU_xTaskGetTickCount(void)311 TickType_t MPU_xTaskGetTickCount( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 312 { 313 __asm volatile 314 ( 315 " .syntax unified \n" 316 " .extern MPU_xTaskGetTickCountImpl \n" 317 " \n" 318 " push {r0} \n" 319 " mrs r0, control \n" 320 " tst r0, #1 \n" 321 " pop {r0} \n" 322 " bne MPU_xTaskGetTickCount_Unpriv \n" 323 " MPU_xTaskGetTickCount_Priv: \n" 324 " b MPU_xTaskGetTickCountImpl \n" 325 " MPU_xTaskGetTickCount_Unpriv: \n" 326 " svc %0 \n" 327 " \n" 328 : : "i" ( SYSTEM_CALL_xTaskGetTickCount ) : "memory" 329 ); 330 } 331 /*-----------------------------------------------------------*/ 332 333 UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 334 MPU_uxTaskGetNumberOfTasks(void)335 UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 336 { 337 __asm volatile 338 ( 339 " .syntax unified \n" 340 " .extern MPU_uxTaskGetNumberOfTasksImpl \n" 341 " \n" 342 " push {r0} \n" 343 " mrs r0, control \n" 344 " tst r0, #1 \n" 345 " pop {r0} \n" 346 " bne MPU_uxTaskGetNumberOfTasks_Unpriv \n" 347 " MPU_uxTaskGetNumberOfTasks_Priv: \n" 348 " b MPU_uxTaskGetNumberOfTasksImpl \n" 349 " MPU_uxTaskGetNumberOfTasks_Unpriv: \n" 350 " svc %0 \n" 351 " \n" 352 : : "i" ( SYSTEM_CALL_uxTaskGetNumberOfTasks ) : "memory" 353 ); 354 } 355 /*-----------------------------------------------------------*/ 356 357 #if ( configGENERATE_RUN_TIME_STATS == 1 ) 358 359 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 360 MPU_ulTaskGetRunTimeCounter(const TaskHandle_t xTask)361 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimeCounter( const TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 362 { 363 __asm volatile 364 ( 365 " .syntax unified \n" 366 " .extern MPU_ulTaskGetRunTimeCounterImpl \n" 367 " \n" 368 " push {r0} \n" 369 " mrs r0, control \n" 370 " tst r0, #1 \n" 371 " pop {r0} \n" 372 " bne MPU_ulTaskGetRunTimeCounter_Unpriv \n" 373 " MPU_ulTaskGetRunTimeCounter_Priv: \n" 374 " b MPU_ulTaskGetRunTimeCounterImpl \n" 375 " MPU_ulTaskGetRunTimeCounter_Unpriv: \n" 376 " svc %0 \n" 377 " \n" 378 : : "i" ( SYSTEM_CALL_ulTaskGetRunTimeCounter ) : "memory" 379 ); 380 } 381 382 #endif /* if ( ( configGENERATE_RUN_TIME_STATS == 1 ) */ 383 /*-----------------------------------------------------------*/ 384 385 #if ( configGENERATE_RUN_TIME_STATS == 1 ) 386 387 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimePercent( const TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 388 MPU_ulTaskGetRunTimePercent(const TaskHandle_t xTask)389 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetRunTimePercent( const TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 390 { 391 __asm volatile 392 ( 393 " .syntax unified \n" 394 " .extern MPU_ulTaskGetRunTimePercentImpl \n" 395 " \n" 396 " push {r0} \n" 397 " mrs r0, control \n" 398 " tst r0, #1 \n" 399 " pop {r0} \n" 400 " bne MPU_ulTaskGetRunTimePercent_Unpriv \n" 401 " MPU_ulTaskGetRunTimePercent_Priv: \n" 402 " b MPU_ulTaskGetRunTimePercentImpl \n" 403 " MPU_ulTaskGetRunTimePercent_Unpriv: \n" 404 " svc %0 \n" 405 " \n" 406 : : "i" ( SYSTEM_CALL_ulTaskGetRunTimePercent ) : "memory" 407 ); 408 } 409 410 #endif /* if ( ( configGENERATE_RUN_TIME_STATS == 1 ) */ 411 /*-----------------------------------------------------------*/ 412 413 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) ) 414 415 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetIdleRunTimePercent( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 416 MPU_ulTaskGetIdleRunTimePercent(void)417 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetIdleRunTimePercent( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 418 { 419 __asm volatile 420 ( 421 " .syntax unified \n" 422 " .extern MPU_ulTaskGetIdleRunTimePercentImpl \n" 423 " \n" 424 " push {r0} \n" 425 " mrs r0, control \n" 426 " tst r0, #1 \n" 427 " pop {r0} \n" 428 " bne MPU_ulTaskGetIdleRunTimePercent_Unpriv \n" 429 " MPU_ulTaskGetIdleRunTimePercent_Priv: \n" 430 " b MPU_ulTaskGetIdleRunTimePercentImpl \n" 431 " MPU_ulTaskGetIdleRunTimePercent_Unpriv: \n" 432 " svc %0 \n" 433 " \n" 434 : : "i" ( SYSTEM_CALL_ulTaskGetIdleRunTimePercent ) : "memory" 435 ); 436 } 437 438 #endif /* if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) ) */ 439 /*-----------------------------------------------------------*/ 440 441 #if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) ) 442 443 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetIdleRunTimeCounter( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 444 MPU_ulTaskGetIdleRunTimeCounter(void)445 configRUN_TIME_COUNTER_TYPE MPU_ulTaskGetIdleRunTimeCounter( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 446 { 447 __asm volatile 448 ( 449 " .syntax unified \n" 450 " .extern MPU_ulTaskGetIdleRunTimeCounterImpl \n" 451 " \n" 452 " push {r0} \n" 453 " mrs r0, control \n" 454 " tst r0, #1 \n" 455 " pop {r0} \n" 456 " bne MPU_ulTaskGetIdleRunTimeCounter_Unpriv \n" 457 " MPU_ulTaskGetIdleRunTimeCounter_Priv: \n" 458 " b MPU_ulTaskGetIdleRunTimeCounterImpl \n" 459 " MPU_ulTaskGetIdleRunTimeCounter_Unpriv: \n" 460 " svc %0 \n" 461 " \n" 462 : : "i" ( SYSTEM_CALL_ulTaskGetIdleRunTimeCounter ) : "memory" 463 ); 464 } 465 466 #endif /* if ( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) ) */ 467 /*-----------------------------------------------------------*/ 468 469 #if ( configUSE_APPLICATION_TASK_TAG == 1 ) 470 471 void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, 472 TaskHookFunction_t pxHookFunction ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 473 MPU_vTaskSetApplicationTaskTag(TaskHandle_t xTask,TaskHookFunction_t pxHookFunction)474 void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, 475 TaskHookFunction_t pxHookFunction ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 476 { 477 __asm volatile 478 ( 479 " .syntax unified \n" 480 " .extern MPU_vTaskSetApplicationTaskTagImpl \n" 481 " \n" 482 " push {r0} \n" 483 " mrs r0, control \n" 484 " tst r0, #1 \n" 485 " pop {r0} \n" 486 " bne MPU_vTaskSetApplicationTaskTag_Unpriv \n" 487 " MPU_vTaskSetApplicationTaskTag_Priv: \n" 488 " b MPU_vTaskSetApplicationTaskTagImpl \n" 489 " MPU_vTaskSetApplicationTaskTag_Unpriv: \n" 490 " svc %0 \n" 491 " \n" 492 : : "i" ( SYSTEM_CALL_vTaskSetApplicationTaskTag ) : "memory" 493 ); 494 } 495 496 #endif /* if ( configUSE_APPLICATION_TASK_TAG == 1 ) */ 497 /*-----------------------------------------------------------*/ 498 499 #if ( configUSE_APPLICATION_TASK_TAG == 1 ) 500 501 TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 502 MPU_xTaskGetApplicationTaskTag(TaskHandle_t xTask)503 TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 504 { 505 __asm volatile 506 ( 507 " .syntax unified \n" 508 " .extern MPU_xTaskGetApplicationTaskTagImpl \n" 509 " \n" 510 " push {r0} \n" 511 " mrs r0, control \n" 512 " tst r0, #1 \n" 513 " pop {r0} \n" 514 " bne MPU_xTaskGetApplicationTaskTag_Unpriv \n" 515 " MPU_xTaskGetApplicationTaskTag_Priv: \n" 516 " b MPU_xTaskGetApplicationTaskTagImpl \n" 517 " MPU_xTaskGetApplicationTaskTag_Unpriv: \n" 518 " svc %0 \n" 519 " \n" 520 : : "i" ( SYSTEM_CALL_xTaskGetApplicationTaskTag ) : "memory" 521 ); 522 } 523 524 #endif /* if ( configUSE_APPLICATION_TASK_TAG == 1 ) */ 525 /*-----------------------------------------------------------*/ 526 527 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 ) 528 529 void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, 530 BaseType_t xIndex, 531 void * pvValue ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 532 MPU_vTaskSetThreadLocalStoragePointer(TaskHandle_t xTaskToSet,BaseType_t xIndex,void * pvValue)533 void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, 534 BaseType_t xIndex, 535 void * pvValue ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 536 { 537 __asm volatile 538 ( 539 " .syntax unified \n" 540 " .extern MPU_vTaskSetThreadLocalStoragePointerImpl \n" 541 " \n" 542 " push {r0} \n" 543 " mrs r0, control \n" 544 " tst r0, #1 \n" 545 " pop {r0} \n" 546 " bne MPU_vTaskSetThreadLocalStoragePointer_Unpriv \n" 547 " MPU_vTaskSetThreadLocalStoragePointer_Priv: \n" 548 " b MPU_vTaskSetThreadLocalStoragePointerImpl \n" 549 " MPU_vTaskSetThreadLocalStoragePointer_Unpriv: \n" 550 " svc %0 \n" 551 " \n" 552 : : "i" ( SYSTEM_CALL_vTaskSetThreadLocalStoragePointer ) : "memory" 553 ); 554 } 555 556 #endif /* if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 ) */ 557 /*-----------------------------------------------------------*/ 558 559 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 ) 560 561 void * MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, 562 BaseType_t xIndex ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 563 MPU_pvTaskGetThreadLocalStoragePointer(TaskHandle_t xTaskToQuery,BaseType_t xIndex)564 void * MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, 565 BaseType_t xIndex ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 566 { 567 __asm volatile 568 ( 569 " .syntax unified \n" 570 " .extern MPU_pvTaskGetThreadLocalStoragePointerImpl \n" 571 " \n" 572 " push {r0} \n" 573 " mrs r0, control \n" 574 " tst r0, #1 \n" 575 " pop {r0} \n" 576 " bne MPU_pvTaskGetThreadLocalStoragePointer_Unpriv \n" 577 " MPU_pvTaskGetThreadLocalStoragePointer_Priv: \n" 578 " b MPU_pvTaskGetThreadLocalStoragePointerImpl \n" 579 " MPU_pvTaskGetThreadLocalStoragePointer_Unpriv: \n" 580 " svc %0 \n" 581 " \n" 582 : : "i" ( SYSTEM_CALL_pvTaskGetThreadLocalStoragePointer ) : "memory" 583 ); 584 } 585 586 #endif /* if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 ) */ 587 /*-----------------------------------------------------------*/ 588 589 #if ( configUSE_TRACE_FACILITY == 1 ) 590 591 UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, 592 const UBaseType_t uxArraySize, 593 configRUN_TIME_COUNTER_TYPE * const pulTotalRunTime ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 594 MPU_uxTaskGetSystemState(TaskStatus_t * const pxTaskStatusArray,const UBaseType_t uxArraySize,configRUN_TIME_COUNTER_TYPE * const pulTotalRunTime)595 UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, 596 const UBaseType_t uxArraySize, 597 configRUN_TIME_COUNTER_TYPE * const pulTotalRunTime ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 598 { 599 __asm volatile 600 ( 601 " .syntax unified \n" 602 " .extern MPU_uxTaskGetSystemStateImpl \n" 603 " \n" 604 " push {r0} \n" 605 " mrs r0, control \n" 606 " tst r0, #1 \n" 607 " pop {r0} \n" 608 " bne MPU_uxTaskGetSystemState_Unpriv \n" 609 " MPU_uxTaskGetSystemState_Priv: \n" 610 " b MPU_uxTaskGetSystemStateImpl \n" 611 " MPU_uxTaskGetSystemState_Unpriv: \n" 612 " svc %0 \n" 613 " \n" 614 : : "i" ( SYSTEM_CALL_uxTaskGetSystemState ) : "memory" 615 ); 616 } 617 618 #endif /* if ( configUSE_TRACE_FACILITY == 1 ) */ 619 /*-----------------------------------------------------------*/ 620 621 #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) 622 623 UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 624 MPU_uxTaskGetStackHighWaterMark(TaskHandle_t xTask)625 UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 626 { 627 __asm volatile 628 ( 629 " .syntax unified \n" 630 " .extern MPU_uxTaskGetStackHighWaterMarkImpl \n" 631 " \n" 632 " push {r0} \n" 633 " mrs r0, control \n" 634 " tst r0, #1 \n" 635 " pop {r0} \n" 636 " bne MPU_uxTaskGetStackHighWaterMark_Unpriv \n" 637 " MPU_uxTaskGetStackHighWaterMark_Priv: \n" 638 " b MPU_uxTaskGetStackHighWaterMarkImpl \n" 639 " MPU_uxTaskGetStackHighWaterMark_Unpriv: \n" 640 " svc %0 \n" 641 " \n" 642 : : "i" ( SYSTEM_CALL_uxTaskGetStackHighWaterMark ) : "memory" 643 ); 644 } 645 646 #endif /* if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) */ 647 /*-----------------------------------------------------------*/ 648 649 #if ( INCLUDE_uxTaskGetStackHighWaterMark2 == 1 ) 650 651 configSTACK_DEPTH_TYPE MPU_uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 652 MPU_uxTaskGetStackHighWaterMark2(TaskHandle_t xTask)653 configSTACK_DEPTH_TYPE MPU_uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 654 { 655 __asm volatile 656 ( 657 " .syntax unified \n" 658 " .extern MPU_uxTaskGetStackHighWaterMark2Impl \n" 659 " \n" 660 " push {r0} \n" 661 " mrs r0, control \n" 662 " tst r0, #1 \n" 663 " pop {r0} \n" 664 " bne MPU_uxTaskGetStackHighWaterMark2_Unpriv \n" 665 " MPU_uxTaskGetStackHighWaterMark2_Priv: \n" 666 " b MPU_uxTaskGetStackHighWaterMark2Impl \n" 667 " MPU_uxTaskGetStackHighWaterMark2_Unpriv: \n" 668 " svc %0 \n" 669 " \n" 670 : : "i" ( SYSTEM_CALL_uxTaskGetStackHighWaterMark2 ) : "memory" 671 ); 672 } 673 674 #endif /* if ( INCLUDE_uxTaskGetStackHighWaterMark2 == 1 ) */ 675 /*-----------------------------------------------------------*/ 676 677 #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) ) 678 679 TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 680 MPU_xTaskGetCurrentTaskHandle(void)681 TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 682 { 683 __asm volatile 684 ( 685 " .syntax unified \n" 686 " .extern MPU_xTaskGetCurrentTaskHandleImpl \n" 687 " \n" 688 " push {r0} \n" 689 " mrs r0, control \n" 690 " tst r0, #1 \n" 691 " pop {r0} \n" 692 " bne MPU_xTaskGetCurrentTaskHandle_Unpriv \n" 693 " MPU_xTaskGetCurrentTaskHandle_Priv: \n" 694 " b MPU_xTaskGetCurrentTaskHandleImpl \n" 695 " MPU_xTaskGetCurrentTaskHandle_Unpriv: \n" 696 " svc %0 \n" 697 " \n" 698 : : "i" ( SYSTEM_CALL_xTaskGetCurrentTaskHandle ) : "memory" 699 ); 700 } 701 702 #endif /* if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) ) */ 703 /*-----------------------------------------------------------*/ 704 705 #if ( INCLUDE_xTaskGetSchedulerState == 1 ) 706 707 BaseType_t MPU_xTaskGetSchedulerState( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 708 MPU_xTaskGetSchedulerState(void)709 BaseType_t MPU_xTaskGetSchedulerState( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 710 { 711 __asm volatile 712 ( 713 " .syntax unified \n" 714 " .extern MPU_xTaskGetSchedulerStateImpl \n" 715 " \n" 716 " push {r0} \n" 717 " mrs r0, control \n" 718 " tst r0, #1 \n" 719 " pop {r0} \n" 720 " bne MPU_xTaskGetSchedulerState_Unpriv \n" 721 " MPU_xTaskGetSchedulerState_Priv: \n" 722 " b MPU_xTaskGetSchedulerStateImpl \n" 723 " MPU_xTaskGetSchedulerState_Unpriv: \n" 724 " svc %0 \n" 725 " \n" 726 : : "i" ( SYSTEM_CALL_xTaskGetSchedulerState ) : "memory" 727 ); 728 } 729 730 #endif /* if ( INCLUDE_xTaskGetSchedulerState == 1 ) */ 731 /*-----------------------------------------------------------*/ 732 733 void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 734 MPU_vTaskSetTimeOutState(TimeOut_t * const pxTimeOut)735 void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 736 { 737 __asm volatile 738 ( 739 " .syntax unified \n" 740 " .extern MPU_vTaskSetTimeOutStateImpl \n" 741 " \n" 742 " push {r0} \n" 743 " mrs r0, control \n" 744 " tst r0, #1 \n" 745 " pop {r0} \n" 746 " bne MPU_vTaskSetTimeOutState_Unpriv \n" 747 " MPU_vTaskSetTimeOutState_Priv: \n" 748 " b MPU_vTaskSetTimeOutStateImpl \n" 749 " MPU_vTaskSetTimeOutState_Unpriv: \n" 750 " svc %0 \n" 751 " \n" 752 : : "i" ( SYSTEM_CALL_vTaskSetTimeOutState ) : "memory" 753 ); 754 } 755 /*-----------------------------------------------------------*/ 756 757 BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, 758 TickType_t * const pxTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 759 MPU_xTaskCheckForTimeOut(TimeOut_t * const pxTimeOut,TickType_t * const pxTicksToWait)760 BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, 761 TickType_t * const pxTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 762 { 763 __asm volatile 764 ( 765 " .syntax unified \n" 766 " .extern MPU_xTaskCheckForTimeOutImpl \n" 767 " \n" 768 " push {r0} \n" 769 " mrs r0, control \n" 770 " tst r0, #1 \n" 771 " pop {r0} \n" 772 " bne MPU_xTaskCheckForTimeOut_Unpriv \n" 773 " MPU_xTaskCheckForTimeOut_Priv: \n" 774 " b MPU_xTaskCheckForTimeOutImpl \n" 775 " MPU_xTaskCheckForTimeOut_Unpriv: \n" 776 " svc %0 \n" 777 " \n" 778 : : "i" ( SYSTEM_CALL_xTaskCheckForTimeOut ) : "memory" 779 ); 780 } 781 /*-----------------------------------------------------------*/ 782 783 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) 784 785 BaseType_t MPU_xTaskGenericNotifyEntry( const xTaskGenericNotifyParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 786 MPU_xTaskGenericNotifyEntry(const xTaskGenericNotifyParams_t * pxParams)787 BaseType_t MPU_xTaskGenericNotifyEntry( const xTaskGenericNotifyParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 788 { 789 __asm volatile 790 ( 791 " .syntax unified \n" 792 " .extern MPU_xTaskGenericNotifyImpl \n" 793 " \n" 794 " push {r0} \n" 795 " mrs r0, control \n" 796 " tst r0, #1 \n" 797 " pop {r0} \n" 798 " bne MPU_xTaskGenericNotify_Unpriv \n" 799 " MPU_xTaskGenericNotify_Priv: \n" 800 " b MPU_xTaskGenericNotifyImpl \n" 801 " MPU_xTaskGenericNotify_Unpriv: \n" 802 " svc %0 \n" 803 " \n" 804 : : "i" ( SYSTEM_CALL_xTaskGenericNotify ) : "memory" 805 ); 806 } 807 808 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ 809 /*-----------------------------------------------------------*/ 810 811 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) 812 813 BaseType_t MPU_xTaskGenericNotifyWaitEntry( const xTaskGenericNotifyWaitParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 814 MPU_xTaskGenericNotifyWaitEntry(const xTaskGenericNotifyWaitParams_t * pxParams)815 BaseType_t MPU_xTaskGenericNotifyWaitEntry( const xTaskGenericNotifyWaitParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 816 { 817 __asm volatile 818 ( 819 " .syntax unified \n" 820 " .extern MPU_xTaskGenericNotifyWaitImpl \n" 821 " \n" 822 " push {r0} \n" 823 " mrs r0, control \n" 824 " tst r0, #1 \n" 825 " pop {r0} \n" 826 " bne MPU_xTaskGenericNotifyWait_Unpriv \n" 827 " MPU_xTaskGenericNotifyWait_Priv: \n" 828 " b MPU_xTaskGenericNotifyWaitImpl \n" 829 " MPU_xTaskGenericNotifyWait_Unpriv: \n" 830 " svc %0 \n" 831 " \n" 832 : : "i" ( SYSTEM_CALL_xTaskGenericNotifyWait ) : "memory" 833 ); 834 } 835 836 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ 837 /*-----------------------------------------------------------*/ 838 839 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) 840 841 uint32_t MPU_ulTaskGenericNotifyTake( UBaseType_t uxIndexToWaitOn, 842 BaseType_t xClearCountOnExit, 843 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 844 MPU_ulTaskGenericNotifyTake(UBaseType_t uxIndexToWaitOn,BaseType_t xClearCountOnExit,TickType_t xTicksToWait)845 uint32_t MPU_ulTaskGenericNotifyTake( UBaseType_t uxIndexToWaitOn, 846 BaseType_t xClearCountOnExit, 847 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 848 { 849 __asm volatile 850 ( 851 " .syntax unified \n" 852 " .extern MPU_ulTaskGenericNotifyTakeImpl \n" 853 " \n" 854 " push {r0} \n" 855 " mrs r0, control \n" 856 " tst r0, #1 \n" 857 " pop {r0} \n" 858 " bne MPU_ulTaskGenericNotifyTake_Unpriv \n" 859 " MPU_ulTaskGenericNotifyTake_Priv: \n" 860 " b MPU_ulTaskGenericNotifyTakeImpl \n" 861 " MPU_ulTaskGenericNotifyTake_Unpriv: \n" 862 " svc %0 \n" 863 " \n" 864 : : "i" ( SYSTEM_CALL_ulTaskGenericNotifyTake ) : "memory" 865 ); 866 } 867 868 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ 869 /*-----------------------------------------------------------*/ 870 871 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) 872 873 BaseType_t MPU_xTaskGenericNotifyStateClear( TaskHandle_t xTask, 874 UBaseType_t uxIndexToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 875 MPU_xTaskGenericNotifyStateClear(TaskHandle_t xTask,UBaseType_t uxIndexToClear)876 BaseType_t MPU_xTaskGenericNotifyStateClear( TaskHandle_t xTask, 877 UBaseType_t uxIndexToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 878 { 879 __asm volatile 880 ( 881 " .syntax unified \n" 882 " .extern MPU_xTaskGenericNotifyStateClearImpl \n" 883 " \n" 884 " push {r0} \n" 885 " mrs r0, control \n" 886 " tst r0, #1 \n" 887 " pop {r0} \n" 888 " bne MPU_xTaskGenericNotifyStateClear_Unpriv \n" 889 " MPU_xTaskGenericNotifyStateClear_Priv: \n" 890 " b MPU_xTaskGenericNotifyStateClearImpl \n" 891 " MPU_xTaskGenericNotifyStateClear_Unpriv: \n" 892 " svc %0 \n" 893 " \n" 894 : : "i" ( SYSTEM_CALL_xTaskGenericNotifyStateClear ) : "memory" 895 ); 896 } 897 898 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ 899 /*-----------------------------------------------------------*/ 900 901 #if ( configUSE_TASK_NOTIFICATIONS == 1 ) 902 903 uint32_t MPU_ulTaskGenericNotifyValueClear( TaskHandle_t xTask, 904 UBaseType_t uxIndexToClear, 905 uint32_t ulBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 906 MPU_ulTaskGenericNotifyValueClear(TaskHandle_t xTask,UBaseType_t uxIndexToClear,uint32_t ulBitsToClear)907 uint32_t MPU_ulTaskGenericNotifyValueClear( TaskHandle_t xTask, 908 UBaseType_t uxIndexToClear, 909 uint32_t ulBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 910 { 911 __asm volatile 912 ( 913 " .syntax unified \n" 914 " .extern MPU_ulTaskGenericNotifyValueClearImpl \n" 915 " \n" 916 " push {r0} \n" 917 " mrs r0, control \n" 918 " tst r0, #1 \n" 919 " pop {r0} \n" 920 " bne MPU_ulTaskGenericNotifyValueClear_Unpriv \n" 921 " MPU_ulTaskGenericNotifyValueClear_Priv: \n" 922 " b MPU_ulTaskGenericNotifyValueClearImpl \n" 923 " MPU_ulTaskGenericNotifyValueClear_Unpriv: \n" 924 " svc %0 \n" 925 " \n" 926 : : "i" ( SYSTEM_CALL_ulTaskGenericNotifyValueClear ) : "memory" 927 ); 928 } 929 930 #endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */ 931 /*-----------------------------------------------------------*/ 932 933 BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, 934 const void * const pvItemToQueue, 935 TickType_t xTicksToWait, 936 const BaseType_t xCopyPosition ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 937 MPU_xQueueGenericSend(QueueHandle_t xQueue,const void * const pvItemToQueue,TickType_t xTicksToWait,const BaseType_t xCopyPosition)938 BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, 939 const void * const pvItemToQueue, 940 TickType_t xTicksToWait, 941 const BaseType_t xCopyPosition ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 942 { 943 __asm volatile 944 ( 945 " .syntax unified \n" 946 " .extern MPU_xQueueGenericSendImpl \n" 947 " \n" 948 " push {r0} \n" 949 " mrs r0, control \n" 950 " tst r0, #1 \n" 951 " pop {r0} \n" 952 " bne MPU_xQueueGenericSend_Unpriv \n" 953 " MPU_xQueueGenericSend_Priv: \n" 954 " b MPU_xQueueGenericSendImpl \n" 955 " MPU_xQueueGenericSend_Unpriv: \n" 956 " svc %0 \n" 957 " \n" 958 : : "i" ( SYSTEM_CALL_xQueueGenericSend ) : "memory" 959 ); 960 } 961 /*-----------------------------------------------------------*/ 962 963 UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t xQueue ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 964 MPU_uxQueueMessagesWaiting(const QueueHandle_t xQueue)965 UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t xQueue ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 966 { 967 __asm volatile 968 ( 969 " .syntax unified \n" 970 " .extern MPU_uxQueueMessagesWaitingImpl \n" 971 " \n" 972 " push {r0} \n" 973 " mrs r0, control \n" 974 " tst r0, #1 \n" 975 " pop {r0} \n" 976 " bne MPU_uxQueueMessagesWaiting_Unpriv \n" 977 " MPU_uxQueueMessagesWaiting_Priv: \n" 978 " b MPU_uxQueueMessagesWaitingImpl \n" 979 " MPU_uxQueueMessagesWaiting_Unpriv: \n" 980 " svc %0 \n" 981 " \n" 982 : : "i" ( SYSTEM_CALL_uxQueueMessagesWaiting ) : "memory" 983 ); 984 } 985 /*-----------------------------------------------------------*/ 986 987 UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 988 MPU_uxQueueSpacesAvailable(const QueueHandle_t xQueue)989 UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 990 { 991 __asm volatile 992 ( 993 " .syntax unified \n" 994 " .extern MPU_uxQueueSpacesAvailableImpl \n" 995 " \n" 996 " push {r0} \n" 997 " mrs r0, control \n" 998 " tst r0, #1 \n" 999 " pop {r0} \n" 1000 " bne MPU_uxQueueSpacesAvailable_Unpriv \n" 1001 " MPU_uxQueueSpacesAvailable_Priv: \n" 1002 " b MPU_uxQueueSpacesAvailableImpl \n" 1003 " MPU_uxQueueSpacesAvailable_Unpriv: \n" 1004 " svc %0 \n" 1005 " \n" 1006 : : "i" ( SYSTEM_CALL_uxQueueSpacesAvailable ) : "memory" 1007 ); 1008 } 1009 /*-----------------------------------------------------------*/ 1010 1011 BaseType_t MPU_xQueueReceive( QueueHandle_t xQueue, 1012 void * const pvBuffer, 1013 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1014 MPU_xQueueReceive(QueueHandle_t xQueue,void * const pvBuffer,TickType_t xTicksToWait)1015 BaseType_t MPU_xQueueReceive( QueueHandle_t xQueue, 1016 void * const pvBuffer, 1017 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1018 { 1019 __asm volatile 1020 ( 1021 " .syntax unified \n" 1022 " .extern MPU_xQueueReceiveImpl \n" 1023 " \n" 1024 " push {r0} \n" 1025 " mrs r0, control \n" 1026 " tst r0, #1 \n" 1027 " pop {r0} \n" 1028 " bne MPU_xQueueReceive_Unpriv \n" 1029 " MPU_xQueueReceive_Priv: \n" 1030 " b MPU_xQueueReceiveImpl \n" 1031 " MPU_xQueueReceive_Unpriv: \n" 1032 " svc %0 \n" 1033 " \n" 1034 : : "i" ( SYSTEM_CALL_xQueueReceive ) : "memory" 1035 ); 1036 } 1037 /*-----------------------------------------------------------*/ 1038 1039 BaseType_t MPU_xQueuePeek( QueueHandle_t xQueue, 1040 void * const pvBuffer, 1041 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1042 MPU_xQueuePeek(QueueHandle_t xQueue,void * const pvBuffer,TickType_t xTicksToWait)1043 BaseType_t MPU_xQueuePeek( QueueHandle_t xQueue, 1044 void * const pvBuffer, 1045 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1046 { 1047 __asm volatile 1048 ( 1049 " .syntax unified \n" 1050 " .extern MPU_xQueuePeekImpl \n" 1051 " \n" 1052 " push {r0} \n" 1053 " mrs r0, control \n" 1054 " tst r0, #1 \n" 1055 " pop {r0} \n" 1056 " bne MPU_xQueuePeek_Unpriv \n" 1057 " MPU_xQueuePeek_Priv: \n" 1058 " b MPU_xQueuePeekImpl \n" 1059 " MPU_xQueuePeek_Unpriv: \n" 1060 " svc %0 \n" 1061 " \n" 1062 : : "i" ( SYSTEM_CALL_xQueuePeek ) : "memory" 1063 ); 1064 } 1065 /*-----------------------------------------------------------*/ 1066 1067 BaseType_t MPU_xQueueSemaphoreTake( QueueHandle_t xQueue, 1068 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1069 MPU_xQueueSemaphoreTake(QueueHandle_t xQueue,TickType_t xTicksToWait)1070 BaseType_t MPU_xQueueSemaphoreTake( QueueHandle_t xQueue, 1071 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1072 { 1073 __asm volatile 1074 ( 1075 " .syntax unified \n" 1076 " .extern MPU_xQueueSemaphoreTakeImpl \n" 1077 " \n" 1078 " push {r0} \n" 1079 " mrs r0, control \n" 1080 " tst r0, #1 \n" 1081 " pop {r0} \n" 1082 " bne MPU_xQueueSemaphoreTake_Unpriv \n" 1083 " MPU_xQueueSemaphoreTake_Priv: \n" 1084 " b MPU_xQueueSemaphoreTakeImpl \n" 1085 " MPU_xQueueSemaphoreTake_Unpriv: \n" 1086 " svc %0 \n" 1087 " \n" 1088 : : "i" ( SYSTEM_CALL_xQueueSemaphoreTake ) : "memory" 1089 ); 1090 } 1091 /*-----------------------------------------------------------*/ 1092 1093 #if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) ) 1094 1095 TaskHandle_t MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1096 MPU_xQueueGetMutexHolder(QueueHandle_t xSemaphore)1097 TaskHandle_t MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1098 { 1099 __asm volatile 1100 ( 1101 " .syntax unified \n" 1102 " .extern MPU_xQueueGetMutexHolderImpl \n" 1103 " \n" 1104 " push {r0} \n" 1105 " mrs r0, control \n" 1106 " tst r0, #1 \n" 1107 " pop {r0} \n" 1108 " bne MPU_xQueueGetMutexHolder_Unpriv \n" 1109 " MPU_xQueueGetMutexHolder_Priv: \n" 1110 " b MPU_xQueueGetMutexHolderImpl \n" 1111 " MPU_xQueueGetMutexHolder_Unpriv: \n" 1112 " svc %0 \n" 1113 " \n" 1114 : : "i" ( SYSTEM_CALL_xQueueGetMutexHolder ) : "memory" 1115 ); 1116 } 1117 1118 #endif /* if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) ) */ 1119 /*-----------------------------------------------------------*/ 1120 1121 #if ( configUSE_RECURSIVE_MUTEXES == 1 ) 1122 1123 BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, 1124 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1125 MPU_xQueueTakeMutexRecursive(QueueHandle_t xMutex,TickType_t xTicksToWait)1126 BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, 1127 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1128 { 1129 __asm volatile 1130 ( 1131 " .syntax unified \n" 1132 " .extern MPU_xQueueTakeMutexRecursiveImpl \n" 1133 " \n" 1134 " push {r0} \n" 1135 " mrs r0, control \n" 1136 " tst r0, #1 \n" 1137 " pop {r0} \n" 1138 " bne MPU_xQueueTakeMutexRecursive_Unpriv \n" 1139 " MPU_xQueueTakeMutexRecursive_Priv: \n" 1140 " b MPU_xQueueTakeMutexRecursiveImpl \n" 1141 " MPU_xQueueTakeMutexRecursive_Unpriv: \n" 1142 " svc %0 \n" 1143 " \n" 1144 : : "i" ( SYSTEM_CALL_xQueueTakeMutexRecursive ) : "memory" 1145 ); 1146 } 1147 1148 #endif /* if ( configUSE_RECURSIVE_MUTEXES == 1 ) */ 1149 /*-----------------------------------------------------------*/ 1150 1151 #if ( configUSE_RECURSIVE_MUTEXES == 1 ) 1152 1153 BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1154 MPU_xQueueGiveMutexRecursive(QueueHandle_t pxMutex)1155 BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1156 { 1157 __asm volatile 1158 ( 1159 " .syntax unified \n" 1160 " .extern MPU_xQueueGiveMutexRecursiveImpl \n" 1161 " \n" 1162 " push {r0} \n" 1163 " mrs r0, control \n" 1164 " tst r0, #1 \n" 1165 " pop {r0} \n" 1166 " bne MPU_xQueueGiveMutexRecursive_Unpriv \n" 1167 " MPU_xQueueGiveMutexRecursive_Priv: \n" 1168 " b MPU_xQueueGiveMutexRecursiveImpl \n" 1169 " MPU_xQueueGiveMutexRecursive_Unpriv: \n" 1170 " svc %0 \n" 1171 " \n" 1172 : : "i" ( SYSTEM_CALL_xQueueGiveMutexRecursive ) : "memory" 1173 ); 1174 } 1175 1176 #endif /* if ( configUSE_RECURSIVE_MUTEXES == 1 ) */ 1177 /*-----------------------------------------------------------*/ 1178 1179 #if ( configUSE_QUEUE_SETS == 1 ) 1180 1181 QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, 1182 const TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1183 MPU_xQueueSelectFromSet(QueueSetHandle_t xQueueSet,const TickType_t xTicksToWait)1184 QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, 1185 const TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1186 { 1187 __asm volatile 1188 ( 1189 " .syntax unified \n" 1190 " .extern MPU_xQueueSelectFromSetImpl \n" 1191 " \n" 1192 " push {r0} \n" 1193 " mrs r0, control \n" 1194 " tst r0, #1 \n" 1195 " pop {r0} \n" 1196 " bne MPU_xQueueSelectFromSet_Unpriv \n" 1197 " MPU_xQueueSelectFromSet_Priv: \n" 1198 " b MPU_xQueueSelectFromSetImpl \n" 1199 " MPU_xQueueSelectFromSet_Unpriv: \n" 1200 " svc %0 \n" 1201 " \n" 1202 : : "i" ( SYSTEM_CALL_xQueueSelectFromSet ) : "memory" 1203 ); 1204 } 1205 1206 #endif /* if ( configUSE_QUEUE_SETS == 1 ) */ 1207 /*-----------------------------------------------------------*/ 1208 1209 #if ( configUSE_QUEUE_SETS == 1 ) 1210 1211 BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, 1212 QueueSetHandle_t xQueueSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1213 MPU_xQueueAddToSet(QueueSetMemberHandle_t xQueueOrSemaphore,QueueSetHandle_t xQueueSet)1214 BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, 1215 QueueSetHandle_t xQueueSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1216 { 1217 __asm volatile 1218 ( 1219 " .syntax unified \n" 1220 " .extern MPU_xQueueAddToSetImpl \n" 1221 " \n" 1222 " push {r0} \n" 1223 " mrs r0, control \n" 1224 " tst r0, #1 \n" 1225 " pop {r0} \n" 1226 " bne MPU_xQueueAddToSet_Unpriv \n" 1227 " MPU_xQueueAddToSet_Priv: \n" 1228 " b MPU_xQueueAddToSetImpl \n" 1229 " MPU_xQueueAddToSet_Unpriv: \n" 1230 " svc %0 \n" 1231 " \n" 1232 : : "i" ( SYSTEM_CALL_xQueueAddToSet ) : "memory" 1233 ); 1234 } 1235 1236 #endif /* if ( configUSE_QUEUE_SETS == 1 ) */ 1237 /*-----------------------------------------------------------*/ 1238 1239 #if ( configQUEUE_REGISTRY_SIZE > 0 ) 1240 1241 void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, 1242 const char * pcName ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1243 MPU_vQueueAddToRegistry(QueueHandle_t xQueue,const char * pcName)1244 void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, 1245 const char * pcName ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1246 { 1247 __asm volatile 1248 ( 1249 " .syntax unified \n" 1250 " .extern MPU_vQueueAddToRegistryImpl \n" 1251 " \n" 1252 " push {r0} \n" 1253 " mrs r0, control \n" 1254 " tst r0, #1 \n" 1255 " pop {r0} \n" 1256 " bne MPU_vQueueAddToRegistry_Unpriv \n" 1257 " MPU_vQueueAddToRegistry_Priv: \n" 1258 " b MPU_vQueueAddToRegistryImpl \n" 1259 " MPU_vQueueAddToRegistry_Unpriv: \n" 1260 " svc %0 \n" 1261 " \n" 1262 : : "i" ( SYSTEM_CALL_vQueueAddToRegistry ) : "memory" 1263 ); 1264 } 1265 1266 #endif /* if ( configQUEUE_REGISTRY_SIZE > 0 ) */ 1267 /*-----------------------------------------------------------*/ 1268 1269 #if ( configQUEUE_REGISTRY_SIZE > 0 ) 1270 1271 void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1272 MPU_vQueueUnregisterQueue(QueueHandle_t xQueue)1273 void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1274 { 1275 __asm volatile 1276 ( 1277 " .syntax unified \n" 1278 " .extern MPU_vQueueUnregisterQueueImpl \n" 1279 " \n" 1280 " push {r0} \n" 1281 " mrs r0, control \n" 1282 " tst r0, #1 \n" 1283 " pop {r0} \n" 1284 " bne MPU_vQueueUnregisterQueue_Unpriv \n" 1285 " MPU_vQueueUnregisterQueue_Priv: \n" 1286 " b MPU_vQueueUnregisterQueueImpl \n" 1287 " MPU_vQueueUnregisterQueue_Unpriv: \n" 1288 " svc %0 \n" 1289 " \n" 1290 : : "i" ( SYSTEM_CALL_vQueueUnregisterQueue ) : "memory" 1291 ); 1292 } 1293 1294 #endif /* if ( configQUEUE_REGISTRY_SIZE > 0 ) */ 1295 /*-----------------------------------------------------------*/ 1296 1297 #if ( configQUEUE_REGISTRY_SIZE > 0 ) 1298 1299 const char * MPU_pcQueueGetName( QueueHandle_t xQueue ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1300 MPU_pcQueueGetName(QueueHandle_t xQueue)1301 const char * MPU_pcQueueGetName( QueueHandle_t xQueue ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1302 { 1303 __asm volatile 1304 ( 1305 " .syntax unified \n" 1306 " .extern MPU_pcQueueGetNameImpl \n" 1307 " \n" 1308 " push {r0} \n" 1309 " mrs r0, control \n" 1310 " tst r0, #1 \n" 1311 " pop {r0} \n" 1312 " bne MPU_pcQueueGetName_Unpriv \n" 1313 " MPU_pcQueueGetName_Priv: \n" 1314 " b MPU_pcQueueGetNameImpl \n" 1315 " MPU_pcQueueGetName_Unpriv: \n" 1316 " svc %0 \n" 1317 " \n" 1318 : : "i" ( SYSTEM_CALL_pcQueueGetName ) : "memory" 1319 ); 1320 } 1321 1322 #endif /* if ( configQUEUE_REGISTRY_SIZE > 0 ) */ 1323 /*-----------------------------------------------------------*/ 1324 1325 #if ( configUSE_TIMERS == 1 ) 1326 1327 void * MPU_pvTimerGetTimerID( const TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1328 MPU_pvTimerGetTimerID(const TimerHandle_t xTimer)1329 void * MPU_pvTimerGetTimerID( const TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1330 { 1331 __asm volatile 1332 ( 1333 " .syntax unified \n" 1334 " .extern MPU_pvTimerGetTimerIDImpl \n" 1335 " \n" 1336 " push {r0} \n" 1337 " mrs r0, control \n" 1338 " tst r0, #1 \n" 1339 " pop {r0} \n" 1340 " bne MPU_pvTimerGetTimerID_Unpriv \n" 1341 " MPU_pvTimerGetTimerID_Priv: \n" 1342 " b MPU_pvTimerGetTimerIDImpl \n" 1343 " MPU_pvTimerGetTimerID_Unpriv: \n" 1344 " svc %0 \n" 1345 " \n" 1346 : : "i" ( SYSTEM_CALL_pvTimerGetTimerID ) : "memory" 1347 ); 1348 } 1349 1350 #endif /* if ( configUSE_TIMERS == 1 ) */ 1351 /*-----------------------------------------------------------*/ 1352 1353 #if ( configUSE_TIMERS == 1 ) 1354 1355 void MPU_vTimerSetTimerID( TimerHandle_t xTimer, 1356 void * pvNewID ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1357 MPU_vTimerSetTimerID(TimerHandle_t xTimer,void * pvNewID)1358 void MPU_vTimerSetTimerID( TimerHandle_t xTimer, 1359 void * pvNewID ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1360 { 1361 __asm volatile 1362 ( 1363 " .syntax unified \n" 1364 " .extern MPU_vTimerSetTimerIDImpl \n" 1365 " \n" 1366 " push {r0} \n" 1367 " mrs r0, control \n" 1368 " tst r0, #1 \n" 1369 " pop {r0} \n" 1370 " bne MPU_vTimerSetTimerID_Unpriv \n" 1371 " MPU_vTimerSetTimerID_Priv: \n" 1372 " b MPU_vTimerSetTimerIDImpl \n" 1373 " MPU_vTimerSetTimerID_Unpriv: \n" 1374 " svc %0 \n" 1375 " \n" 1376 : : "i" ( SYSTEM_CALL_vTimerSetTimerID ) : "memory" 1377 ); 1378 } 1379 1380 #endif /* if ( configUSE_TIMERS == 1 ) */ 1381 /*-----------------------------------------------------------*/ 1382 1383 #if ( configUSE_TIMERS == 1 ) 1384 1385 BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1386 MPU_xTimerIsTimerActive(TimerHandle_t xTimer)1387 BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1388 { 1389 __asm volatile 1390 ( 1391 " .syntax unified \n" 1392 " .extern MPU_xTimerIsTimerActiveImpl \n" 1393 " \n" 1394 " push {r0} \n" 1395 " mrs r0, control \n" 1396 " tst r0, #1 \n" 1397 " pop {r0} \n" 1398 " bne MPU_xTimerIsTimerActive_Unpriv \n" 1399 " MPU_xTimerIsTimerActive_Priv: \n" 1400 " b MPU_xTimerIsTimerActiveImpl \n" 1401 " MPU_xTimerIsTimerActive_Unpriv: \n" 1402 " svc %0 \n" 1403 " \n" 1404 : : "i" ( SYSTEM_CALL_xTimerIsTimerActive ) : "memory" 1405 ); 1406 } 1407 1408 #endif /* if ( configUSE_TIMERS == 1 ) */ 1409 /*-----------------------------------------------------------*/ 1410 1411 #if ( configUSE_TIMERS == 1 ) 1412 1413 TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1414 MPU_xTimerGetTimerDaemonTaskHandle(void)1415 TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1416 { 1417 __asm volatile 1418 ( 1419 " .syntax unified \n" 1420 " .extern MPU_xTimerGetTimerDaemonTaskHandleImpl \n" 1421 " \n" 1422 " push {r0} \n" 1423 " mrs r0, control \n" 1424 " tst r0, #1 \n" 1425 " pop {r0} \n" 1426 " bne MPU_xTimerGetTimerDaemonTaskHandle_Unpriv \n" 1427 " MPU_xTimerGetTimerDaemonTaskHandle_Priv: \n" 1428 " b MPU_xTimerGetTimerDaemonTaskHandleImpl \n" 1429 " MPU_xTimerGetTimerDaemonTaskHandle_Unpriv: \n" 1430 " svc %0 \n" 1431 " \n" 1432 : : "i" ( SYSTEM_CALL_xTimerGetTimerDaemonTaskHandle ) : "memory" 1433 ); 1434 } 1435 1436 #endif /* if ( configUSE_TIMERS == 1 ) */ 1437 /*-----------------------------------------------------------*/ 1438 1439 #if ( configUSE_TIMERS == 1 ) 1440 1441 BaseType_t MPU_xTimerGenericCommandFromTaskEntry( const xTimerGenericCommandFromTaskParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1442 MPU_xTimerGenericCommandFromTaskEntry(const xTimerGenericCommandFromTaskParams_t * pxParams)1443 BaseType_t MPU_xTimerGenericCommandFromTaskEntry( const xTimerGenericCommandFromTaskParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1444 { 1445 __asm volatile 1446 ( 1447 " .syntax unified \n" 1448 " .extern MPU_xTimerGenericCommandFromTaskImpl \n" 1449 " \n" 1450 " push {r0} \n" 1451 " mrs r0, control \n" 1452 " tst r0, #1 \n" 1453 " pop {r0} \n" 1454 " bne MPU_xTimerGenericCommandFromTask_Unpriv \n" 1455 " MPU_xTimerGenericCommandFromTask_Priv: \n" 1456 " b MPU_xTimerGenericCommandFromTaskImpl \n" 1457 " MPU_xTimerGenericCommandFromTask_Unpriv: \n" 1458 " svc %0 \n" 1459 " \n" 1460 : : "i" ( SYSTEM_CALL_xTimerGenericCommandFromTask ) : "memory" 1461 ); 1462 } 1463 1464 #endif /* if ( configUSE_TIMERS == 1 ) */ 1465 /*-----------------------------------------------------------*/ 1466 1467 #if ( configUSE_TIMERS == 1 ) 1468 1469 const char * MPU_pcTimerGetName( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1470 MPU_pcTimerGetName(TimerHandle_t xTimer)1471 const char * MPU_pcTimerGetName( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1472 { 1473 __asm volatile 1474 ( 1475 " .syntax unified \n" 1476 " .extern MPU_pcTimerGetNameImpl \n" 1477 " \n" 1478 " push {r0} \n" 1479 " mrs r0, control \n" 1480 " tst r0, #1 \n" 1481 " pop {r0} \n" 1482 " bne MPU_pcTimerGetName_Unpriv \n" 1483 " MPU_pcTimerGetName_Priv: \n" 1484 " b MPU_pcTimerGetNameImpl \n" 1485 " MPU_pcTimerGetName_Unpriv: \n" 1486 " svc %0 \n" 1487 " \n" 1488 : : "i" ( SYSTEM_CALL_pcTimerGetName ) : "memory" 1489 ); 1490 } 1491 1492 #endif /* if ( configUSE_TIMERS == 1 ) */ 1493 /*-----------------------------------------------------------*/ 1494 1495 #if ( configUSE_TIMERS == 1 ) 1496 1497 void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, 1498 const BaseType_t uxAutoReload ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1499 MPU_vTimerSetReloadMode(TimerHandle_t xTimer,const BaseType_t uxAutoReload)1500 void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, 1501 const BaseType_t uxAutoReload ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1502 { 1503 __asm volatile 1504 ( 1505 " .syntax unified \n" 1506 " .extern MPU_vTimerSetReloadModeImpl \n" 1507 " \n" 1508 " push {r0} \n" 1509 " mrs r0, control \n" 1510 " tst r0, #1 \n" 1511 " pop {r0} \n" 1512 " bne MPU_vTimerSetReloadMode_Unpriv \n" 1513 " MPU_vTimerSetReloadMode_Priv: \n" 1514 " b MPU_vTimerSetReloadModeImpl \n" 1515 " MPU_vTimerSetReloadMode_Unpriv: \n" 1516 " svc %0 \n" 1517 " \n" 1518 : : "i" ( SYSTEM_CALL_vTimerSetReloadMode ) : "memory" 1519 ); 1520 } 1521 1522 #endif /* if ( configUSE_TIMERS == 1 ) */ 1523 /*-----------------------------------------------------------*/ 1524 1525 #if ( configUSE_TIMERS == 1 ) 1526 1527 BaseType_t MPU_xTimerGetReloadMode( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1528 MPU_xTimerGetReloadMode(TimerHandle_t xTimer)1529 BaseType_t MPU_xTimerGetReloadMode( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1530 { 1531 __asm volatile 1532 ( 1533 " .syntax unified \n" 1534 " .extern MPU_xTimerGetReloadModeImpl \n" 1535 " \n" 1536 " push {r0} \n" 1537 " mrs r0, control \n" 1538 " tst r0, #1 \n" 1539 " pop {r0} \n" 1540 " bne MPU_xTimerGetReloadMode_Unpriv \n" 1541 " MPU_xTimerGetReloadMode_Priv: \n" 1542 " b MPU_xTimerGetReloadModeImpl \n" 1543 " MPU_xTimerGetReloadMode_Unpriv: \n" 1544 " svc %0 \n" 1545 " \n" 1546 : : "i" ( SYSTEM_CALL_xTimerGetReloadMode ) : "memory" 1547 ); 1548 } 1549 1550 #endif /* if ( configUSE_TIMERS == 1 ) */ 1551 /*-----------------------------------------------------------*/ 1552 1553 #if ( configUSE_TIMERS == 1 ) 1554 1555 UBaseType_t MPU_uxTimerGetReloadMode( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1556 MPU_uxTimerGetReloadMode(TimerHandle_t xTimer)1557 UBaseType_t MPU_uxTimerGetReloadMode( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1558 { 1559 __asm volatile 1560 ( 1561 " .syntax unified \n" 1562 " .extern MPU_uxTimerGetReloadModeImpl \n" 1563 " \n" 1564 " push {r0} \n" 1565 " mrs r0, control \n" 1566 " tst r0, #1 \n" 1567 " pop {r0} \n" 1568 " bne MPU_uxTimerGetReloadMode_Unpriv \n" 1569 " MPU_uxTimerGetReloadMode_Priv: \n" 1570 " b MPU_uxTimerGetReloadModeImpl \n" 1571 " MPU_uxTimerGetReloadMode_Unpriv: \n" 1572 " svc %0 \n" 1573 " \n" 1574 : : "i" ( SYSTEM_CALL_uxTimerGetReloadMode ) : "memory" 1575 ); 1576 } 1577 1578 #endif /* if ( configUSE_TIMERS == 1 ) */ 1579 /*-----------------------------------------------------------*/ 1580 1581 #if ( configUSE_TIMERS == 1 ) 1582 1583 TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1584 MPU_xTimerGetPeriod(TimerHandle_t xTimer)1585 TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1586 { 1587 __asm volatile 1588 ( 1589 " .syntax unified \n" 1590 " .extern MPU_xTimerGetPeriodImpl \n" 1591 " \n" 1592 " push {r0} \n" 1593 " mrs r0, control \n" 1594 " tst r0, #1 \n" 1595 " pop {r0} \n" 1596 " bne MPU_xTimerGetPeriod_Unpriv \n" 1597 " MPU_xTimerGetPeriod_Priv: \n" 1598 " b MPU_xTimerGetPeriodImpl \n" 1599 " MPU_xTimerGetPeriod_Unpriv: \n" 1600 " svc %0 \n" 1601 " \n" 1602 : : "i" ( SYSTEM_CALL_xTimerGetPeriod ) : "memory" 1603 ); 1604 } 1605 1606 #endif /* if ( configUSE_TIMERS == 1 ) */ 1607 /*-----------------------------------------------------------*/ 1608 1609 #if ( configUSE_TIMERS == 1 ) 1610 1611 TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1612 MPU_xTimerGetExpiryTime(TimerHandle_t xTimer)1613 TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1614 { 1615 __asm volatile 1616 ( 1617 " .syntax unified \n" 1618 " .extern MPU_xTimerGetExpiryTimeImpl \n" 1619 " \n" 1620 " push {r0} \n" 1621 " mrs r0, control \n" 1622 " tst r0, #1 \n" 1623 " pop {r0} \n" 1624 " bne MPU_xTimerGetExpiryTime_Unpriv \n" 1625 " MPU_xTimerGetExpiryTime_Priv: \n" 1626 " b MPU_xTimerGetExpiryTimeImpl \n" 1627 " MPU_xTimerGetExpiryTime_Unpriv: \n" 1628 " svc %0 \n" 1629 " \n" 1630 : : "i" ( SYSTEM_CALL_xTimerGetExpiryTime ) : "memory" 1631 ); 1632 } 1633 1634 #endif /* if ( configUSE_TIMERS == 1 ) */ 1635 /*-----------------------------------------------------------*/ 1636 1637 #if ( configUSE_EVENT_GROUPS == 1 ) 1638 1639 EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1640 MPU_xEventGroupWaitBitsEntry(const xEventGroupWaitBitsParams_t * pxParams)1641 EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1642 { 1643 __asm volatile 1644 ( 1645 " .syntax unified \n" 1646 " .extern MPU_xEventGroupWaitBitsImpl \n" 1647 " \n" 1648 " push {r0} \n" 1649 " mrs r0, control \n" 1650 " tst r0, #1 \n" 1651 " bne MPU_xEventGroupWaitBits_Unpriv \n" 1652 " MPU_xEventGroupWaitBits_Priv: \n" 1653 " pop {r0} \n" 1654 " b MPU_xEventGroupWaitBitsImpl \n" 1655 " MPU_xEventGroupWaitBits_Unpriv: \n" 1656 " pop {r0} \n" 1657 " svc %0 \n" 1658 " \n" 1659 : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory" 1660 ); 1661 } 1662 1663 #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */ 1664 /*-----------------------------------------------------------*/ 1665 1666 #if ( configUSE_EVENT_GROUPS == 1 ) 1667 1668 EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, 1669 const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1670 MPU_xEventGroupClearBits(EventGroupHandle_t xEventGroup,const EventBits_t uxBitsToClear)1671 EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, 1672 const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1673 { 1674 __asm volatile 1675 ( 1676 " .syntax unified \n" 1677 " .extern MPU_xEventGroupClearBitsImpl \n" 1678 " \n" 1679 " push {r0} \n" 1680 " mrs r0, control \n" 1681 " tst r0, #1 \n" 1682 " bne MPU_xEventGroupClearBits_Unpriv \n" 1683 " MPU_xEventGroupClearBits_Priv: \n" 1684 " pop {r0} \n" 1685 " b MPU_xEventGroupClearBitsImpl \n" 1686 " MPU_xEventGroupClearBits_Unpriv: \n" 1687 " pop {r0} \n" 1688 " svc %0 \n" 1689 " \n" 1690 : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory" 1691 ); 1692 } 1693 1694 #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */ 1695 /*-----------------------------------------------------------*/ 1696 1697 #if ( configUSE_EVENT_GROUPS == 1 ) 1698 1699 EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, 1700 const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1701 MPU_xEventGroupSetBits(EventGroupHandle_t xEventGroup,const EventBits_t uxBitsToSet)1702 EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, 1703 const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1704 { 1705 __asm volatile 1706 ( 1707 " .syntax unified \n" 1708 " .extern MPU_xEventGroupSetBitsImpl \n" 1709 " \n" 1710 " push {r0} \n" 1711 " mrs r0, control \n" 1712 " tst r0, #1 \n" 1713 " bne MPU_xEventGroupSetBits_Unpriv \n" 1714 " MPU_xEventGroupSetBits_Priv: \n" 1715 " pop {r0} \n" 1716 " b MPU_xEventGroupSetBitsImpl \n" 1717 " MPU_xEventGroupSetBits_Unpriv: \n" 1718 " pop {r0} \n" 1719 " svc %0 \n" 1720 " \n" 1721 : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory" 1722 ); 1723 } 1724 1725 #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */ 1726 /*-----------------------------------------------------------*/ 1727 1728 #if ( configUSE_EVENT_GROUPS == 1 ) 1729 1730 EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, 1731 const EventBits_t uxBitsToSet, 1732 const EventBits_t uxBitsToWaitFor, 1733 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1734 MPU_xEventGroupSync(EventGroupHandle_t xEventGroup,const EventBits_t uxBitsToSet,const EventBits_t uxBitsToWaitFor,TickType_t xTicksToWait)1735 EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, 1736 const EventBits_t uxBitsToSet, 1737 const EventBits_t uxBitsToWaitFor, 1738 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1739 { 1740 __asm volatile 1741 ( 1742 " .syntax unified \n" 1743 " .extern MPU_xEventGroupSyncImpl \n" 1744 " \n" 1745 " push {r0} \n" 1746 " mrs r0, control \n" 1747 " tst r0, #1 \n" 1748 " bne MPU_xEventGroupSync_Unpriv \n" 1749 " MPU_xEventGroupSync_Priv: \n" 1750 " pop {r0} \n" 1751 " b MPU_xEventGroupSyncImpl \n" 1752 " MPU_xEventGroupSync_Unpriv: \n" 1753 " pop {r0} \n" 1754 " svc %0 \n" 1755 " \n" 1756 : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory" 1757 ); 1758 } 1759 1760 #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */ 1761 /*-----------------------------------------------------------*/ 1762 1763 #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) 1764 1765 UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1766 MPU_uxEventGroupGetNumber(void * xEventGroup)1767 UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1768 { 1769 __asm volatile 1770 ( 1771 " .syntax unified \n" 1772 " .extern MPU_uxEventGroupGetNumberImpl \n" 1773 " \n" 1774 " push {r0} \n" 1775 " mrs r0, control \n" 1776 " tst r0, #1 \n" 1777 " pop {r0} \n" 1778 " bne MPU_uxEventGroupGetNumber_Unpriv \n" 1779 " MPU_uxEventGroupGetNumber_Priv: \n" 1780 " b MPU_uxEventGroupGetNumberImpl \n" 1781 " MPU_uxEventGroupGetNumber_Unpriv: \n" 1782 " svc %0 \n" 1783 " \n" 1784 : : "i" ( SYSTEM_CALL_uxEventGroupGetNumber ) : "memory" 1785 ); 1786 } 1787 1788 #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */ 1789 /*-----------------------------------------------------------*/ 1790 1791 #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) 1792 1793 void MPU_vEventGroupSetNumber( void * xEventGroup, 1794 UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1795 MPU_vEventGroupSetNumber(void * xEventGroup,UBaseType_t uxEventGroupNumber)1796 void MPU_vEventGroupSetNumber( void * xEventGroup, 1797 UBaseType_t uxEventGroupNumber ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1798 { 1799 __asm volatile 1800 ( 1801 " .syntax unified \n" 1802 " .extern MPU_vEventGroupSetNumberImpl \n" 1803 " \n" 1804 " push {r0} \n" 1805 " mrs r0, control \n" 1806 " tst r0, #1 \n" 1807 " pop {r0} \n" 1808 " bne MPU_vEventGroupSetNumber_Unpriv \n" 1809 " MPU_vEventGroupSetNumber_Priv: \n" 1810 " b MPU_vEventGroupSetNumberImpl \n" 1811 " MPU_vEventGroupSetNumber_Unpriv: \n" 1812 " svc %0 \n" 1813 " \n" 1814 : : "i" ( SYSTEM_CALL_vEventGroupSetNumber ) : "memory" 1815 ); 1816 } 1817 1818 #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */ 1819 /*-----------------------------------------------------------*/ 1820 1821 #if ( configUSE_STREAM_BUFFERS == 1 ) 1822 1823 size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, 1824 const void * pvTxData, 1825 size_t xDataLengthBytes, 1826 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1827 MPU_xStreamBufferSend(StreamBufferHandle_t xStreamBuffer,const void * pvTxData,size_t xDataLengthBytes,TickType_t xTicksToWait)1828 size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, 1829 const void * pvTxData, 1830 size_t xDataLengthBytes, 1831 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1832 { 1833 __asm volatile 1834 ( 1835 " .syntax unified \n" 1836 " .extern MPU_xStreamBufferSendImpl \n" 1837 " \n" 1838 " push {r0} \n" 1839 " mrs r0, control \n" 1840 " tst r0, #1 \n" 1841 " bne MPU_xStreamBufferSend_Unpriv \n" 1842 " MPU_xStreamBufferSend_Priv: \n" 1843 " pop {r0} \n" 1844 " b MPU_xStreamBufferSendImpl \n" 1845 " MPU_xStreamBufferSend_Unpriv: \n" 1846 " pop {r0} \n" 1847 " svc %0 \n" 1848 " \n" 1849 : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory" 1850 ); 1851 } 1852 1853 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 1854 /*-----------------------------------------------------------*/ 1855 1856 #if ( configUSE_STREAM_BUFFERS == 1 ) 1857 1858 size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, 1859 void * pvRxData, 1860 size_t xBufferLengthBytes, 1861 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1862 MPU_xStreamBufferReceive(StreamBufferHandle_t xStreamBuffer,void * pvRxData,size_t xBufferLengthBytes,TickType_t xTicksToWait)1863 size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, 1864 void * pvRxData, 1865 size_t xBufferLengthBytes, 1866 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1867 { 1868 __asm volatile 1869 ( 1870 " .syntax unified \n" 1871 " .extern MPU_xStreamBufferReceiveImpl \n" 1872 " \n" 1873 " push {r0} \n" 1874 " mrs r0, control \n" 1875 " tst r0, #1 \n" 1876 " bne MPU_xStreamBufferReceive_Unpriv \n" 1877 " MPU_xStreamBufferReceive_Priv: \n" 1878 " pop {r0} \n" 1879 " b MPU_xStreamBufferReceiveImpl \n" 1880 " MPU_xStreamBufferReceive_Unpriv: \n" 1881 " pop {r0} \n" 1882 " svc %0 \n" 1883 " \n" 1884 : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory" 1885 ); 1886 } 1887 1888 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 1889 /*-----------------------------------------------------------*/ 1890 1891 #if ( configUSE_STREAM_BUFFERS == 1 ) 1892 1893 BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1894 MPU_xStreamBufferIsFull(StreamBufferHandle_t xStreamBuffer)1895 BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1896 { 1897 __asm volatile 1898 ( 1899 " .syntax unified \n" 1900 " .extern MPU_xStreamBufferIsFullImpl \n" 1901 " \n" 1902 " push {r0} \n" 1903 " mrs r0, control \n" 1904 " tst r0, #1 \n" 1905 " bne MPU_xStreamBufferIsFull_Unpriv \n" 1906 " MPU_xStreamBufferIsFull_Priv: \n" 1907 " pop {r0} \n" 1908 " b MPU_xStreamBufferIsFullImpl \n" 1909 " MPU_xStreamBufferIsFull_Unpriv: \n" 1910 " pop {r0} \n" 1911 " svc %0 \n" 1912 " \n" 1913 : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory" 1914 ); 1915 } 1916 1917 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 1918 /*-----------------------------------------------------------*/ 1919 1920 #if ( configUSE_STREAM_BUFFERS == 1 ) 1921 1922 BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1923 MPU_xStreamBufferIsEmpty(StreamBufferHandle_t xStreamBuffer)1924 BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1925 { 1926 __asm volatile 1927 ( 1928 " .syntax unified \n" 1929 " .extern MPU_xStreamBufferIsEmptyImpl \n" 1930 " \n" 1931 " push {r0} \n" 1932 " mrs r0, control \n" 1933 " tst r0, #1 \n" 1934 " bne MPU_xStreamBufferIsEmpty_Unpriv \n" 1935 " MPU_xStreamBufferIsEmpty_Priv: \n" 1936 " pop {r0} \n" 1937 " b MPU_xStreamBufferIsEmptyImpl \n" 1938 " MPU_xStreamBufferIsEmpty_Unpriv: \n" 1939 " pop {r0} \n" 1940 " svc %0 \n" 1941 " \n" 1942 : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory" 1943 ); 1944 } 1945 1946 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 1947 /*-----------------------------------------------------------*/ 1948 1949 #if ( configUSE_STREAM_BUFFERS == 1 ) 1950 1951 size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1952 MPU_xStreamBufferSpacesAvailable(StreamBufferHandle_t xStreamBuffer)1953 size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1954 { 1955 __asm volatile 1956 ( 1957 " .syntax unified \n" 1958 " .extern MPU_xStreamBufferSpacesAvailableImpl \n" 1959 " \n" 1960 " push {r0} \n" 1961 " mrs r0, control \n" 1962 " tst r0, #1 \n" 1963 " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n" 1964 " MPU_xStreamBufferSpacesAvailable_Priv: \n" 1965 " pop {r0} \n" 1966 " b MPU_xStreamBufferSpacesAvailableImpl \n" 1967 " MPU_xStreamBufferSpacesAvailable_Unpriv: \n" 1968 " pop {r0} \n" 1969 " svc %0 \n" 1970 " \n" 1971 : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory" 1972 ); 1973 } 1974 1975 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 1976 /*-----------------------------------------------------------*/ 1977 1978 #if ( configUSE_STREAM_BUFFERS == 1 ) 1979 1980 size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1981 MPU_xStreamBufferBytesAvailable(StreamBufferHandle_t xStreamBuffer)1982 size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1983 { 1984 __asm volatile 1985 ( 1986 " .syntax unified \n" 1987 " .extern MPU_xStreamBufferBytesAvailableImpl \n" 1988 " \n" 1989 " push {r0} \n" 1990 " mrs r0, control \n" 1991 " tst r0, #1 \n" 1992 " bne MPU_xStreamBufferBytesAvailable_Unpriv \n" 1993 " MPU_xStreamBufferBytesAvailable_Priv: \n" 1994 " pop {r0} \n" 1995 " b MPU_xStreamBufferBytesAvailableImpl \n" 1996 " MPU_xStreamBufferBytesAvailable_Unpriv: \n" 1997 " pop {r0} \n" 1998 " svc %0 \n" 1999 " \n" 2000 : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory" 2001 ); 2002 } 2003 2004 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 2005 /*-----------------------------------------------------------*/ 2006 2007 #if ( configUSE_STREAM_BUFFERS == 1 ) 2008 2009 BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, 2010 size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 2011 MPU_xStreamBufferSetTriggerLevel(StreamBufferHandle_t xStreamBuffer,size_t xTriggerLevel)2012 BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, 2013 size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 2014 { 2015 __asm volatile 2016 ( 2017 " .syntax unified \n" 2018 " .extern MPU_xStreamBufferSetTriggerLevelImpl \n" 2019 " \n" 2020 " push {r0} \n" 2021 " mrs r0, control \n" 2022 " tst r0, #1 \n" 2023 " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n" 2024 " MPU_xStreamBufferSetTriggerLevel_Priv: \n" 2025 " pop {r0} \n" 2026 " b MPU_xStreamBufferSetTriggerLevelImpl \n" 2027 " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n" 2028 " pop {r0} \n" 2029 " svc %0 \n" 2030 " \n" 2031 : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory" 2032 ); 2033 } 2034 2035 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 2036 /*-----------------------------------------------------------*/ 2037 2038 #if ( configUSE_STREAM_BUFFERS == 1 ) 2039 2040 size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 2041 MPU_xStreamBufferNextMessageLengthBytes(StreamBufferHandle_t xStreamBuffer)2042 size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 2043 { 2044 __asm volatile 2045 ( 2046 " .syntax unified \n" 2047 " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n" 2048 " \n" 2049 " push {r0} \n" 2050 " mrs r0, control \n" 2051 " tst r0, #1 \n" 2052 " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n" 2053 " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n" 2054 " pop {r0} \n" 2055 " b MPU_xStreamBufferNextMessageLengthBytesImpl \n" 2056 " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n" 2057 " pop {r0} \n" 2058 " svc %0 \n" 2059 " \n" 2060 : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory" 2061 ); 2062 } 2063 2064 #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */ 2065 /*-----------------------------------------------------------*/ 2066 2067 #endif /* configUSE_MPU_WRAPPERS_V1 == 0 */ 2068