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