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