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