]> begriffs open source - freertos/blob - include/FreeRTOS.h
Add Trace Hook Macros and function that returns the start of the stack. (#659)
[freertos] / include / FreeRTOS.h
1 /*
2  * FreeRTOS Kernel <DEVELOPMENT BRANCH>
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 #ifndef INC_FREERTOS_H
30 #define INC_FREERTOS_H
31
32 /*
33  * Include the generic headers required for the FreeRTOS port being used.
34  */
35 #include <stddef.h>
36
37 /*
38  * If stdint.h cannot be located then:
39  *   + If using GCC ensure the -nostdint options is *not* being used.
40  *   + Ensure the project's include path includes the directory in which your
41  *     compiler stores stdint.h.
42  *   + Set any compiler options necessary for it to support C99, as technically
43  *     stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
44  *     other way).
45  *   + The FreeRTOS download includes a simple stdint.h definition that can be
46  *     used in cases where none is provided by the compiler.  The files only
47  *     contains the typedefs required to build FreeRTOS.  Read the instructions
48  *     in FreeRTOS/source/stdint.readme for more information.
49  */
50 #include <stdint.h> /* READ COMMENT ABOVE. */
51
52 /* *INDENT-OFF* */
53 #ifdef __cplusplus
54     extern "C" {
55 #endif
56 /* *INDENT-ON* */
57
58 /* Acceptable values for configTICK_TYPE_WIDTH_IN_BITS. */
59 #define TICK_TYPE_WIDTH_16_BITS    0
60 #define TICK_TYPE_WIDTH_32_BITS    1
61 #define TICK_TYPE_WIDTH_64_BITS    2
62
63 /* Application specific configuration options. */
64 #include "FreeRTOSConfig.h"
65
66 #if !defined( configUSE_16_BIT_TICKS ) && !defined( configTICK_TYPE_WIDTH_IN_BITS )
67     #error Missing definition:  One of configUSE_16_BIT_TICKS and configTICK_TYPE_WIDTH_IN_BITS must be defined in FreeRTOSConfig.h.  See the Configuration section of the FreeRTOS API documentation for details.
68 #endif
69
70 #if defined( configUSE_16_BIT_TICKS ) && defined( configTICK_TYPE_WIDTH_IN_BITS )
71     #error Only one of configUSE_16_BIT_TICKS and configTICK_TYPE_WIDTH_IN_BITS must be defined in FreeRTOSConfig.h.  See the Configuration section of the FreeRTOS API documentation for details.
72 #endif
73
74 /* Define configTICK_TYPE_WIDTH_IN_BITS according to the
75  * value of configUSE_16_BIT_TICKS for backward compatibility. */
76 #ifndef configTICK_TYPE_WIDTH_IN_BITS
77     #if ( configUSE_16_BIT_TICKS == 1 )
78         #define configTICK_TYPE_WIDTH_IN_BITS    TICK_TYPE_WIDTH_16_BITS
79     #else
80         #define configTICK_TYPE_WIDTH_IN_BITS    TICK_TYPE_WIDTH_32_BITS
81     #endif
82 #endif
83
84 /* Set configUSE_MPU_WRAPPERS_V1 to 1 to use MPU wrappers v1. */
85 #ifndef configUSE_MPU_WRAPPERS_V1
86     #define configUSE_MPU_WRAPPERS_V1    0
87 #endif
88
89 /* Set default value of configNUMBER_OF_CORES to 1 to use single core FreeRTOS. */
90 #ifndef configNUMBER_OF_CORES
91     #define configNUMBER_OF_CORES    1
92 #endif
93
94 /* Basic FreeRTOS definitions. */
95 #include "projdefs.h"
96
97 /* Definitions specific to the port being used. */
98 #include "portable.h"
99
100 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */
101 #ifndef configUSE_NEWLIB_REENTRANT
102     #define configUSE_NEWLIB_REENTRANT    0
103 #endif
104
105 /* Required if struct _reent is used. */
106 #if ( configUSE_NEWLIB_REENTRANT == 1 )
107
108     #include "newlib-freertos.h"
109
110 #endif /* if ( configUSE_NEWLIB_REENTRANT == 1 ) */
111
112 /* Must be defaulted before configUSE_PICOLIBC_TLS is used below. */
113 #ifndef configUSE_PICOLIBC_TLS
114     #define configUSE_PICOLIBC_TLS    0
115 #endif
116
117 #if ( configUSE_PICOLIBC_TLS == 1 )
118
119     #include "picolibc-freertos.h"
120
121 #endif /* if ( configUSE_PICOLIBC_TLS == 1 ) */
122
123 #ifndef configUSE_C_RUNTIME_TLS_SUPPORT
124     #define configUSE_C_RUNTIME_TLS_SUPPORT    0
125 #endif
126
127 #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 )
128
129     #ifndef configTLS_BLOCK_TYPE
130         #error Missing definition:  configTLS_BLOCK_TYPE must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
131     #endif
132
133     #ifndef configINIT_TLS_BLOCK
134         #error Missing definition:  configINIT_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
135     #endif
136
137     #ifndef configSET_TLS_BLOCK
138         #error Missing definition:  configSET_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
139     #endif
140
141     #ifndef configDEINIT_TLS_BLOCK
142         #error Missing definition:  configDEINIT_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
143     #endif
144 #endif /* if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) */
145
146 /*
147  * Check all the required application specific macros have been defined.
148  * These macros are application specific and (as downloaded) are defined
149  * within FreeRTOSConfig.h.
150  */
151
152 #ifndef configMINIMAL_STACK_SIZE
153     #error Missing definition:  configMINIMAL_STACK_SIZE must be defined in FreeRTOSConfig.h.  configMINIMAL_STACK_SIZE defines the size (in words) of the stack allocated to the idle task.  Refer to the demo project provided for your port for a suitable value.
154 #endif
155
156 #ifndef configMAX_PRIORITIES
157     #error Missing definition:  configMAX_PRIORITIES must be defined in FreeRTOSConfig.h.  See the Configuration section of the FreeRTOS API documentation for details.
158 #endif
159
160 #if configMAX_PRIORITIES < 1
161     #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
162 #endif
163
164 #ifndef configUSE_PREEMPTION
165     #error Missing definition:  configUSE_PREEMPTION must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
166 #endif
167
168 #ifndef configUSE_IDLE_HOOK
169     #error Missing definition:  configUSE_IDLE_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
170 #endif
171
172 #if ( configNUMBER_OF_CORES > 1 )
173     #ifndef configUSE_MINIMAL_IDLE_HOOK
174         #error Missing definition:  configUSE_MINIMAL_IDLE_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
175     #endif
176 #endif
177
178 #ifndef configUSE_TICK_HOOK
179     #error Missing definition:  configUSE_TICK_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
180 #endif
181
182 #if ( ( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_16_BITS ) && \
183     ( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_32_BITS ) &&   \
184     ( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_64_BITS ) )
185     #error Macro configTICK_TYPE_WIDTH_IN_BITS is defined to incorrect value.  See the Configuration section of the FreeRTOS API documentation for details.
186 #endif
187
188 #ifndef configUSE_CO_ROUTINES
189     #define configUSE_CO_ROUTINES    0
190 #endif
191
192 #ifndef INCLUDE_vTaskPrioritySet
193     #define INCLUDE_vTaskPrioritySet    0
194 #endif
195
196 #ifndef INCLUDE_uxTaskPriorityGet
197     #define INCLUDE_uxTaskPriorityGet    0
198 #endif
199
200 #ifndef INCLUDE_vTaskDelete
201     #define INCLUDE_vTaskDelete    0
202 #endif
203
204 #ifndef INCLUDE_vTaskSuspend
205     #define INCLUDE_vTaskSuspend    0
206 #endif
207
208 #ifdef INCLUDE_xTaskDelayUntil
209     #ifdef INCLUDE_vTaskDelayUntil
210
211 /* INCLUDE_vTaskDelayUntil was replaced by INCLUDE_xTaskDelayUntil.  Backward
212  * compatibility is maintained if only one or the other is defined, but
213  * there is a conflict if both are defined. */
214         #error INCLUDE_vTaskDelayUntil and INCLUDE_xTaskDelayUntil are both defined.  INCLUDE_vTaskDelayUntil is no longer required and should be removed
215     #endif
216 #endif
217
218 #ifndef INCLUDE_xTaskDelayUntil
219     #ifdef INCLUDE_vTaskDelayUntil
220
221 /* If INCLUDE_vTaskDelayUntil is set but INCLUDE_xTaskDelayUntil is not then
222  * the project's FreeRTOSConfig.h probably pre-dates the introduction of
223  * xTaskDelayUntil and setting INCLUDE_xTaskDelayUntil to whatever
224  * INCLUDE_vTaskDelayUntil is set to will ensure backward compatibility.
225  */
226         #define INCLUDE_xTaskDelayUntil    INCLUDE_vTaskDelayUntil
227     #endif
228 #endif
229
230 #ifndef INCLUDE_xTaskDelayUntil
231     #define INCLUDE_xTaskDelayUntil    0
232 #endif
233
234 #ifndef INCLUDE_vTaskDelay
235     #define INCLUDE_vTaskDelay    0
236 #endif
237
238 #ifndef INCLUDE_xTaskGetIdleTaskHandle
239     #define INCLUDE_xTaskGetIdleTaskHandle    0
240 #endif
241
242 #ifndef INCLUDE_xTaskAbortDelay
243     #define INCLUDE_xTaskAbortDelay    0
244 #endif
245
246 #ifndef INCLUDE_xQueueGetMutexHolder
247     #define INCLUDE_xQueueGetMutexHolder    0
248 #endif
249
250 #ifndef INCLUDE_xSemaphoreGetMutexHolder
251     #define INCLUDE_xSemaphoreGetMutexHolder    INCLUDE_xQueueGetMutexHolder
252 #endif
253
254 #ifndef INCLUDE_xTaskGetHandle
255     #define INCLUDE_xTaskGetHandle    0
256 #endif
257
258 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
259     #define INCLUDE_uxTaskGetStackHighWaterMark    0
260 #endif
261
262 #ifndef INCLUDE_uxTaskGetStackHighWaterMark2
263     #define INCLUDE_uxTaskGetStackHighWaterMark2    0
264 #endif
265
266 #ifndef INCLUDE_eTaskGetState
267     #define INCLUDE_eTaskGetState    0
268 #endif
269
270 #ifndef INCLUDE_xTaskResumeFromISR
271     #define INCLUDE_xTaskResumeFromISR    1
272 #endif
273
274 #ifndef INCLUDE_xTimerPendFunctionCall
275     #define INCLUDE_xTimerPendFunctionCall    0
276 #endif
277
278 #ifndef INCLUDE_xTaskGetSchedulerState
279     #define INCLUDE_xTaskGetSchedulerState    0
280 #endif
281
282 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
283     #define INCLUDE_xTaskGetCurrentTaskHandle    1
284 #endif
285
286 #if configUSE_CO_ROUTINES != 0
287     #ifndef configMAX_CO_ROUTINE_PRIORITIES
288         #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
289     #endif
290 #endif
291
292 #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
293     #define configUSE_DAEMON_TASK_STARTUP_HOOK    0
294 #endif
295
296 #ifndef configUSE_APPLICATION_TASK_TAG
297     #define configUSE_APPLICATION_TASK_TAG    0
298 #endif
299
300 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
301     #define configNUM_THREAD_LOCAL_STORAGE_POINTERS    0
302 #endif
303
304 #ifndef configUSE_RECURSIVE_MUTEXES
305     #define configUSE_RECURSIVE_MUTEXES    0
306 #endif
307
308 #ifndef configUSE_MUTEXES
309     #define configUSE_MUTEXES    0
310 #endif
311
312 #ifndef configUSE_TIMERS
313     #define configUSE_TIMERS    0
314 #endif
315
316 #ifndef configUSE_COUNTING_SEMAPHORES
317     #define configUSE_COUNTING_SEMAPHORES    0
318 #endif
319
320 #ifndef configUSE_TASK_PREEMPTION_DISABLE
321     #define configUSE_TASK_PREEMPTION_DISABLE    0
322 #endif
323
324 #ifndef configUSE_ALTERNATIVE_API
325     #define configUSE_ALTERNATIVE_API    0
326 #endif
327
328 #ifndef portCRITICAL_NESTING_IN_TCB
329     #define portCRITICAL_NESTING_IN_TCB    0
330 #endif
331
332 #ifndef configMAX_TASK_NAME_LEN
333     #define configMAX_TASK_NAME_LEN    16
334 #endif
335
336 #ifndef configIDLE_SHOULD_YIELD
337     #define configIDLE_SHOULD_YIELD    1
338 #endif
339
340 #if configMAX_TASK_NAME_LEN < 1
341     #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
342 #endif
343
344 #ifndef configASSERT
345     #define configASSERT( x )
346     #define configASSERT_DEFINED    0
347 #else
348     #define configASSERT_DEFINED    1
349 #endif
350
351 /* configPRECONDITION should be defined as configASSERT.
352  * The CBMC proofs need a way to track assumptions and assertions.
353  * A configPRECONDITION statement should express an implicit invariant or
354  * assumption made.  A configASSERT statement should express an invariant that must
355  * hold explicit before calling the code. */
356 #ifndef configPRECONDITION
357     #define configPRECONDITION( X )    configASSERT( X )
358     #define configPRECONDITION_DEFINED    0
359 #else
360     #define configPRECONDITION_DEFINED    1
361 #endif
362
363 #ifndef portMEMORY_BARRIER
364     #define portMEMORY_BARRIER()
365 #endif
366
367 #ifndef portSOFTWARE_BARRIER
368     #define portSOFTWARE_BARRIER()
369 #endif
370
371 #ifndef configRUN_MULTIPLE_PRIORITIES
372     #define configRUN_MULTIPLE_PRIORITIES    0
373 #endif
374
375 #ifndef portGET_CORE_ID
376
377     #if ( configNUMBER_OF_CORES == 1 )
378         #define portGET_CORE_ID()    0
379     #else
380         #error configNUMBER_OF_CORES is set to more than 1 then portGET_CORE_ID must also be defined.
381     #endif /* configNUMBER_OF_CORES */
382
383 #endif /* portGET_CORE_ID */
384
385 #ifndef portYIELD_CORE
386
387     #if ( configNUMBER_OF_CORES == 1 )
388         #define portYIELD_CORE( x )    portYIELD()
389     #else
390         #error configNUMBER_OF_CORES is set to more than 1 then portYIELD_CORE must also be defined.
391     #endif /* configNUMBER_OF_CORES */
392
393 #endif /* portYIELD_CORE */
394
395 #ifndef portSET_INTERRUPT_MASK
396
397     #if ( configNUMBER_OF_CORES > 1 )
398         #error portSET_INTERRUPT_MASK is required in SMP
399     #endif
400
401 #endif /* portSET_INTERRUPT_MASK */
402
403 #ifndef portCLEAR_INTERRUPT_MASK
404
405     #if ( configNUMBER_OF_CORES > 1 )
406         #error portCLEAR_INTERRUPT_MASK is required in SMP
407     #endif
408
409 #endif /* portCLEAR_INTERRUPT_MASK */
410
411 #ifndef portRELEASE_TASK_LOCK
412
413     #if ( configNUMBER_OF_CORES == 1 )
414         #define portRELEASE_TASK_LOCK()
415     #else
416         #error portRELEASE_TASK_LOCK is required in SMP
417     #endif
418
419 #endif /* portRELEASE_TASK_LOCK */
420
421 #ifndef portGET_TASK_LOCK
422
423     #if ( configNUMBER_OF_CORES == 1 )
424         #define portGET_TASK_LOCK()
425     #else
426         #error portGET_TASK_LOCK is required in SMP
427     #endif
428
429 #endif /* portGET_TASK_LOCK */
430
431 #ifndef portRELEASE_ISR_LOCK
432
433     #if ( configNUMBER_OF_CORES == 1 )
434         #define portRELEASE_ISR_LOCK()
435     #else
436         #error portRELEASE_ISR_LOCK is required in SMP
437     #endif
438
439 #endif /* portRELEASE_ISR_LOCK */
440
441 #ifndef portGET_ISR_LOCK
442
443     #if ( configNUMBER_OF_CORES == 1 )
444         #define portGET_ISR_LOCK()
445     #else
446         #error portGET_ISR_LOCK is required in SMP
447     #endif
448
449 #endif /* portGET_ISR_LOCK */
450
451 #ifndef portCHECK_IF_IN_ISR
452
453     #if ( configNUMBER_OF_CORES > 1 )
454         #error portCHECK_IF_IN_ISR is required in SMP
455     #endif
456
457 #endif /* portCHECK_IF_IN_ISR */
458
459 #ifndef portENTER_CRITICAL_FROM_ISR
460
461     #if ( configNUMBER_OF_CORES > 1 )
462         #error portENTER_CRITICAL_FROM_ISR is required in SMP
463     #endif
464
465 #endif
466
467 #ifndef portEXIT_CRITICAL_FROM_ISR
468
469     #if ( configNUMBER_OF_CORES > 1 )
470         #error portEXIT_CRITICAL_FROM_ISR is required in SMP
471     #endif
472
473 #endif
474
475 #ifndef configUSE_CORE_AFFINITY
476     #define configUSE_CORE_AFFINITY    0
477 #endif /* configUSE_CORE_AFFINITY */
478
479 #ifndef configUSE_MINIMAL_IDLE_HOOK
480     #define configUSE_MINIMAL_IDLE_HOOK    0
481 #endif /* configUSE_MINIMAL_IDLE_HOOK */
482
483 /* The timers module relies on xTaskGetSchedulerState(). */
484 #if configUSE_TIMERS == 1
485
486     #ifndef configTIMER_TASK_PRIORITY
487         #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
488     #endif /* configTIMER_TASK_PRIORITY */
489
490     #ifndef configTIMER_QUEUE_LENGTH
491         #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
492     #endif /* configTIMER_QUEUE_LENGTH */
493
494     #ifndef configTIMER_TASK_STACK_DEPTH
495         #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
496     #endif /* configTIMER_TASK_STACK_DEPTH */
497
498     #ifndef portTIMER_CALLBACK_ATTRIBUTE
499         #define portTIMER_CALLBACK_ATTRIBUTE
500     #endif /* portTIMER_CALLBACK_ATTRIBUTE */
501
502 #endif /* configUSE_TIMERS */
503
504 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
505     #define portSET_INTERRUPT_MASK_FROM_ISR()    0
506 #endif
507
508 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
509     #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue )    ( void ) ( uxSavedStatusValue )
510 #endif
511
512 #ifndef portCLEAN_UP_TCB
513     #define portCLEAN_UP_TCB( pxTCB )    ( void ) ( pxTCB )
514 #endif
515
516 #ifndef portPRE_TASK_DELETE_HOOK
517     #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
518 #endif
519
520 #ifndef portSETUP_TCB
521     #define portSETUP_TCB( pxTCB )    ( void ) ( pxTCB )
522 #endif
523
524 #ifndef configQUEUE_REGISTRY_SIZE
525     #define configQUEUE_REGISTRY_SIZE    0U
526 #endif
527
528 #if ( configQUEUE_REGISTRY_SIZE < 1 )
529     #define vQueueAddToRegistry( xQueue, pcName )
530     #define vQueueUnregisterQueue( xQueue )
531     #define pcQueueGetName( xQueue )
532 #endif
533
534 #ifndef configUSE_MINI_LIST_ITEM
535     #define configUSE_MINI_LIST_ITEM    1
536 #endif
537
538 #ifndef portPOINTER_SIZE_TYPE
539     #define portPOINTER_SIZE_TYPE    uint32_t
540 #endif
541
542 /* Remove any unused trace macros. */
543 #ifndef traceSTART
544
545 /* Used to perform any necessary initialisation - for example, open a file
546  * into which trace is to be written. */
547     #define traceSTART()
548 #endif
549
550 #ifndef traceEND
551
552 /* Use to close a trace, for example close a file into which trace has been
553  * written. */
554     #define traceEND()
555 #endif
556
557 #ifndef traceTASK_SWITCHED_IN
558
559 /* Called after a task has been selected to run.  pxCurrentTCB holds a pointer
560  * to the task control block of the selected task. */
561     #define traceTASK_SWITCHED_IN()
562 #endif
563
564 #ifndef traceINCREASE_TICK_COUNT
565
566 /* Called before stepping the tick count after waking from tickless idle
567  * sleep. */
568     #define traceINCREASE_TICK_COUNT( x )
569 #endif
570
571 #ifndef traceLOW_POWER_IDLE_BEGIN
572     /* Called immediately before entering tickless idle. */
573     #define traceLOW_POWER_IDLE_BEGIN()
574 #endif
575
576 #ifndef traceLOW_POWER_IDLE_END
577     /* Called when returning to the Idle task after a tickless idle. */
578     #define traceLOW_POWER_IDLE_END()
579 #endif
580
581 #ifndef traceTASK_SWITCHED_OUT
582
583 /* Called before a task has been selected to run.  pxCurrentTCB holds a pointer
584  * to the task control block of the task being switched out. */
585     #define traceTASK_SWITCHED_OUT()
586 #endif
587
588 #ifndef traceTASK_PRIORITY_INHERIT
589
590 /* Called when a task attempts to take a mutex that is already held by a
591  * lower priority task.  pxTCBOfMutexHolder is a pointer to the TCB of the task
592  * that holds the mutex.  uxInheritedPriority is the priority the mutex holder
593  * will inherit (the priority of the task that is attempting to obtain the
594  * muted. */
595     #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
596 #endif
597
598 #ifndef traceTASK_PRIORITY_DISINHERIT
599
600 /* Called when a task releases a mutex, the holding of which had resulted in
601  * the task inheriting the priority of a higher priority task.
602  * pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
603  * mutex.  uxOriginalPriority is the task's configured (base) priority. */
604     #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
605 #endif
606
607 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
608
609 /* Task is about to block because it cannot read from a
610  * queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore
611  * upon which the read was attempted.  pxCurrentTCB points to the TCB of the
612  * task that attempted the read. */
613     #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
614 #endif
615
616 #ifndef traceBLOCKING_ON_QUEUE_PEEK
617
618 /* Task is about to block because it cannot read from a
619  * queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore
620  * upon which the read was attempted.  pxCurrentTCB points to the TCB of the
621  * task that attempted the read. */
622     #define traceBLOCKING_ON_QUEUE_PEEK( pxQueue )
623 #endif
624
625 #ifndef traceBLOCKING_ON_QUEUE_SEND
626
627 /* Task is about to block because it cannot write to a
628  * queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore
629  * upon which the write was attempted.  pxCurrentTCB points to the TCB of the
630  * task that attempted the write. */
631     #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
632 #endif
633
634 #ifndef configCHECK_FOR_STACK_OVERFLOW
635     #define configCHECK_FOR_STACK_OVERFLOW    0
636 #endif
637
638 #ifndef configRECORD_STACK_HIGH_ADDRESS
639     #define configRECORD_STACK_HIGH_ADDRESS    0
640 #endif
641
642 #ifndef configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H
643     #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H    0
644 #endif
645
646 /* The following event macros are embedded in the kernel API calls. */
647
648 #ifndef traceMOVED_TASK_TO_READY_STATE
649     #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
650 #endif
651
652 #ifndef tracePOST_MOVED_TASK_TO_READY_STATE
653     #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
654 #endif
655
656 #ifndef traceMOVED_TASK_TO_DELAYED_LIST
657     #define traceMOVED_TASK_TO_DELAYED_LIST()
658 #endif
659
660 #ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST
661     #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST()
662 #endif
663
664 #ifndef traceQUEUE_CREATE
665     #define traceQUEUE_CREATE( pxNewQueue )
666 #endif
667
668 #ifndef traceQUEUE_CREATE_FAILED
669     #define traceQUEUE_CREATE_FAILED( ucQueueType )
670 #endif
671
672 #ifndef traceCREATE_MUTEX
673     #define traceCREATE_MUTEX( pxNewQueue )
674 #endif
675
676 #ifndef traceCREATE_MUTEX_FAILED
677     #define traceCREATE_MUTEX_FAILED()
678 #endif
679
680 #ifndef traceGIVE_MUTEX_RECURSIVE
681     #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
682 #endif
683
684 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
685     #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
686 #endif
687
688 #ifndef traceTAKE_MUTEX_RECURSIVE
689     #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
690 #endif
691
692 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
693     #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
694 #endif
695
696 #ifndef traceCREATE_COUNTING_SEMAPHORE
697     #define traceCREATE_COUNTING_SEMAPHORE()
698 #endif
699
700 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
701     #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
702 #endif
703
704 #ifndef traceQUEUE_SET_SEND
705     #define traceQUEUE_SET_SEND    traceQUEUE_SEND
706 #endif
707
708 #ifndef traceQUEUE_SEND
709     #define traceQUEUE_SEND( pxQueue )
710 #endif
711
712 #ifndef traceQUEUE_SEND_FAILED
713     #define traceQUEUE_SEND_FAILED( pxQueue )
714 #endif
715
716 #ifndef traceQUEUE_RECEIVE
717     #define traceQUEUE_RECEIVE( pxQueue )
718 #endif
719
720 #ifndef traceQUEUE_PEEK
721     #define traceQUEUE_PEEK( pxQueue )
722 #endif
723
724 #ifndef traceQUEUE_PEEK_FAILED
725     #define traceQUEUE_PEEK_FAILED( pxQueue )
726 #endif
727
728 #ifndef traceQUEUE_PEEK_FROM_ISR
729     #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
730 #endif
731
732 #ifndef traceQUEUE_RECEIVE_FAILED
733     #define traceQUEUE_RECEIVE_FAILED( pxQueue )
734 #endif
735
736 #ifndef traceQUEUE_SEND_FROM_ISR
737     #define traceQUEUE_SEND_FROM_ISR( pxQueue )
738 #endif
739
740 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
741     #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
742 #endif
743
744 #ifndef traceQUEUE_RECEIVE_FROM_ISR
745     #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
746 #endif
747
748 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
749     #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
750 #endif
751
752 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
753     #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
754 #endif
755
756 #ifndef traceQUEUE_DELETE
757     #define traceQUEUE_DELETE( pxQueue )
758 #endif
759
760 #ifndef traceTASK_CREATE
761     #define traceTASK_CREATE( pxNewTCB )
762 #endif
763
764 #ifndef traceTASK_CREATE_FAILED
765     #define traceTASK_CREATE_FAILED()
766 #endif
767
768 #ifndef traceTASK_DELETE
769     #define traceTASK_DELETE( pxTaskToDelete )
770 #endif
771
772 #ifndef traceTASK_DELAY_UNTIL
773     #define traceTASK_DELAY_UNTIL( x )
774 #endif
775
776 #ifndef traceTASK_DELAY
777     #define traceTASK_DELAY()
778 #endif
779
780 #ifndef traceTASK_PRIORITY_SET
781     #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
782 #endif
783
784 #ifndef traceTASK_SUSPEND
785     #define traceTASK_SUSPEND( pxTaskToSuspend )
786 #endif
787
788 #ifndef traceTASK_RESUME
789     #define traceTASK_RESUME( pxTaskToResume )
790 #endif
791
792 #ifndef traceTASK_RESUME_FROM_ISR
793     #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
794 #endif
795
796 #ifndef traceTASK_INCREMENT_TICK
797     #define traceTASK_INCREMENT_TICK( xTickCount )
798 #endif
799
800 #ifndef traceTIMER_CREATE
801     #define traceTIMER_CREATE( pxNewTimer )
802 #endif
803
804 #ifndef traceTIMER_CREATE_FAILED
805     #define traceTIMER_CREATE_FAILED()
806 #endif
807
808 #ifndef traceTIMER_COMMAND_SEND
809     #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
810 #endif
811
812 #ifndef traceTIMER_EXPIRED
813     #define traceTIMER_EXPIRED( pxTimer )
814 #endif
815
816 #ifndef traceTIMER_COMMAND_RECEIVED
817     #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
818 #endif
819
820 #ifndef traceMALLOC
821     #define traceMALLOC( pvAddress, uiSize )
822 #endif
823
824 #ifndef traceFREE
825     #define traceFREE( pvAddress, uiSize )
826 #endif
827
828 #ifndef traceEVENT_GROUP_CREATE
829     #define traceEVENT_GROUP_CREATE( xEventGroup )
830 #endif
831
832 #ifndef traceEVENT_GROUP_CREATE_FAILED
833     #define traceEVENT_GROUP_CREATE_FAILED()
834 #endif
835
836 #ifndef traceEVENT_GROUP_SYNC_BLOCK
837     #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
838 #endif
839
840 #ifndef traceEVENT_GROUP_SYNC_END
841     #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred )    ( void ) ( xTimeoutOccurred )
842 #endif
843
844 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
845     #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
846 #endif
847
848 #ifndef traceEVENT_GROUP_WAIT_BITS_END
849     #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred )    ( void ) ( xTimeoutOccurred )
850 #endif
851
852 #ifndef traceEVENT_GROUP_CLEAR_BITS
853     #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
854 #endif
855
856 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
857     #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
858 #endif
859
860 #ifndef traceEVENT_GROUP_SET_BITS
861     #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
862 #endif
863
864 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
865     #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
866 #endif
867
868 #ifndef traceEVENT_GROUP_DELETE
869     #define traceEVENT_GROUP_DELETE( xEventGroup )
870 #endif
871
872 #ifndef tracePEND_FUNC_CALL
873     #define tracePEND_FUNC_CALL( xFunctionToPend, pvParameter1, ulParameter2, ret )
874 #endif
875
876 #ifndef tracePEND_FUNC_CALL_FROM_ISR
877     #define tracePEND_FUNC_CALL_FROM_ISR( xFunctionToPend, pvParameter1, ulParameter2, ret )
878 #endif
879
880 #ifndef traceQUEUE_REGISTRY_ADD
881     #define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName )
882 #endif
883
884 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
885     #define traceTASK_NOTIFY_TAKE_BLOCK( uxIndexToWait )
886 #endif
887
888 #ifndef traceTASK_NOTIFY_TAKE
889     #define traceTASK_NOTIFY_TAKE( uxIndexToWait )
890 #endif
891
892 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
893     #define traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait )
894 #endif
895
896 #ifndef traceTASK_NOTIFY_WAIT
897     #define traceTASK_NOTIFY_WAIT( uxIndexToWait )
898 #endif
899
900 #ifndef traceTASK_NOTIFY
901     #define traceTASK_NOTIFY( uxIndexToNotify )
902 #endif
903
904 #ifndef traceTASK_NOTIFY_FROM_ISR
905     #define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
906 #endif
907
908 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
909     #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
910 #endif
911
912 #ifndef traceISR_EXIT_TO_SCHEDULER
913     #define traceISR_EXIT_TO_SCHEDULER()
914 #endif
915
916 #ifndef traceISR_EXIT
917     #define traceISR_EXIT()
918 #endif
919
920 #ifndef traceISR_ENTER
921     #define traceISR_ENTER()
922 #endif
923
924 #ifndef traceSTREAM_BUFFER_CREATE_FAILED
925     #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer )
926 #endif
927
928 #ifndef traceSTREAM_BUFFER_CREATE_STATIC_FAILED
929     #define traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer )
930 #endif
931
932 #ifndef traceSTREAM_BUFFER_CREATE
933     #define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer )
934 #endif
935
936 #ifndef traceSTREAM_BUFFER_DELETE
937     #define traceSTREAM_BUFFER_DELETE( xStreamBuffer )
938 #endif
939
940 #ifndef traceSTREAM_BUFFER_RESET
941     #define traceSTREAM_BUFFER_RESET( xStreamBuffer )
942 #endif
943
944 #ifndef traceBLOCKING_ON_STREAM_BUFFER_SEND
945     #define traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer )
946 #endif
947
948 #ifndef traceSTREAM_BUFFER_SEND
949     #define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent )
950 #endif
951
952 #ifndef traceSTREAM_BUFFER_SEND_FAILED
953     #define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer )
954 #endif
955
956 #ifndef traceSTREAM_BUFFER_SEND_FROM_ISR
957     #define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent )
958 #endif
959
960 #ifndef traceBLOCKING_ON_STREAM_BUFFER_RECEIVE
961     #define traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer )
962 #endif
963
964 #ifndef traceSTREAM_BUFFER_RECEIVE
965     #define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength )
966 #endif
967
968 #ifndef traceSTREAM_BUFFER_RECEIVE_FAILED
969     #define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer )
970 #endif
971
972 #ifndef traceSTREAM_BUFFER_RECEIVE_FROM_ISR
973     #define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
974 #endif
975
976 #ifndef configGENERATE_RUN_TIME_STATS
977     #define configGENERATE_RUN_TIME_STATS    0
978 #endif
979
980 #if ( configGENERATE_RUN_TIME_STATS == 1 )
981
982     #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
983         #error If configGENERATE_RUN_TIME_STATS is defined then portCONFIGURE_TIMER_FOR_RUN_TIME_STATS must also be defined.  portCONFIGURE_TIMER_FOR_RUN_TIME_STATS should call a port layer function to setup a peripheral timer/counter that can then be used as the run time counter time base.
984     #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
985
986     #ifndef portGET_RUN_TIME_COUNTER_VALUE
987         #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
988             #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined.  See the examples provided and the FreeRTOS web site for more information.
989         #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
990     #endif /* portGET_RUN_TIME_COUNTER_VALUE */
991
992 #endif /* configGENERATE_RUN_TIME_STATS */
993
994 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
995     #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
996 #endif
997
998 #ifndef configUSE_MALLOC_FAILED_HOOK
999     #define configUSE_MALLOC_FAILED_HOOK    0
1000 #endif
1001
1002 #ifndef portPRIVILEGE_BIT
1003     #define portPRIVILEGE_BIT    ( ( UBaseType_t ) 0x00 )
1004 #endif
1005
1006 #ifndef portYIELD_WITHIN_API
1007     #define portYIELD_WITHIN_API    portYIELD
1008 #endif
1009
1010 #ifndef portSUPPRESS_TICKS_AND_SLEEP
1011     #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
1012 #endif
1013
1014 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
1015     #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP    2
1016 #endif
1017
1018 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
1019     #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
1020 #endif
1021
1022 #ifndef configUSE_TICKLESS_IDLE
1023     #define configUSE_TICKLESS_IDLE    0
1024 #endif
1025
1026 #ifndef configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING
1027     #define configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING( x )
1028 #endif
1029
1030 #ifndef configPRE_SLEEP_PROCESSING
1031     #define configPRE_SLEEP_PROCESSING( x )
1032 #endif
1033
1034 #ifndef configPOST_SLEEP_PROCESSING
1035     #define configPOST_SLEEP_PROCESSING( x )
1036 #endif
1037
1038 #ifndef configUSE_QUEUE_SETS
1039     #define configUSE_QUEUE_SETS    0
1040 #endif
1041
1042 #ifndef portTASK_USES_FLOATING_POINT
1043     #define portTASK_USES_FLOATING_POINT()
1044 #endif
1045
1046 #ifndef portALLOCATE_SECURE_CONTEXT
1047     #define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
1048 #endif
1049
1050 #ifndef portDONT_DISCARD
1051     #define portDONT_DISCARD
1052 #endif
1053
1054 #ifndef configUSE_TIME_SLICING
1055     #define configUSE_TIME_SLICING    1
1056 #endif
1057
1058 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
1059     #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS    0
1060 #endif
1061
1062 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
1063     #define configUSE_STATS_FORMATTING_FUNCTIONS    0
1064 #endif
1065
1066 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
1067     #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
1068 #endif
1069
1070 #ifndef configUSE_TRACE_FACILITY
1071     #define configUSE_TRACE_FACILITY    0
1072 #endif
1073
1074 #ifndef mtCOVERAGE_TEST_MARKER
1075     #define mtCOVERAGE_TEST_MARKER()
1076 #endif
1077
1078 #ifndef mtCOVERAGE_TEST_DELAY
1079     #define mtCOVERAGE_TEST_DELAY()
1080 #endif
1081
1082 #ifndef portASSERT_IF_IN_ISR
1083     #define portASSERT_IF_IN_ISR()
1084 #endif
1085
1086 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
1087     #define configUSE_PORT_OPTIMISED_TASK_SELECTION    0
1088 #endif
1089
1090 #ifndef configAPPLICATION_ALLOCATED_HEAP
1091     #define configAPPLICATION_ALLOCATED_HEAP    0
1092 #endif
1093
1094 #ifndef configENABLE_HEAP_PROTECTOR
1095     #define configENABLE_HEAP_PROTECTOR    0
1096 #endif
1097
1098 #ifndef configUSE_TASK_NOTIFICATIONS
1099     #define configUSE_TASK_NOTIFICATIONS    1
1100 #endif
1101
1102 #ifndef configTASK_NOTIFICATION_ARRAY_ENTRIES
1103     #define configTASK_NOTIFICATION_ARRAY_ENTRIES    1
1104 #endif
1105
1106 #if configTASK_NOTIFICATION_ARRAY_ENTRIES < 1
1107     #error configTASK_NOTIFICATION_ARRAY_ENTRIES must be at least 1
1108 #endif
1109
1110 #ifndef configUSE_POSIX_ERRNO
1111     #define configUSE_POSIX_ERRNO    0
1112 #endif
1113
1114 #ifndef configUSE_SB_COMPLETED_CALLBACK
1115
1116 /* By default per-instance callbacks are not enabled for stream buffer or message buffer. */
1117     #define configUSE_SB_COMPLETED_CALLBACK    0
1118 #endif
1119
1120 #ifndef portTICK_TYPE_IS_ATOMIC
1121     #define portTICK_TYPE_IS_ATOMIC    0
1122 #endif
1123
1124 #ifndef configSUPPORT_STATIC_ALLOCATION
1125     /* Defaults to 0 for backward compatibility. */
1126     #define configSUPPORT_STATIC_ALLOCATION    0
1127 #endif
1128
1129 #ifndef configSUPPORT_DYNAMIC_ALLOCATION
1130     /* Defaults to 1 for backward compatibility. */
1131     #define configSUPPORT_DYNAMIC_ALLOCATION    1
1132 #endif
1133
1134 #if ( ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION != 1 ) )
1135     #error configUSE_STATS_FORMATTING_FUNCTIONS cannot be used without dynamic allocation, but configSUPPORT_DYNAMIC_ALLOCATION is not set to 1.
1136 #endif
1137
1138 #if ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 )
1139     #if ( ( configUSE_TRACE_FACILITY != 1 ) && ( configGENERATE_RUN_TIME_STATS != 1 ) )
1140         #error configUSE_STATS_FORMATTING_FUNCTIONS is 1 but the functions it enables are not used because neither configUSE_TRACE_FACILITY or configGENERATE_RUN_TIME_STATS are 1.  Set configUSE_STATS_FORMATTING_FUNCTIONS to 0 in FreeRTOSConfig.h.
1141     #endif
1142 #endif
1143
1144 #ifndef configSTACK_DEPTH_TYPE
1145
1146 /* Defaults to uint16_t for backward compatibility, but can be overridden
1147  * in FreeRTOSConfig.h if uint16_t is too restrictive. */
1148     #define configSTACK_DEPTH_TYPE    uint16_t
1149 #endif
1150
1151 #ifndef configRUN_TIME_COUNTER_TYPE
1152
1153 /* Defaults to uint32_t for backward compatibility, but can be overridden in
1154  * FreeRTOSConfig.h if uint32_t is too restrictive. */
1155
1156     #define configRUN_TIME_COUNTER_TYPE    uint32_t
1157 #endif
1158
1159 #ifndef configMESSAGE_BUFFER_LENGTH_TYPE
1160
1161 /* Defaults to size_t for backward compatibility, but can be overridden
1162  * in FreeRTOSConfig.h if lengths will always be less than the number of bytes
1163  * in a size_t. */
1164     #define configMESSAGE_BUFFER_LENGTH_TYPE    size_t
1165 #endif
1166
1167 /* Sanity check the configuration. */
1168 #if ( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
1169     #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
1170 #endif
1171
1172 #if ( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )
1173     #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
1174 #endif
1175
1176 #if ( ( configRUN_MULTIPLE_PRIORITIES == 0 ) && ( configUSE_TASK_PREEMPTION_DISABLE != 0 ) )
1177     #error configRUN_MULTIPLE_PRIORITIES must be set to 1 to use task preemption disable
1178 #endif
1179
1180 #if ( ( configUSE_PREEMPTION == 0 ) && ( configUSE_TASK_PREEMPTION_DISABLE != 0 ) )
1181     #error configUSE_PREEMPTION must be set to 1 to use task preemption disable
1182 #endif
1183
1184 #if ( ( configNUMBER_OF_CORES == 1 ) && ( configUSE_TASK_PREEMPTION_DISABLE != 0 ) )
1185     #error configUSE_TASK_PREEMPTION_DISABLE is not supported in single core FreeRTOS
1186 #endif
1187
1188 #if ( ( configNUMBER_OF_CORES == 1 ) && ( configUSE_CORE_AFFINITY != 0 ) )
1189     #error configUSE_CORE_AFFINITY is not supported in single core FreeRTOS
1190 #endif
1191
1192 #if ( ( configNUMBER_OF_CORES > 1 ) && ( configUSE_PORT_OPTIMISED_TASK_SELECTION != 0 ) )
1193     #error configUSE_PORT_OPTIMISED_TASK_SELECTION is not supported in SMP FreeRTOS
1194 #endif
1195
1196 #ifndef configINITIAL_TICK_COUNT
1197     #define configINITIAL_TICK_COUNT    0
1198 #endif
1199
1200 #if ( portTICK_TYPE_IS_ATOMIC == 0 )
1201
1202 /* Either variables of tick type cannot be read atomically, or
1203  * portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
1204  * the tick count is returned to the standard critical section macros. */
1205     #define portTICK_TYPE_ENTER_CRITICAL()                      portENTER_CRITICAL()
1206     #define portTICK_TYPE_EXIT_CRITICAL()                       portEXIT_CRITICAL()
1207     #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR()         portSET_INTERRUPT_MASK_FROM_ISR()
1208     #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x )    portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
1209 #else
1210
1211 /* The tick type can be read atomically, so critical sections used when the
1212  * tick count is returned can be defined away. */
1213     #define portTICK_TYPE_ENTER_CRITICAL()
1214     #define portTICK_TYPE_EXIT_CRITICAL()
1215     #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR()         0
1216     #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x )    ( void ) ( x )
1217 #endif /* if ( portTICK_TYPE_IS_ATOMIC == 0 ) */
1218
1219 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
1220  * V8 if desired. */
1221 #ifndef configENABLE_BACKWARD_COMPATIBILITY
1222     #define configENABLE_BACKWARD_COMPATIBILITY    1
1223 #endif
1224
1225 #ifndef configPRINTF
1226
1227 /* configPRINTF() was not defined, so define it away to nothing.  To use
1228  * configPRINTF() then define it as follows (where MyPrintFunction() is
1229  * provided by the application writer):
1230  *
1231  * void MyPrintFunction(const char *pcFormat, ... );
1232  #define configPRINTF( X )   MyPrintFunction X
1233  *
1234  * Then call like a standard printf() function, but placing brackets around
1235  * all parameters so they are passed as a single parameter.  For example:
1236  * configPRINTF( ("Value = %d", MyVariable) ); */
1237     #define configPRINTF( X )
1238 #endif
1239
1240 #ifndef configMAX
1241
1242 /* The application writer has not provided their own MAX macro, so define
1243  * the following generic implementation. */
1244     #define configMAX( a, b )    ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
1245 #endif
1246
1247 #ifndef configMIN
1248
1249 /* The application writer has not provided their own MIN macro, so define
1250  * the following generic implementation. */
1251     #define configMIN( a, b )    ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
1252 #endif
1253
1254 #if configENABLE_BACKWARD_COMPATIBILITY == 1
1255     #define eTaskStateGet                 eTaskGetState
1256     #define portTickType                  TickType_t
1257     #define xTaskHandle                   TaskHandle_t
1258     #define xQueueHandle                  QueueHandle_t
1259     #define xSemaphoreHandle              SemaphoreHandle_t
1260     #define xQueueSetHandle               QueueSetHandle_t
1261     #define xQueueSetMemberHandle         QueueSetMemberHandle_t
1262     #define xTimeOutType                  TimeOut_t
1263     #define xMemoryRegion                 MemoryRegion_t
1264     #define xTaskParameters               TaskParameters_t
1265     #define xTaskStatusType               TaskStatus_t
1266     #define xTimerHandle                  TimerHandle_t
1267     #define xCoRoutineHandle              CoRoutineHandle_t
1268     #define pdTASK_HOOK_CODE              TaskHookFunction_t
1269     #define portTICK_RATE_MS              portTICK_PERIOD_MS
1270     #define pcTaskGetTaskName             pcTaskGetName
1271     #define pcTimerGetTimerName           pcTimerGetName
1272     #define pcQueueGetQueueName           pcQueueGetName
1273     #define vTaskGetTaskInfo              vTaskGetInfo
1274     #define xTaskGetIdleRunTimeCounter    ulTaskGetIdleRunTimeCounter
1275
1276 /* Backward compatibility within the scheduler code only - these definitions
1277  * are not really required but are included for completeness. */
1278     #define tmrTIMER_CALLBACK             TimerCallbackFunction_t
1279     #define pdTASK_CODE                   TaskFunction_t
1280     #define xListItem                     ListItem_t
1281     #define xList                         List_t
1282
1283 /* For libraries that break the list data hiding, and access list structure
1284  * members directly (which is not supposed to be done). */
1285     #define pxContainer                   pvContainer
1286 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
1287
1288 #if ( configUSE_ALTERNATIVE_API != 0 )
1289     #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0
1290 #endif
1291
1292 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
1293  * if floating point hardware is otherwise supported by the FreeRTOS port in use.
1294  * This constant is not supported by all FreeRTOS ports that include floating
1295  * point support. */
1296 #ifndef configUSE_TASK_FPU_SUPPORT
1297     #define configUSE_TASK_FPU_SUPPORT    1
1298 #endif
1299
1300 /* Set configENABLE_MPU to 1 to enable MPU support and 0 to disable it. This is
1301  * currently used in ARMv8M ports. */
1302 #ifndef configENABLE_MPU
1303     #define configENABLE_MPU    0
1304 #endif
1305
1306 /* Set configENABLE_FPU to 1 to enable FPU support and 0 to disable it. This is
1307  * currently used in ARMv8M ports. */
1308 #ifndef configENABLE_FPU
1309     #define configENABLE_FPU    1
1310 #endif
1311
1312 /* Set configENABLE_MVE to 1 to enable MVE support and 0 to disable it. This is
1313  * currently used in ARMv8M ports. */
1314 #ifndef configENABLE_MVE
1315     #define configENABLE_MVE    0
1316 #endif
1317
1318 /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it.
1319  * This is currently used in ARMv8M ports. */
1320 #ifndef configENABLE_TRUSTZONE
1321     #define configENABLE_TRUSTZONE    1
1322 #endif
1323
1324 /* Set configRUN_FREERTOS_SECURE_ONLY to 1 to run the FreeRTOS ARMv8M port on
1325  * the Secure Side only. */
1326 #ifndef configRUN_FREERTOS_SECURE_ONLY
1327     #define configRUN_FREERTOS_SECURE_ONLY    0
1328 #endif
1329
1330 #ifndef configRUN_ADDITIONAL_TESTS
1331     #define configRUN_ADDITIONAL_TESTS    0
1332 #endif
1333
1334 /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
1335  * dynamically allocated RAM, in which case when any task is deleted it is known
1336  * that both the task's stack and TCB need to be freed.  Sometimes the
1337  * FreeRTOSConfig.h settings only allow a task to be created using statically
1338  * allocated RAM, in which case when any task is deleted it is known that neither
1339  * the task's stack or TCB should be freed.  Sometimes the FreeRTOSConfig.h
1340  * settings allow a task to be created using either statically or dynamically
1341  * allocated RAM, in which case a member of the TCB is used to record whether the
1342  * stack and/or TCB were allocated statically or dynamically, so when a task is
1343  * deleted the RAM that was allocated dynamically is freed again and no attempt is
1344  * made to free the RAM that was allocated statically.
1345  * tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a
1346  * task to be created using either statically or dynamically allocated RAM.  Note
1347  * that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with
1348  * a statically allocated stack and a dynamically allocated TCB.
1349  *
1350  * The following table lists various combinations of portUSING_MPU_WRAPPERS,
1351  * configSUPPORT_DYNAMIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION and
1352  * when it is possible to have both static and dynamic allocation:
1353  *  +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1354  * | MPU | Dynamic | Static |     Available Functions     |       Possible Allocations        | Both Dynamic and | Need Free |
1355  * |     |         |        |                             |                                   | Static Possible  |           |
1356  * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1357  * | 0   | 0       | 1      | xTaskCreateStatic           | TCB - Static, Stack - Static      | No               | No        |
1358  * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1359  * | 0   | 1       | 0      | xTaskCreate                 | TCB - Dynamic, Stack - Dynamic    | No               | Yes       |
1360  * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1361  * | 0   | 1       | 1      | xTaskCreate,                | 1. TCB - Dynamic, Stack - Dynamic | Yes              | Yes       |
1362  * |     |         |        | xTaskCreateStatic           | 2. TCB - Static, Stack - Static   |                  |           |
1363  * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1364  * | 1   | 0       | 1      | xTaskCreateStatic,          | TCB - Static, Stack - Static      | No               | No        |
1365  * |     |         |        | xTaskCreateRestrictedStatic |                                   |                  |           |
1366  * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1367  * | 1   | 1       | 0      | xTaskCreate,                | 1. TCB - Dynamic, Stack - Dynamic | Yes              | Yes       |
1368  * |     |         |        | xTaskCreateRestricted       | 2. TCB - Dynamic, Stack - Static  |                  |           |
1369  * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1370  * | 1   | 1       | 1      | xTaskCreate,                | 1. TCB - Dynamic, Stack - Dynamic | Yes              | Yes       |
1371  * |     |         |        | xTaskCreateStatic,          | 2. TCB - Dynamic, Stack - Static  |                  |           |
1372  * |     |         |        | xTaskCreateRestricted,      | 3. TCB - Static, Stack - Static   |                  |           |
1373  * |     |         |        | xTaskCreateRestrictedStatic |                                   |                  |           |
1374  * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1375  */
1376 #define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE                                                                                     \
1377     ( ( ( portUSING_MPU_WRAPPERS == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) || \
1378       ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) )
1379
1380 /*
1381  * In line with software engineering best practice, FreeRTOS implements a strict
1382  * data hiding policy, so the real structures used by FreeRTOS to maintain the
1383  * state of tasks, queues, semaphores, etc. are not accessible to the application
1384  * code.  However, if the application writer wants to statically allocate such
1385  * an object then the size of the object needs to be known.  Dummy structures
1386  * that are guaranteed to have the same size and alignment requirements of the
1387  * real objects are used for this purpose.  The dummy list and list item
1388  * structures below are used for inclusion in such a dummy structure.
1389  */
1390 struct xSTATIC_LIST_ITEM
1391 {
1392     #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1393         TickType_t xDummy1;
1394     #endif
1395     TickType_t xDummy2;
1396     void * pvDummy3[ 4 ];
1397     #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1398         TickType_t xDummy4;
1399     #endif
1400 };
1401 typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
1402
1403 #if ( configUSE_MINI_LIST_ITEM == 1 )
1404     /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1405     struct xSTATIC_MINI_LIST_ITEM
1406     {
1407         #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1408             TickType_t xDummy1;
1409         #endif
1410         TickType_t xDummy2;
1411         void * pvDummy3[ 2 ];
1412     };
1413     typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
1414 #else /* if ( configUSE_MINI_LIST_ITEM == 1 ) */
1415     typedef struct xSTATIC_LIST_ITEM      StaticMiniListItem_t;
1416 #endif /* if ( configUSE_MINI_LIST_ITEM == 1 ) */
1417
1418 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1419 typedef struct xSTATIC_LIST
1420 {
1421     #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1422         TickType_t xDummy1;
1423     #endif
1424     UBaseType_t uxDummy2;
1425     void * pvDummy3;
1426     StaticMiniListItem_t xDummy4;
1427     #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1428         TickType_t xDummy5;
1429     #endif
1430 } StaticList_t;
1431
1432 /*
1433  * In line with software engineering best practice, especially when supplying a
1434  * library that is likely to change in future versions, FreeRTOS implements a
1435  * strict data hiding policy.  This means the Task structure used internally by
1436  * FreeRTOS is not accessible to application code.  However, if the application
1437  * writer wants to statically allocate the memory required to create a task then
1438  * the size of the task object needs to be known.  The StaticTask_t structure
1439  * below is provided for this purpose.  Its sizes and alignment requirements are
1440  * guaranteed to match those of the genuine structure, no matter which
1441  * architecture is being used, and no matter how the values in FreeRTOSConfig.h
1442  * are set.  Its contents are somewhat obfuscated in the hope users will
1443  * recognise that it would be unwise to make direct use of the structure members.
1444  */
1445 typedef struct xSTATIC_TCB
1446 {
1447     void * pxDummy1;
1448     #if ( portUSING_MPU_WRAPPERS == 1 )
1449         xMPU_SETTINGS xDummy2;
1450     #endif
1451     #if ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 )
1452         UBaseType_t uxDummy26;
1453     #endif
1454     StaticListItem_t xDummy3[ 2 ];
1455     UBaseType_t uxDummy5;
1456     void * pxDummy6;
1457     #if ( configNUMBER_OF_CORES > 1 )
1458         BaseType_t xDummy23;
1459         UBaseType_t uxDummy24;
1460     #endif
1461     uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
1462     #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
1463         BaseType_t xDummy25;
1464     #endif
1465     #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
1466         void * pxDummy8;
1467     #endif
1468     #if ( portCRITICAL_NESTING_IN_TCB == 1 )
1469         UBaseType_t uxDummy9;
1470     #endif
1471     #if ( configUSE_TRACE_FACILITY == 1 )
1472         UBaseType_t uxDummy10[ 2 ];
1473     #endif
1474     #if ( configUSE_MUTEXES == 1 )
1475         UBaseType_t uxDummy12[ 2 ];
1476     #endif
1477     #if ( configUSE_APPLICATION_TASK_TAG == 1 )
1478         void * pxDummy14;
1479     #endif
1480     #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
1481         void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
1482     #endif
1483     #if ( configGENERATE_RUN_TIME_STATS == 1 )
1484         configRUN_TIME_COUNTER_TYPE ulDummy16;
1485     #endif
1486     #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 )
1487         configTLS_BLOCK_TYPE xDummy17;
1488     #endif
1489     #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1490         uint32_t ulDummy18[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
1491         uint8_t ucDummy19[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
1492     #endif
1493     #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
1494         uint8_t uxDummy20;
1495     #endif
1496
1497     #if ( INCLUDE_xTaskAbortDelay == 1 )
1498         uint8_t ucDummy21;
1499     #endif
1500     #if ( configUSE_POSIX_ERRNO == 1 )
1501         int iDummy22;
1502     #endif
1503 } StaticTask_t;
1504
1505 /*
1506  * In line with software engineering best practice, especially when supplying a
1507  * library that is likely to change in future versions, FreeRTOS implements a
1508  * strict data hiding policy.  This means the Queue structure used internally by
1509  * FreeRTOS is not accessible to application code.  However, if the application
1510  * writer wants to statically allocate the memory required to create a queue
1511  * then the size of the queue object needs to be known.  The StaticQueue_t
1512  * structure below is provided for this purpose.  Its sizes and alignment
1513  * requirements are guaranteed to match those of the genuine structure, no
1514  * matter which architecture is being used, and no matter how the values in
1515  * FreeRTOSConfig.h are set.  Its contents are somewhat obfuscated in the hope
1516  * users will recognise that it would be unwise to make direct use of the
1517  * structure members.
1518  */
1519 typedef struct xSTATIC_QUEUE
1520 {
1521     void * pvDummy1[ 3 ];
1522
1523     union
1524     {
1525         void * pvDummy2;
1526         UBaseType_t uxDummy2;
1527     } u;
1528
1529     StaticList_t xDummy3[ 2 ];
1530     UBaseType_t uxDummy4[ 3 ];
1531     uint8_t ucDummy5[ 2 ];
1532
1533     #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1534         uint8_t ucDummy6;
1535     #endif
1536
1537     #if ( configUSE_QUEUE_SETS == 1 )
1538         void * pvDummy7;
1539     #endif
1540
1541     #if ( configUSE_TRACE_FACILITY == 1 )
1542         UBaseType_t uxDummy8;
1543         uint8_t ucDummy9;
1544     #endif
1545 } StaticQueue_t;
1546 typedef StaticQueue_t StaticSemaphore_t;
1547
1548 /*
1549  * In line with software engineering best practice, especially when supplying a
1550  * library that is likely to change in future versions, FreeRTOS implements a
1551  * strict data hiding policy.  This means the event group structure used
1552  * internally by FreeRTOS is not accessible to application code.  However, if
1553  * the application writer wants to statically allocate the memory required to
1554  * create an event group then the size of the event group object needs to be
1555  * know.  The StaticEventGroup_t structure below is provided for this purpose.
1556  * Its sizes and alignment requirements are guaranteed to match those of the
1557  * genuine structure, no matter which architecture is being used, and no matter
1558  * how the values in FreeRTOSConfig.h are set.  Its contents are somewhat
1559  * obfuscated in the hope users will recognise that it would be unwise to make
1560  * direct use of the structure members.
1561  */
1562 typedef struct xSTATIC_EVENT_GROUP
1563 {
1564     TickType_t xDummy1;
1565     StaticList_t xDummy2;
1566
1567     #if ( configUSE_TRACE_FACILITY == 1 )
1568         UBaseType_t uxDummy3;
1569     #endif
1570
1571     #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1572         uint8_t ucDummy4;
1573     #endif
1574 } StaticEventGroup_t;
1575
1576 /*
1577  * In line with software engineering best practice, especially when supplying a
1578  * library that is likely to change in future versions, FreeRTOS implements a
1579  * strict data hiding policy.  This means the software timer structure used
1580  * internally by FreeRTOS is not accessible to application code.  However, if
1581  * the application writer wants to statically allocate the memory required to
1582  * create a software timer then the size of the queue object needs to be known.
1583  * The StaticTimer_t structure below is provided for this purpose.  Its sizes
1584  * and alignment requirements are guaranteed to match those of the genuine
1585  * structure, no matter which architecture is being used, and no matter how the
1586  * values in FreeRTOSConfig.h are set.  Its contents are somewhat obfuscated in
1587  * the hope users will recognise that it would be unwise to make direct use of
1588  * the structure members.
1589  */
1590 typedef struct xSTATIC_TIMER
1591 {
1592     void * pvDummy1;
1593     StaticListItem_t xDummy2;
1594     TickType_t xDummy3;
1595     void * pvDummy5;
1596     TaskFunction_t pvDummy6;
1597     #if ( configUSE_TRACE_FACILITY == 1 )
1598         UBaseType_t uxDummy7;
1599     #endif
1600     uint8_t ucDummy8;
1601 } StaticTimer_t;
1602
1603 /*
1604  * In line with software engineering best practice, especially when supplying a
1605  * library that is likely to change in future versions, FreeRTOS implements a
1606  * strict data hiding policy.  This means the stream buffer structure used
1607  * internally by FreeRTOS is not accessible to application code.  However, if
1608  * the application writer wants to statically allocate the memory required to
1609  * create a stream buffer then the size of the stream buffer object needs to be
1610  * known.  The StaticStreamBuffer_t structure below is provided for this
1611  * purpose.  Its size and alignment requirements are guaranteed to match those
1612  * of the genuine structure, no matter which architecture is being used, and
1613  * no matter how the values in FreeRTOSConfig.h are set.  Its contents are
1614  * somewhat obfuscated in the hope users will recognise that it would be unwise
1615  * to make direct use of the structure members.
1616  */
1617 typedef struct xSTATIC_STREAM_BUFFER
1618 {
1619     size_t uxDummy1[ 4 ];
1620     void * pvDummy2[ 3 ];
1621     uint8_t ucDummy3;
1622     #if ( configUSE_TRACE_FACILITY == 1 )
1623         UBaseType_t uxDummy4;
1624     #endif
1625     #if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
1626         void * pvDummy5[ 2 ];
1627     #endif
1628 } StaticStreamBuffer_t;
1629
1630 /* Message buffers are built on stream buffers. */
1631 typedef StaticStreamBuffer_t StaticMessageBuffer_t;
1632
1633 /* *INDENT-OFF* */
1634 #ifdef __cplusplus
1635     }
1636 #endif
1637 /* *INDENT-ON* */
1638
1639 #endif /* INC_FREERTOS_H */