2 * FreeRTOS Kernel V10.2.1
3 * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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:
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
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.
22 * http://www.FreeRTOS.org
23 * http://aws.amazon.com/freertos
28 #ifndef INC_FREERTOS_H
29 #define INC_FREERTOS_H
32 * Include the generic headers required for the FreeRTOS port being used.
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
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.
49 #include <stdint.h> /* READ COMMENT ABOVE. */
55 /* Application specific configuration options. */
56 #include "FreeRTOSConfig.h"
58 /* Basic FreeRTOS definitions. */
61 /* Definitions specific to the port being used. */
64 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */
65 #ifndef configUSE_NEWLIB_REENTRANT
66 #define configUSE_NEWLIB_REENTRANT 0
69 /* Required if struct _reent is used. */
70 #if ( configUSE_NEWLIB_REENTRANT == 1 )
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.
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.
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.
87 #if configMAX_PRIORITIES < 1
88 #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
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.
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.
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.
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.
107 #ifndef configUSE_CO_ROUTINES
108 #define configUSE_CO_ROUTINES 0
111 #ifndef INCLUDE_vTaskPrioritySet
112 #define INCLUDE_vTaskPrioritySet 0
115 #ifndef INCLUDE_uxTaskPriorityGet
116 #define INCLUDE_uxTaskPriorityGet 0
119 #ifndef INCLUDE_vTaskDelete
120 #define INCLUDE_vTaskDelete 0
123 #ifndef INCLUDE_vTaskSuspend
124 #define INCLUDE_vTaskSuspend 0
127 #ifndef INCLUDE_vTaskDelayUntil
128 #define INCLUDE_vTaskDelayUntil 0
131 #ifndef INCLUDE_vTaskDelay
132 #define INCLUDE_vTaskDelay 0
135 #ifndef INCLUDE_xTaskGetIdleTaskHandle
136 #define INCLUDE_xTaskGetIdleTaskHandle 0
139 #ifndef INCLUDE_xTaskAbortDelay
140 #define INCLUDE_xTaskAbortDelay 0
143 #ifndef INCLUDE_xQueueGetMutexHolder
144 #define INCLUDE_xQueueGetMutexHolder 0
147 #ifndef INCLUDE_xSemaphoreGetMutexHolder
148 #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
151 #ifndef INCLUDE_xTaskGetHandle
152 #define INCLUDE_xTaskGetHandle 0
155 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
156 #define INCLUDE_uxTaskGetStackHighWaterMark 0
159 #ifndef INCLUDE_uxTaskGetStackHighWaterMark2
160 #define INCLUDE_uxTaskGetStackHighWaterMark2 0
163 #ifndef INCLUDE_eTaskGetState
164 #define INCLUDE_eTaskGetState 0
167 #ifndef INCLUDE_xTaskResumeFromISR
168 #define INCLUDE_xTaskResumeFromISR 1
171 #ifndef INCLUDE_xTimerPendFunctionCall
172 #define INCLUDE_xTimerPendFunctionCall 0
175 #ifndef INCLUDE_xTaskGetSchedulerState
176 #define INCLUDE_xTaskGetSchedulerState 0
179 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
180 #define INCLUDE_xTaskGetCurrentTaskHandle 0
183 #if configUSE_CO_ROUTINES != 0
184 #ifndef configMAX_CO_ROUTINE_PRIORITIES
185 #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
189 #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
190 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
193 #ifndef configUSE_APPLICATION_TASK_TAG
194 #define configUSE_APPLICATION_TASK_TAG 0
197 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
198 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
201 #ifndef configUSE_RECURSIVE_MUTEXES
202 #define configUSE_RECURSIVE_MUTEXES 0
205 #ifndef configUSE_MUTEXES
206 #define configUSE_MUTEXES 0
209 #ifndef configUSE_TIMERS
210 #define configUSE_TIMERS 0
213 #ifndef configUSE_COUNTING_SEMAPHORES
214 #define configUSE_COUNTING_SEMAPHORES 0
217 #ifndef configUSE_ALTERNATIVE_API
218 #define configUSE_ALTERNATIVE_API 0
221 #ifndef portCRITICAL_NESTING_IN_TCB
222 #define portCRITICAL_NESTING_IN_TCB 0
225 #ifndef configMAX_TASK_NAME_LEN
226 #define configMAX_TASK_NAME_LEN 16
229 #ifndef configIDLE_SHOULD_YIELD
230 #define configIDLE_SHOULD_YIELD 1
233 #if configMAX_TASK_NAME_LEN < 1
234 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
238 #define configASSERT( x )
239 #define configASSERT_DEFINED 0
241 #define configASSERT_DEFINED 1
244 #ifndef portMEMORY_BARRIER
245 #define portMEMORY_BARRIER()
248 /* The timers module relies on xTaskGetSchedulerState(). */
249 #if configUSE_TIMERS == 1
251 #ifndef configTIMER_TASK_PRIORITY
252 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
253 #endif /* configTIMER_TASK_PRIORITY */
255 #ifndef configTIMER_QUEUE_LENGTH
256 #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
257 #endif /* configTIMER_QUEUE_LENGTH */
259 #ifndef configTIMER_TASK_STACK_DEPTH
260 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
261 #endif /* configTIMER_TASK_STACK_DEPTH */
263 #endif /* configUSE_TIMERS */
265 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
266 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
269 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
270 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
273 #ifndef portCLEAN_UP_TCB
274 #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
277 #ifndef portPRE_TASK_DELETE_HOOK
278 #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
281 #ifndef portSETUP_TCB
282 #define portSETUP_TCB( pxTCB ) ( void ) pxTCB
285 #ifndef configQUEUE_REGISTRY_SIZE
286 #define configQUEUE_REGISTRY_SIZE 0U
289 #if ( configQUEUE_REGISTRY_SIZE < 1 )
290 #define vQueueAddToRegistry( xQueue, pcName )
291 #define vQueueUnregisterQueue( xQueue )
292 #define pcQueueGetName( xQueue )
295 #ifndef portPOINTER_SIZE_TYPE
296 #define portPOINTER_SIZE_TYPE uint32_t
299 /* Remove any unused trace macros. */
301 /* Used to perform any necessary initialisation - for example, open a file
302 into which trace is to be written. */
307 /* Use to close a trace, for example close a file into which trace has been
312 #ifndef traceTASK_SWITCHED_IN
313 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
314 to the task control block of the selected task. */
315 #define traceTASK_SWITCHED_IN()
318 #ifndef traceINCREASE_TICK_COUNT
319 /* Called before stepping the tick count after waking from tickless idle
321 #define traceINCREASE_TICK_COUNT( x )
324 #ifndef traceLOW_POWER_IDLE_BEGIN
325 /* Called immediately before entering tickless idle. */
326 #define traceLOW_POWER_IDLE_BEGIN()
329 #ifndef traceLOW_POWER_IDLE_END
330 /* Called when returning to the Idle task after a tickless idle. */
331 #define traceLOW_POWER_IDLE_END()
334 #ifndef traceTASK_SWITCHED_OUT
335 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
336 to the task control block of the task being switched out. */
337 #define traceTASK_SWITCHED_OUT()
340 #ifndef traceTASK_PRIORITY_INHERIT
341 /* Called when a task attempts to take a mutex that is already held by a
342 lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
343 that holds the mutex. uxInheritedPriority is the priority the mutex holder
344 will inherit (the priority of the task that is attempting to obtain the
346 #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
349 #ifndef traceTASK_PRIORITY_DISINHERIT
350 /* Called when a task releases a mutex, the holding of which had resulted in
351 the task inheriting the priority of a higher priority task.
352 pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
353 mutex. uxOriginalPriority is the task's configured (base) priority. */
354 #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
357 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
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_RECEIVE( pxQueue )
365 #ifndef traceBLOCKING_ON_QUEUE_PEEK
366 /* Task is about to block because it cannot read from a
367 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
368 upon which the read was attempted. pxCurrentTCB points to the TCB of the
369 task that attempted the read. */
370 #define traceBLOCKING_ON_QUEUE_PEEK( pxQueue )
373 #ifndef traceBLOCKING_ON_QUEUE_SEND
374 /* Task is about to block because it cannot write to a
375 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
376 upon which the write was attempted. pxCurrentTCB points to the TCB of the
377 task that attempted the write. */
378 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
381 #ifndef configCHECK_FOR_STACK_OVERFLOW
382 #define configCHECK_FOR_STACK_OVERFLOW 0
385 #ifndef configRECORD_STACK_HIGH_ADDRESS
386 #define configRECORD_STACK_HIGH_ADDRESS 0
389 #ifndef configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H
390 #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 0
393 /* The following event macros are embedded in the kernel API calls. */
395 #ifndef traceMOVED_TASK_TO_READY_STATE
396 #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
399 #ifndef tracePOST_MOVED_TASK_TO_READY_STATE
400 #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
403 #ifndef traceQUEUE_CREATE
404 #define traceQUEUE_CREATE( pxNewQueue )
407 #ifndef traceQUEUE_CREATE_FAILED
408 #define traceQUEUE_CREATE_FAILED( ucQueueType )
411 #ifndef traceCREATE_MUTEX
412 #define traceCREATE_MUTEX( pxNewQueue )
415 #ifndef traceCREATE_MUTEX_FAILED
416 #define traceCREATE_MUTEX_FAILED()
419 #ifndef traceGIVE_MUTEX_RECURSIVE
420 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
423 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
424 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
427 #ifndef traceTAKE_MUTEX_RECURSIVE
428 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
431 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
432 #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
435 #ifndef traceCREATE_COUNTING_SEMAPHORE
436 #define traceCREATE_COUNTING_SEMAPHORE()
439 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
440 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
443 #ifndef traceQUEUE_SEND
444 #define traceQUEUE_SEND( pxQueue )
447 #ifndef traceQUEUE_SEND_FAILED
448 #define traceQUEUE_SEND_FAILED( pxQueue )
451 #ifndef traceQUEUE_RECEIVE
452 #define traceQUEUE_RECEIVE( pxQueue )
455 #ifndef traceQUEUE_PEEK
456 #define traceQUEUE_PEEK( pxQueue )
459 #ifndef traceQUEUE_PEEK_FAILED
460 #define traceQUEUE_PEEK_FAILED( pxQueue )
463 #ifndef traceQUEUE_PEEK_FROM_ISR
464 #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
467 #ifndef traceQUEUE_RECEIVE_FAILED
468 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
471 #ifndef traceQUEUE_SEND_FROM_ISR
472 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
475 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
476 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
479 #ifndef traceQUEUE_RECEIVE_FROM_ISR
480 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
483 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
484 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
487 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
488 #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
491 #ifndef traceQUEUE_DELETE
492 #define traceQUEUE_DELETE( pxQueue )
495 #ifndef traceTASK_CREATE
496 #define traceTASK_CREATE( pxNewTCB )
499 #ifndef traceTASK_CREATE_FAILED
500 #define traceTASK_CREATE_FAILED()
503 #ifndef traceTASK_DELETE
504 #define traceTASK_DELETE( pxTaskToDelete )
507 #ifndef traceTASK_DELAY_UNTIL
508 #define traceTASK_DELAY_UNTIL( x )
511 #ifndef traceTASK_DELAY
512 #define traceTASK_DELAY()
515 #ifndef traceTASK_PRIORITY_SET
516 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
519 #ifndef traceTASK_SUSPEND
520 #define traceTASK_SUSPEND( pxTaskToSuspend )
523 #ifndef traceTASK_RESUME
524 #define traceTASK_RESUME( pxTaskToResume )
527 #ifndef traceTASK_RESUME_FROM_ISR
528 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
531 #ifndef traceTASK_INCREMENT_TICK
532 #define traceTASK_INCREMENT_TICK( xTickCount )
535 #ifndef traceTIMER_CREATE
536 #define traceTIMER_CREATE( pxNewTimer )
539 #ifndef traceTIMER_CREATE_FAILED
540 #define traceTIMER_CREATE_FAILED()
543 #ifndef traceTIMER_COMMAND_SEND
544 #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
547 #ifndef traceTIMER_EXPIRED
548 #define traceTIMER_EXPIRED( pxTimer )
551 #ifndef traceTIMER_COMMAND_RECEIVED
552 #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
556 #define traceMALLOC( pvAddress, uiSize )
560 #define traceFREE( pvAddress, uiSize )
563 #ifndef traceEVENT_GROUP_CREATE
564 #define traceEVENT_GROUP_CREATE( xEventGroup )
567 #ifndef traceEVENT_GROUP_CREATE_FAILED
568 #define traceEVENT_GROUP_CREATE_FAILED()
571 #ifndef traceEVENT_GROUP_SYNC_BLOCK
572 #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
575 #ifndef traceEVENT_GROUP_SYNC_END
576 #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
579 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
580 #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
583 #ifndef traceEVENT_GROUP_WAIT_BITS_END
584 #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
587 #ifndef traceEVENT_GROUP_CLEAR_BITS
588 #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
591 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
592 #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
595 #ifndef traceEVENT_GROUP_SET_BITS
596 #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
599 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
600 #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
603 #ifndef traceEVENT_GROUP_DELETE
604 #define traceEVENT_GROUP_DELETE( xEventGroup )
607 #ifndef tracePEND_FUNC_CALL
608 #define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret)
611 #ifndef tracePEND_FUNC_CALL_FROM_ISR
612 #define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret)
615 #ifndef traceQUEUE_REGISTRY_ADD
616 #define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)
619 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
620 #define traceTASK_NOTIFY_TAKE_BLOCK()
623 #ifndef traceTASK_NOTIFY_TAKE
624 #define traceTASK_NOTIFY_TAKE()
627 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
628 #define traceTASK_NOTIFY_WAIT_BLOCK()
631 #ifndef traceTASK_NOTIFY_WAIT
632 #define traceTASK_NOTIFY_WAIT()
635 #ifndef traceTASK_NOTIFY
636 #define traceTASK_NOTIFY()
639 #ifndef traceTASK_NOTIFY_FROM_ISR
640 #define traceTASK_NOTIFY_FROM_ISR()
643 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
644 #define traceTASK_NOTIFY_GIVE_FROM_ISR()
647 #ifndef traceSTREAM_BUFFER_CREATE_FAILED
648 #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer )
651 #ifndef traceSTREAM_BUFFER_CREATE_STATIC_FAILED
652 #define traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer )
655 #ifndef traceSTREAM_BUFFER_CREATE
656 #define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer )
659 #ifndef traceSTREAM_BUFFER_DELETE
660 #define traceSTREAM_BUFFER_DELETE( xStreamBuffer )
663 #ifndef traceSTREAM_BUFFER_RESET
664 #define traceSTREAM_BUFFER_RESET( xStreamBuffer )
667 #ifndef traceBLOCKING_ON_STREAM_BUFFER_SEND
668 #define traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer )
671 #ifndef traceSTREAM_BUFFER_SEND
672 #define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent )
675 #ifndef traceSTREAM_BUFFER_SEND_FAILED
676 #define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer )
679 #ifndef traceSTREAM_BUFFER_SEND_FROM_ISR
680 #define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent )
683 #ifndef traceBLOCKING_ON_STREAM_BUFFER_RECEIVE
684 #define traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer )
687 #ifndef traceSTREAM_BUFFER_RECEIVE
688 #define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength )
691 #ifndef traceSTREAM_BUFFER_RECEIVE_FAILED
692 #define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer )
695 #ifndef traceSTREAM_BUFFER_RECEIVE_FROM_ISR
696 #define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
699 #ifndef configGENERATE_RUN_TIME_STATS
700 #define configGENERATE_RUN_TIME_STATS 0
703 #if ( configGENERATE_RUN_TIME_STATS == 1 )
705 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
706 #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.
707 #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
709 #ifndef portGET_RUN_TIME_COUNTER_VALUE
710 #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
711 #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.
712 #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
713 #endif /* portGET_RUN_TIME_COUNTER_VALUE */
715 #endif /* configGENERATE_RUN_TIME_STATS */
717 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
718 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
721 #ifndef configUSE_MALLOC_FAILED_HOOK
722 #define configUSE_MALLOC_FAILED_HOOK 0
725 #ifndef portPRIVILEGE_BIT
726 #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
729 #ifndef portYIELD_WITHIN_API
730 #define portYIELD_WITHIN_API portYIELD
733 #ifndef portSUPPRESS_TICKS_AND_SLEEP
734 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
737 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
738 #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
741 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
742 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
745 #ifndef configUSE_TICKLESS_IDLE
746 #define configUSE_TICKLESS_IDLE 0
749 #ifndef configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING
750 #define configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING( x )
753 #ifndef configPRE_SLEEP_PROCESSING
754 #define configPRE_SLEEP_PROCESSING( x )
757 #ifndef configPOST_SLEEP_PROCESSING
758 #define configPOST_SLEEP_PROCESSING( x )
761 #ifndef configUSE_QUEUE_SETS
762 #define configUSE_QUEUE_SETS 0
765 #ifndef portTASK_USES_FLOATING_POINT
766 #define portTASK_USES_FLOATING_POINT()
769 #ifndef portALLOCATE_SECURE_CONTEXT
770 #define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
773 #ifndef portDONT_DISCARD
774 #define portDONT_DISCARD
777 #ifndef configUSE_TIME_SLICING
778 #define configUSE_TIME_SLICING 1
781 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
782 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
785 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
786 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
789 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
790 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
793 #ifndef configUSE_TRACE_FACILITY
794 #define configUSE_TRACE_FACILITY 0
797 #ifndef mtCOVERAGE_TEST_MARKER
798 #define mtCOVERAGE_TEST_MARKER()
801 #ifndef mtCOVERAGE_TEST_DELAY
802 #define mtCOVERAGE_TEST_DELAY()
805 #ifndef portASSERT_IF_IN_ISR
806 #define portASSERT_IF_IN_ISR()
809 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
810 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
813 #ifndef configAPPLICATION_ALLOCATED_HEAP
814 #define configAPPLICATION_ALLOCATED_HEAP 0
817 #ifndef configUSE_TASK_NOTIFICATIONS
818 #define configUSE_TASK_NOTIFICATIONS 1
821 #ifndef configUSE_POSIX_ERRNO
822 #define configUSE_POSIX_ERRNO 0
825 #ifndef portTICK_TYPE_IS_ATOMIC
826 #define portTICK_TYPE_IS_ATOMIC 0
829 #ifndef configSUPPORT_STATIC_ALLOCATION
830 /* Defaults to 0 for backward compatibility. */
831 #define configSUPPORT_STATIC_ALLOCATION 0
834 #ifndef configSUPPORT_DYNAMIC_ALLOCATION
835 /* Defaults to 1 for backward compatibility. */
836 #define configSUPPORT_DYNAMIC_ALLOCATION 1
839 #ifndef configSTACK_DEPTH_TYPE
840 /* Defaults to uint16_t for backward compatibility, but can be overridden
841 in FreeRTOSConfig.h if uint16_t is too restrictive. */
842 #define configSTACK_DEPTH_TYPE uint16_t
845 #ifndef configMESSAGE_BUFFER_LENGTH_TYPE
846 /* Defaults to size_t for backward compatibility, but can be overridden
847 in FreeRTOSConfig.h if lengths will always be less than the number of bytes
849 #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
852 /* Sanity check the configuration. */
853 #if( configUSE_TICKLESS_IDLE != 0 )
854 #if( INCLUDE_vTaskSuspend != 1 )
855 #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0
856 #endif /* INCLUDE_vTaskSuspend */
857 #endif /* configUSE_TICKLESS_IDLE */
859 #if( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
860 #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
863 #if( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )
864 #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
867 #ifndef configINITIAL_TICK_COUNT
868 #define configINITIAL_TICK_COUNT 0
871 #if( portTICK_TYPE_IS_ATOMIC == 0 )
872 /* Either variables of tick type cannot be read atomically, or
873 portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
874 the tick count is returned to the standard critical section macros. */
875 #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
876 #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
877 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
878 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
880 /* The tick type can be read atomically, so critical sections used when the
881 tick count is returned can be defined away. */
882 #define portTICK_TYPE_ENTER_CRITICAL()
883 #define portTICK_TYPE_EXIT_CRITICAL()
884 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
885 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
888 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
890 #ifndef configENABLE_BACKWARD_COMPATIBILITY
891 #define configENABLE_BACKWARD_COMPATIBILITY 1
895 /* configPRINTF() was not defined, so define it away to nothing. To use
896 configPRINTF() then define it as follows (where MyPrintFunction() is
897 provided by the application writer):
899 void MyPrintFunction(const char *pcFormat, ... );
900 #define configPRINTF( X ) MyPrintFunction X
902 Then call like a standard printf() function, but placing brackets around
903 all parameters so they are passed as a single parameter. For example:
904 configPRINTF( ("Value = %d", MyVariable) ); */
905 #define configPRINTF( X )
909 /* The application writer has not provided their own MAX macro, so define
910 the following generic implementation. */
911 #define configMAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
915 /* The application writer has not provided their own MAX macro, so define
916 the following generic implementation. */
917 #define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
920 #if configENABLE_BACKWARD_COMPATIBILITY == 1
921 #define eTaskStateGet eTaskGetState
922 #define portTickType TickType_t
923 #define xTaskHandle TaskHandle_t
924 #define xQueueHandle QueueHandle_t
925 #define xSemaphoreHandle SemaphoreHandle_t
926 #define xQueueSetHandle QueueSetHandle_t
927 #define xQueueSetMemberHandle QueueSetMemberHandle_t
928 #define xTimeOutType TimeOut_t
929 #define xMemoryRegion MemoryRegion_t
930 #define xTaskParameters TaskParameters_t
931 #define xTaskStatusType TaskStatus_t
932 #define xTimerHandle TimerHandle_t
933 #define xCoRoutineHandle CoRoutineHandle_t
934 #define pdTASK_HOOK_CODE TaskHookFunction_t
935 #define portTICK_RATE_MS portTICK_PERIOD_MS
936 #define pcTaskGetTaskName pcTaskGetName
937 #define pcTimerGetTimerName pcTimerGetName
938 #define pcQueueGetQueueName pcQueueGetName
939 #define vTaskGetTaskInfo vTaskGetInfo
941 /* Backward compatibility within the scheduler code only - these definitions
942 are not really required but are included for completeness. */
943 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
944 #define pdTASK_CODE TaskFunction_t
945 #define xListItem ListItem_t
948 /* For libraries that break the list data hiding, and access list structure
949 members directly (which is not supposed to be done). */
950 #define pxContainer pvContainer
951 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
953 #if( configUSE_ALTERNATIVE_API != 0 )
954 #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0
957 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
958 if floating point hardware is otherwise supported by the FreeRTOS port in use.
959 This constant is not supported by all FreeRTOS ports that include floating
961 #ifndef configUSE_TASK_FPU_SUPPORT
962 #define configUSE_TASK_FPU_SUPPORT 1
965 /* Set configENABLE_MPU to 1 to enable MPU support and 0 to disable it. This is
966 currently used in ARMv8M ports. */
967 #ifndef configENABLE_MPU
968 #define configENABLE_MPU 0
971 /* Set configENABLE_FPU to 1 to enable FPU support and 0 to disable it. This is
972 currently used in ARMv8M ports. */
973 #ifndef configENABLE_FPU
974 #define configENABLE_FPU 1
977 /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it.
978 This is currently used in ARMv8M ports. */
979 #ifndef configENABLE_TRUSTZONE
980 #define configENABLE_TRUSTZONE 1
983 /* Set configRUN_FREERTOS_SECURE_ONLY to 1 to run the FreeRTOS ARMv8M port on
984 the Secure Side only. */
985 #ifndef configRUN_FREERTOS_SECURE_ONLY
986 #define configRUN_FREERTOS_SECURE_ONLY 0
989 /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
990 * dynamically allocated RAM, in which case when any task is deleted it is known
991 * that both the task's stack and TCB need to be freed. Sometimes the
992 * FreeRTOSConfig.h settings only allow a task to be created using statically
993 * allocated RAM, in which case when any task is deleted it is known that neither
994 * the task's stack or TCB should be freed. Sometimes the FreeRTOSConfig.h
995 * settings allow a task to be created using either statically or dynamically
996 * allocated RAM, in which case a member of the TCB is used to record whether the
997 * stack and/or TCB were allocated statically or dynamically, so when a task is
998 * deleted the RAM that was allocated dynamically is freed again and no attempt is
999 * made to free the RAM that was allocated statically.
1000 * tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a
1001 * task to be created using either statically or dynamically allocated RAM. Note
1002 * that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with
1003 * a statically allocated stack and a dynamically allocated TCB.
1005 * The following table lists various combinations of portUSING_MPU_WRAPPERS,
1006 * configSUPPORT_DYNAMIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION and
1007 * when it is possible to have both static and dynamic allocation:
1008 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1009 * | MPU | Dynamic | Static | Available Functions | Possible Allocations | Both Dynamic and | Need Free |
1010 * | | | | | | Static Possible | |
1011 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1012 * | 0 | 0 | 1 | xTaskCreateStatic | TCB - Static, Stack - Static | No | No |
1013 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1014 * | 0 | 1 | 0 | xTaskCreate | TCB - Dynamic, Stack - Dynamic | No | Yes |
1015 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1016 * | 0 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1017 * | | | | xTaskCreateStatic | 2. TCB - Static, Stack - Static | | |
1018 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1019 * | 1 | 0 | 1 | xTaskCreateStatic, | TCB - Static, Stack - Static | No | No |
1020 * | | | | xTaskCreateRestrictedStatic | | | |
1021 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1022 * | 1 | 1 | 0 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1023 * | | | | xTaskCreateRestricted | 2. TCB - Dynamic, Stack - Static | | |
1024 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1025 * | 1 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1026 * | | | | xTaskCreateStatic, | 2. TCB - Dynamic, Stack - Static | | |
1027 * | | | | xTaskCreateRestricted, | 3. TCB - Static, Stack - Static | | |
1028 * | | | | xTaskCreateRestrictedStatic | | | |
1029 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1031 #define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE ( ( ( portUSING_MPU_WRAPPERS == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) || \
1032 ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) )
1035 * In line with software engineering best practice, FreeRTOS implements a strict
1036 * data hiding policy, so the real structures used by FreeRTOS to maintain the
1037 * state of tasks, queues, semaphores, etc. are not accessible to the application
1038 * code. However, if the application writer wants to statically allocate such
1039 * an object then the size of the object needs to be know. Dummy structures
1040 * that are guaranteed to have the same size and alignment requirements of the
1041 * real objects are used for this purpose. The dummy list and list item
1042 * structures below are used for inclusion in such a dummy structure.
1044 struct xSTATIC_LIST_ITEM
1046 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1050 void *pvDummy3[ 4 ];
1051 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1055 typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
1057 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1058 struct xSTATIC_MINI_LIST_ITEM
1060 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1064 void *pvDummy3[ 2 ];
1066 typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
1068 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1069 typedef struct xSTATIC_LIST
1071 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1074 UBaseType_t uxDummy2;
1076 StaticMiniListItem_t xDummy4;
1077 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1083 * In line with software engineering best practice, especially when supplying a
1084 * library that is likely to change in future versions, FreeRTOS implements a
1085 * strict data hiding policy. This means the Task structure used internally by
1086 * FreeRTOS is not accessible to application code. However, if the application
1087 * writer wants to statically allocate the memory required to create a task then
1088 * the size of the task object needs to be know. The StaticTask_t structure
1089 * below is provided for this purpose. Its sizes and alignment requirements are
1090 * guaranteed to match those of the genuine structure, no matter which
1091 * architecture is being used, and no matter how the values in FreeRTOSConfig.h
1092 * are set. Its contents are somewhat obfuscated in the hope users will
1093 * recognise that it would be unwise to make direct use of the structure members.
1095 typedef struct xSTATIC_TCB
1098 #if ( portUSING_MPU_WRAPPERS == 1 )
1099 xMPU_SETTINGS xDummy2;
1101 StaticListItem_t xDummy3[ 2 ];
1102 UBaseType_t uxDummy5;
1104 uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
1105 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
1108 #if ( portCRITICAL_NESTING_IN_TCB == 1 )
1109 UBaseType_t uxDummy9;
1111 #if ( configUSE_TRACE_FACILITY == 1 )
1112 UBaseType_t uxDummy10[ 2 ];
1114 #if ( configUSE_MUTEXES == 1 )
1115 UBaseType_t uxDummy12[ 2 ];
1117 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
1120 #if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
1121 void *pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
1123 #if ( configGENERATE_RUN_TIME_STATS == 1 )
1126 #if ( configUSE_NEWLIB_REENTRANT == 1 )
1127 struct _reent xDummy17;
1129 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1133 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
1137 #if( INCLUDE_xTaskAbortDelay == 1 )
1140 #if ( configUSE_POSIX_ERRNO == 1 )
1146 * In line with software engineering best practice, especially when supplying a
1147 * library that is likely to change in future versions, FreeRTOS implements a
1148 * strict data hiding policy. This means the Queue structure used internally by
1149 * FreeRTOS is not accessible to application code. However, if the application
1150 * writer wants to statically allocate the memory required to create a queue
1151 * then the size of the queue object needs to be know. The StaticQueue_t
1152 * structure below is provided for this purpose. Its sizes and alignment
1153 * requirements are guaranteed to match those of the genuine structure, no
1154 * matter which architecture is being used, and no matter how the values in
1155 * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope
1156 * users will recognise that it would be unwise to make direct use of the
1157 * structure members.
1159 typedef struct xSTATIC_QUEUE
1161 void *pvDummy1[ 3 ];
1166 UBaseType_t uxDummy2;
1169 StaticList_t xDummy3[ 2 ];
1170 UBaseType_t uxDummy4[ 3 ];
1171 uint8_t ucDummy5[ 2 ];
1173 #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1177 #if ( configUSE_QUEUE_SETS == 1 )
1181 #if ( configUSE_TRACE_FACILITY == 1 )
1182 UBaseType_t uxDummy8;
1187 typedef StaticQueue_t StaticSemaphore_t;
1190 * In line with software engineering best practice, especially when supplying a
1191 * library that is likely to change in future versions, FreeRTOS implements a
1192 * strict data hiding policy. This means the event group structure used
1193 * internally by FreeRTOS is not accessible to application code. However, if
1194 * the application writer wants to statically allocate the memory required to
1195 * create an event group then the size of the event group object needs to be
1196 * know. The StaticEventGroup_t structure below is provided for this purpose.
1197 * Its sizes and alignment requirements are guaranteed to match those of the
1198 * genuine structure, no matter which architecture is being used, and no matter
1199 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
1200 * obfuscated in the hope users will recognise that it would be unwise to make
1201 * direct use of the structure members.
1203 typedef struct xSTATIC_EVENT_GROUP
1206 StaticList_t xDummy2;
1208 #if( configUSE_TRACE_FACILITY == 1 )
1209 UBaseType_t uxDummy3;
1212 #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1216 } StaticEventGroup_t;
1219 * In line with software engineering best practice, especially when supplying a
1220 * library that is likely to change in future versions, FreeRTOS implements a
1221 * strict data hiding policy. This means the software timer structure used
1222 * internally by FreeRTOS is not accessible to application code. However, if
1223 * the application writer wants to statically allocate the memory required to
1224 * create a software timer then the size of the queue object needs to be know.
1225 * The StaticTimer_t structure below is provided for this purpose. Its sizes
1226 * and alignment requirements are guaranteed to match those of the genuine
1227 * structure, no matter which architecture is being used, and no matter how the
1228 * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in
1229 * the hope users will recognise that it would be unwise to make direct use of
1230 * the structure members.
1232 typedef struct xSTATIC_TIMER
1235 StaticListItem_t xDummy2;
1238 TaskFunction_t pvDummy6;
1239 #if( configUSE_TRACE_FACILITY == 1 )
1240 UBaseType_t uxDummy7;
1247 * In line with software engineering best practice, especially when supplying a
1248 * library that is likely to change in future versions, FreeRTOS implements a
1249 * strict data hiding policy. This means the stream buffer structure used
1250 * internally by FreeRTOS is not accessible to application code. However, if
1251 * the application writer wants to statically allocate the memory required to
1252 * create a stream buffer then the size of the stream buffer object needs to be
1253 * know. The StaticStreamBuffer_t structure below is provided for this purpose.
1254 * Its size and alignment requirements are guaranteed to match those of the
1255 * genuine structure, no matter which architecture is being used, and no matter
1256 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
1257 * obfuscated in the hope users will recognise that it would be unwise to make
1258 * direct use of the structure members.
1260 typedef struct xSTATIC_STREAM_BUFFER
1262 size_t uxDummy1[ 4 ];
1263 void * pvDummy2[ 3 ];
1265 #if ( configUSE_TRACE_FACILITY == 1 )
1266 UBaseType_t uxDummy4;
1268 } StaticStreamBuffer_t;
1270 /* Message buffers are built on stream buffers. */
1271 typedef StaticStreamBuffer_t StaticMessageBuffer_t;
1277 #endif /* INC_FREERTOS_H */