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