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