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