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 ( ( configENABLE_MPU == 1 ) && ( 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 " \n" 1539 : : "i" ( SYSTEM_CALL_xTimerGenericCommand ) : "memory" 1540 ); 1541 } 1542 1543 #endif /* if ( configUSE_TIMERS == 1 ) */ 1544 /*-----------------------------------------------------------*/ 1545 1546 #if ( configUSE_TIMERS == 1 ) 1547 1548 const char * MPU_pcTimerGetName( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1549 MPU_pcTimerGetName(TimerHandle_t xTimer)1550 const char * MPU_pcTimerGetName( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1551 { 1552 __asm volatile 1553 ( 1554 " .syntax unified \n" 1555 " .extern MPU_pcTimerGetNameImpl \n" 1556 " \n" 1557 " push {r0} \n" 1558 " mrs r0, control \n" 1559 " tst r0, #1 \n" 1560 " bne MPU_pcTimerGetName_Unpriv \n" 1561 " MPU_pcTimerGetName_Priv: \n" 1562 " pop {r0} \n" 1563 " b MPU_pcTimerGetNameImpl \n" 1564 " MPU_pcTimerGetName_Unpriv: \n" 1565 " pop {r0} \n" 1566 " svc %0 \n" 1567 " \n" 1568 : : "i" ( SYSTEM_CALL_pcTimerGetName ) : "memory" 1569 ); 1570 } 1571 1572 #endif /* if ( configUSE_TIMERS == 1 ) */ 1573 /*-----------------------------------------------------------*/ 1574 1575 #if ( configUSE_TIMERS == 1 ) 1576 1577 void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, 1578 const BaseType_t uxAutoReload ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1579 MPU_vTimerSetReloadMode(TimerHandle_t xTimer,const BaseType_t uxAutoReload)1580 void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, 1581 const BaseType_t uxAutoReload ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1582 { 1583 __asm volatile 1584 ( 1585 " .syntax unified \n" 1586 " .extern MPU_vTimerSetReloadModeImpl \n" 1587 " \n" 1588 " push {r0} \n" 1589 " mrs r0, control \n" 1590 " tst r0, #1 \n" 1591 " bne MPU_vTimerSetReloadMode_Unpriv \n" 1592 " MPU_vTimerSetReloadMode_Priv: \n" 1593 " pop {r0} \n" 1594 " b MPU_vTimerSetReloadModeImpl \n" 1595 " MPU_vTimerSetReloadMode_Unpriv: \n" 1596 " pop {r0} \n" 1597 " svc %0 \n" 1598 " \n" 1599 : : "i" ( SYSTEM_CALL_vTimerSetReloadMode ) : "memory" 1600 ); 1601 } 1602 1603 #endif /* if ( configUSE_TIMERS == 1 ) */ 1604 /*-----------------------------------------------------------*/ 1605 1606 #if ( configUSE_TIMERS == 1 ) 1607 1608 BaseType_t MPU_xTimerGetReloadMode( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1609 MPU_xTimerGetReloadMode(TimerHandle_t xTimer)1610 BaseType_t MPU_xTimerGetReloadMode( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1611 { 1612 __asm volatile 1613 ( 1614 " .syntax unified \n" 1615 " .extern MPU_xTimerGetReloadModeImpl \n" 1616 " \n" 1617 " push {r0} \n" 1618 " mrs r0, control \n" 1619 " tst r0, #1 \n" 1620 " bne MPU_xTimerGetReloadMode_Unpriv \n" 1621 " MPU_xTimerGetReloadMode_Priv: \n" 1622 " pop {r0} \n" 1623 " b MPU_xTimerGetReloadModeImpl \n" 1624 " MPU_xTimerGetReloadMode_Unpriv: \n" 1625 " pop {r0} \n" 1626 " svc %0 \n" 1627 " \n" 1628 : : "i" ( SYSTEM_CALL_xTimerGetReloadMode ) : "memory" 1629 ); 1630 } 1631 1632 #endif /* if ( configUSE_TIMERS == 1 ) */ 1633 /*-----------------------------------------------------------*/ 1634 1635 #if ( configUSE_TIMERS == 1 ) 1636 1637 UBaseType_t MPU_uxTimerGetReloadMode( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1638 MPU_uxTimerGetReloadMode(TimerHandle_t xTimer)1639 UBaseType_t MPU_uxTimerGetReloadMode( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1640 { 1641 __asm volatile 1642 ( 1643 " .syntax unified \n" 1644 " .extern MPU_uxTimerGetReloadModeImpl \n" 1645 " \n" 1646 " push {r0} \n" 1647 " mrs r0, control \n" 1648 " tst r0, #1 \n" 1649 " bne MPU_uxTimerGetReloadMode_Unpriv \n" 1650 " MPU_uxTimerGetReloadMode_Priv: \n" 1651 " pop {r0} \n" 1652 " b MPU_uxTimerGetReloadModeImpl \n" 1653 " MPU_uxTimerGetReloadMode_Unpriv: \n" 1654 " pop {r0} \n" 1655 " svc %0 \n" 1656 " \n" 1657 : : "i" ( SYSTEM_CALL_uxTimerGetReloadMode ) : "memory" 1658 ); 1659 } 1660 1661 #endif /* if ( configUSE_TIMERS == 1 ) */ 1662 /*-----------------------------------------------------------*/ 1663 1664 #if ( configUSE_TIMERS == 1 ) 1665 1666 TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1667 MPU_xTimerGetPeriod(TimerHandle_t xTimer)1668 TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1669 { 1670 __asm volatile 1671 ( 1672 " .syntax unified \n" 1673 " .extern MPU_xTimerGetPeriodImpl \n" 1674 " \n" 1675 " push {r0} \n" 1676 " mrs r0, control \n" 1677 " tst r0, #1 \n" 1678 " bne MPU_xTimerGetPeriod_Unpriv \n" 1679 " MPU_xTimerGetPeriod_Priv: \n" 1680 " pop {r0} \n" 1681 " b MPU_xTimerGetPeriodImpl \n" 1682 " MPU_xTimerGetPeriod_Unpriv: \n" 1683 " pop {r0} \n" 1684 " svc %0 \n" 1685 " \n" 1686 : : "i" ( SYSTEM_CALL_xTimerGetPeriod ) : "memory" 1687 ); 1688 } 1689 1690 #endif /* if ( configUSE_TIMERS == 1 ) */ 1691 /*-----------------------------------------------------------*/ 1692 1693 #if ( configUSE_TIMERS == 1 ) 1694 1695 TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1696 MPU_xTimerGetExpiryTime(TimerHandle_t xTimer)1697 TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1698 { 1699 __asm volatile 1700 ( 1701 " .syntax unified \n" 1702 " .extern MPU_xTimerGetExpiryTimeImpl \n" 1703 " \n" 1704 " push {r0} \n" 1705 " mrs r0, control \n" 1706 " tst r0, #1 \n" 1707 " bne MPU_xTimerGetExpiryTime_Unpriv \n" 1708 " MPU_xTimerGetExpiryTime_Priv: \n" 1709 " pop {r0} \n" 1710 " b MPU_xTimerGetExpiryTimeImpl \n" 1711 " MPU_xTimerGetExpiryTime_Unpriv: \n" 1712 " pop {r0} \n" 1713 " svc %0 \n" 1714 " \n" 1715 : : "i" ( SYSTEM_CALL_xTimerGetExpiryTime ) : "memory" 1716 ); 1717 } 1718 1719 #endif /* if ( configUSE_TIMERS == 1 ) */ 1720 /*-----------------------------------------------------------*/ 1721 1722 EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1723 MPU_xEventGroupWaitBitsEntry(const xEventGroupWaitBitsParams_t * pxParams)1724 EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1725 { 1726 __asm volatile 1727 ( 1728 " .syntax unified \n" 1729 " .extern MPU_xEventGroupWaitBitsImpl \n" 1730 " \n" 1731 " push {r0} \n" 1732 " mrs r0, control \n" 1733 " tst r0, #1 \n" 1734 " bne MPU_xEventGroupWaitBits_Unpriv \n" 1735 " MPU_xEventGroupWaitBits_Priv: \n" 1736 " pop {r0} \n" 1737 " b MPU_xEventGroupWaitBitsImpl \n" 1738 " MPU_xEventGroupWaitBits_Unpriv: \n" 1739 " pop {r0} \n" 1740 " svc %0 \n" 1741 " \n" 1742 : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory" 1743 ); 1744 } 1745 /*-----------------------------------------------------------*/ 1746 1747 EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, 1748 const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1749 MPU_xEventGroupClearBits(EventGroupHandle_t xEventGroup,const EventBits_t uxBitsToClear)1750 EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, 1751 const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1752 { 1753 __asm volatile 1754 ( 1755 " .syntax unified \n" 1756 " .extern MPU_xEventGroupClearBitsImpl \n" 1757 " \n" 1758 " push {r0} \n" 1759 " mrs r0, control \n" 1760 " tst r0, #1 \n" 1761 " bne MPU_xEventGroupClearBits_Unpriv \n" 1762 " MPU_xEventGroupClearBits_Priv: \n" 1763 " pop {r0} \n" 1764 " b MPU_xEventGroupClearBitsImpl \n" 1765 " MPU_xEventGroupClearBits_Unpriv: \n" 1766 " pop {r0} \n" 1767 " svc %0 \n" 1768 " \n" 1769 : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory" 1770 ); 1771 } 1772 /*-----------------------------------------------------------*/ 1773 1774 EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, 1775 const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1776 MPU_xEventGroupSetBits(EventGroupHandle_t xEventGroup,const EventBits_t uxBitsToSet)1777 EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, 1778 const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1779 { 1780 __asm volatile 1781 ( 1782 " .syntax unified \n" 1783 " .extern MPU_xEventGroupSetBitsImpl \n" 1784 " \n" 1785 " push {r0} \n" 1786 " mrs r0, control \n" 1787 " tst r0, #1 \n" 1788 " bne MPU_xEventGroupSetBits_Unpriv \n" 1789 " MPU_xEventGroupSetBits_Priv: \n" 1790 " pop {r0} \n" 1791 " b MPU_xEventGroupSetBitsImpl \n" 1792 " MPU_xEventGroupSetBits_Unpriv: \n" 1793 " pop {r0} \n" 1794 " svc %0 \n" 1795 " \n" 1796 : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory" 1797 ); 1798 } 1799 /*-----------------------------------------------------------*/ 1800 1801 EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, 1802 const EventBits_t uxBitsToSet, 1803 const EventBits_t uxBitsToWaitFor, 1804 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1805 MPU_xEventGroupSync(EventGroupHandle_t xEventGroup,const EventBits_t uxBitsToSet,const EventBits_t uxBitsToWaitFor,TickType_t xTicksToWait)1806 EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, 1807 const EventBits_t uxBitsToSet, 1808 const EventBits_t uxBitsToWaitFor, 1809 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1810 { 1811 __asm volatile 1812 ( 1813 " .syntax unified \n" 1814 " .extern MPU_xEventGroupSyncImpl \n" 1815 " \n" 1816 " push {r0} \n" 1817 " mrs r0, control \n" 1818 " tst r0, #1 \n" 1819 " bne MPU_xEventGroupSync_Unpriv \n" 1820 " MPU_xEventGroupSync_Priv: \n" 1821 " pop {r0} \n" 1822 " b MPU_xEventGroupSyncImpl \n" 1823 " MPU_xEventGroupSync_Unpriv: \n" 1824 " pop {r0} \n" 1825 " svc %0 \n" 1826 " \n" 1827 : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory" 1828 ); 1829 } 1830 /*-----------------------------------------------------------*/ 1831 1832 #if ( configUSE_TRACE_FACILITY == 1 ) 1833 1834 UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1835 MPU_uxEventGroupGetNumber(void * xEventGroup)1836 UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1837 { 1838 __asm volatile 1839 ( 1840 " .syntax unified \n" 1841 " .extern MPU_uxEventGroupGetNumberImpl \n" 1842 " \n" 1843 " push {r0} \n" 1844 " mrs r0, control \n" 1845 " tst r0, #1 \n" 1846 " bne MPU_uxEventGroupGetNumber_Unpriv \n" 1847 " MPU_uxEventGroupGetNumber_Priv: \n" 1848 " pop {r0} \n" 1849 " b MPU_uxEventGroupGetNumberImpl \n" 1850 " MPU_uxEventGroupGetNumber_Unpriv: \n" 1851 " pop {r0} \n" 1852 " svc %0 \n" 1853 " \n" 1854 : : "i" ( SYSTEM_CALL_uxEventGroupGetNumber ) : "memory" 1855 ); 1856 } 1857 1858 #endif /*( configUSE_TRACE_FACILITY == 1 )*/ 1859 /*-----------------------------------------------------------*/ 1860 1861 #if ( configUSE_TRACE_FACILITY == 1 ) 1862 1863 void MPU_vEventGroupSetNumber( void * xEventGroup, 1864 UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1865 MPU_vEventGroupSetNumber(void * xEventGroup,UBaseType_t uxEventGroupNumber)1866 void MPU_vEventGroupSetNumber( void * xEventGroup, 1867 UBaseType_t uxEventGroupNumber ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1868 { 1869 __asm volatile 1870 ( 1871 " .syntax unified \n" 1872 " .extern MPU_vEventGroupSetNumberImpl \n" 1873 " \n" 1874 " push {r0} \n" 1875 " mrs r0, control \n" 1876 " tst r0, #1 \n" 1877 " bne MPU_vEventGroupSetNumber_Unpriv \n" 1878 " MPU_vEventGroupSetNumber_Priv: \n" 1879 " pop {r0} \n" 1880 " b MPU_vEventGroupSetNumberImpl \n" 1881 " MPU_vEventGroupSetNumber_Unpriv: \n" 1882 " pop {r0} \n" 1883 " svc %0 \n" 1884 " \n" 1885 : : "i" ( SYSTEM_CALL_vEventGroupSetNumber ) : "memory" 1886 ); 1887 } 1888 1889 #endif /*( configUSE_TRACE_FACILITY == 1 )*/ 1890 /*-----------------------------------------------------------*/ 1891 1892 size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, 1893 const void * pvTxData, 1894 size_t xDataLengthBytes, 1895 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1896 MPU_xStreamBufferSend(StreamBufferHandle_t xStreamBuffer,const void * pvTxData,size_t xDataLengthBytes,TickType_t xTicksToWait)1897 size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, 1898 const void * pvTxData, 1899 size_t xDataLengthBytes, 1900 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1901 { 1902 __asm volatile 1903 ( 1904 " .syntax unified \n" 1905 " .extern MPU_xStreamBufferSendImpl \n" 1906 " \n" 1907 " push {r0} \n" 1908 " mrs r0, control \n" 1909 " tst r0, #1 \n" 1910 " bne MPU_xStreamBufferSend_Unpriv \n" 1911 " MPU_xStreamBufferSend_Priv: \n" 1912 " pop {r0} \n" 1913 " b MPU_xStreamBufferSendImpl \n" 1914 " MPU_xStreamBufferSend_Unpriv: \n" 1915 " pop {r0} \n" 1916 " svc %0 \n" 1917 " \n" 1918 : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory" 1919 ); 1920 } 1921 /*-----------------------------------------------------------*/ 1922 1923 size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, 1924 void * pvRxData, 1925 size_t xBufferLengthBytes, 1926 TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1927 MPU_xStreamBufferReceive(StreamBufferHandle_t xStreamBuffer,void * pvRxData,size_t xBufferLengthBytes,TickType_t xTicksToWait)1928 size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, 1929 void * pvRxData, 1930 size_t xBufferLengthBytes, 1931 TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1932 { 1933 __asm volatile 1934 ( 1935 " .syntax unified \n" 1936 " .extern MPU_xStreamBufferReceiveImpl \n" 1937 " \n" 1938 " push {r0} \n" 1939 " mrs r0, control \n" 1940 " tst r0, #1 \n" 1941 " bne MPU_xStreamBufferReceive_Unpriv \n" 1942 " MPU_xStreamBufferReceive_Priv: \n" 1943 " pop {r0} \n" 1944 " b MPU_xStreamBufferReceiveImpl \n" 1945 " MPU_xStreamBufferReceive_Unpriv: \n" 1946 " pop {r0} \n" 1947 " svc %0 \n" 1948 " \n" 1949 : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory" 1950 ); 1951 } 1952 /*-----------------------------------------------------------*/ 1953 1954 BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1955 MPU_xStreamBufferIsFull(StreamBufferHandle_t xStreamBuffer)1956 BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1957 { 1958 __asm volatile 1959 ( 1960 " .syntax unified \n" 1961 " .extern MPU_xStreamBufferIsFullImpl \n" 1962 " \n" 1963 " push {r0} \n" 1964 " mrs r0, control \n" 1965 " tst r0, #1 \n" 1966 " bne MPU_xStreamBufferIsFull_Unpriv \n" 1967 " MPU_xStreamBufferIsFull_Priv: \n" 1968 " pop {r0} \n" 1969 " b MPU_xStreamBufferIsFullImpl \n" 1970 " MPU_xStreamBufferIsFull_Unpriv: \n" 1971 " pop {r0} \n" 1972 " svc %0 \n" 1973 " \n" 1974 : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory" 1975 ); 1976 } 1977 /*-----------------------------------------------------------*/ 1978 1979 BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 1980 MPU_xStreamBufferIsEmpty(StreamBufferHandle_t xStreamBuffer)1981 BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 1982 { 1983 __asm volatile 1984 ( 1985 " .syntax unified \n" 1986 " .extern MPU_xStreamBufferIsEmptyImpl \n" 1987 " \n" 1988 " push {r0} \n" 1989 " mrs r0, control \n" 1990 " tst r0, #1 \n" 1991 " bne MPU_xStreamBufferIsEmpty_Unpriv \n" 1992 " MPU_xStreamBufferIsEmpty_Priv: \n" 1993 " pop {r0} \n" 1994 " b MPU_xStreamBufferIsEmptyImpl \n" 1995 " MPU_xStreamBufferIsEmpty_Unpriv: \n" 1996 " pop {r0} \n" 1997 " svc %0 \n" 1998 " \n" 1999 : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory" 2000 ); 2001 } 2002 /*-----------------------------------------------------------*/ 2003 2004 size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 2005 MPU_xStreamBufferSpacesAvailable(StreamBufferHandle_t xStreamBuffer)2006 size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 2007 { 2008 __asm volatile 2009 ( 2010 " .syntax unified \n" 2011 " .extern MPU_xStreamBufferSpacesAvailableImpl \n" 2012 " \n" 2013 " push {r0} \n" 2014 " mrs r0, control \n" 2015 " tst r0, #1 \n" 2016 " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n" 2017 " MPU_xStreamBufferSpacesAvailable_Priv: \n" 2018 " pop {r0} \n" 2019 " b MPU_xStreamBufferSpacesAvailableImpl \n" 2020 " MPU_xStreamBufferSpacesAvailable_Unpriv: \n" 2021 " pop {r0} \n" 2022 " svc %0 \n" 2023 " \n" 2024 : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory" 2025 ); 2026 } 2027 /*-----------------------------------------------------------*/ 2028 2029 size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 2030 MPU_xStreamBufferBytesAvailable(StreamBufferHandle_t xStreamBuffer)2031 size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 2032 { 2033 __asm volatile 2034 ( 2035 " .syntax unified \n" 2036 " .extern MPU_xStreamBufferBytesAvailableImpl \n" 2037 " \n" 2038 " push {r0} \n" 2039 " mrs r0, control \n" 2040 " tst r0, #1 \n" 2041 " bne MPU_xStreamBufferBytesAvailable_Unpriv \n" 2042 " MPU_xStreamBufferBytesAvailable_Priv: \n" 2043 " pop {r0} \n" 2044 " b MPU_xStreamBufferBytesAvailableImpl \n" 2045 " MPU_xStreamBufferBytesAvailable_Unpriv: \n" 2046 " pop {r0} \n" 2047 " svc %0 \n" 2048 " \n" 2049 : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory" 2050 ); 2051 } 2052 /*-----------------------------------------------------------*/ 2053 2054 BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, 2055 size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 2056 MPU_xStreamBufferSetTriggerLevel(StreamBufferHandle_t xStreamBuffer,size_t xTriggerLevel)2057 BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, 2058 size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 2059 { 2060 __asm volatile 2061 ( 2062 " .syntax unified \n" 2063 " .extern MPU_xStreamBufferSetTriggerLevelImpl \n" 2064 " \n" 2065 " push {r0} \n" 2066 " mrs r0, control \n" 2067 " tst r0, #1 \n" 2068 " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n" 2069 " MPU_xStreamBufferSetTriggerLevel_Priv: \n" 2070 " pop {r0} \n" 2071 " b MPU_xStreamBufferSetTriggerLevelImpl \n" 2072 " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n" 2073 " pop {r0} \n" 2074 " svc %0 \n" 2075 " \n" 2076 : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory" 2077 ); 2078 } 2079 /*-----------------------------------------------------------*/ 2080 2081 size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL; 2082 MPU_xStreamBufferNextMessageLengthBytes(StreamBufferHandle_t xStreamBuffer)2083 size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */ 2084 { 2085 __asm volatile 2086 ( 2087 " .syntax unified \n" 2088 " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n" 2089 " \n" 2090 " push {r0} \n" 2091 " mrs r0, control \n" 2092 " tst r0, #1 \n" 2093 " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n" 2094 " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n" 2095 " pop {r0} \n" 2096 " b MPU_xStreamBufferNextMessageLengthBytesImpl \n" 2097 " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n" 2098 " pop {r0} \n" 2099 " svc %0 \n" 2100 " \n" 2101 : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory" 2102 ); 2103 } 2104 /*-----------------------------------------------------------*/ 2105 2106 #endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */ 2107