2 * FreeRTOS Kernel V10.4.6
3 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 * SPDX-License-Identifier: MIT
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * https://www.FreeRTOS.org
25 * https://github.com/FreeRTOS
29 #ifndef INC_FREERTOS_H
30 #define INC_FREERTOS_H
33 * Include the generic headers required for the FreeRTOS port being used.
38 * If stdint.h cannot be located then:
39 * + If using GCC ensure the -nostdint options is *not* being used.
40 * + Ensure the project's include path includes the directory in which your
41 * compiler stores stdint.h.
42 * + Set any compiler options necessary for it to support C99, as technically
43 * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
45 * + The FreeRTOS download includes a simple stdint.h definition that can be
46 * used in cases where none is provided by the compiler. The files only
47 * contains the typedefs required to build FreeRTOS. Read the instructions
48 * in FreeRTOS/source/stdint.readme for more information.
50 #include <stdint.h> /* READ COMMENT ABOVE. */
58 /* Application specific configuration options. */
59 #include "FreeRTOSConfig.h"
61 /* Basic FreeRTOS definitions. */
64 /* Definitions specific to the port being used. */
67 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */
68 #ifndef configUSE_NEWLIB_REENTRANT
69 #define configUSE_NEWLIB_REENTRANT 0
72 /* Required if struct _reent is used. */
73 #if ( configUSE_NEWLIB_REENTRANT == 1 )
78 * Check all the required application specific macros have been defined.
79 * These macros are application specific and (as downloaded) are defined
80 * within FreeRTOSConfig.h.
83 #ifndef configMINIMAL_STACK_SIZE
84 #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.
87 #ifndef configMAX_PRIORITIES
88 #error Missing definition: configMAX_PRIORITIES must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
91 #if configMAX_PRIORITIES < 1
92 #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
95 #ifndef configUSE_PREEMPTION
96 #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.
99 #ifndef configUSE_IDLE_HOOK
100 #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.
103 #ifndef configUSE_TICK_HOOK
104 #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.
107 #ifndef configUSE_16_BIT_TICKS
108 #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.
111 #ifndef configUSE_CO_ROUTINES
112 #define configUSE_CO_ROUTINES 0
115 #ifndef INCLUDE_vTaskPrioritySet
116 #define INCLUDE_vTaskPrioritySet 0
119 #ifndef INCLUDE_uxTaskPriorityGet
120 #define INCLUDE_uxTaskPriorityGet 0
123 #ifndef INCLUDE_vTaskDelete
124 #define INCLUDE_vTaskDelete 0
127 #ifndef INCLUDE_vTaskSuspend
128 #define INCLUDE_vTaskSuspend 0
131 #ifdef INCLUDE_xTaskDelayUntil
132 #ifdef INCLUDE_vTaskDelayUntil
134 /* INCLUDE_vTaskDelayUntil was replaced by INCLUDE_xTaskDelayUntil. Backward
135 * compatibility is maintained if only one or the other is defined, but
136 * there is a conflict if both are defined. */
137 #error INCLUDE_vTaskDelayUntil and INCLUDE_xTaskDelayUntil are both defined. INCLUDE_vTaskDelayUntil is no longer required and should be removed
141 #ifndef INCLUDE_xTaskDelayUntil
142 #ifdef INCLUDE_vTaskDelayUntil
144 /* If INCLUDE_vTaskDelayUntil is set but INCLUDE_xTaskDelayUntil is not then
145 * the project's FreeRTOSConfig.h probably pre-dates the introduction of
146 * xTaskDelayUntil and setting INCLUDE_xTaskDelayUntil to whatever
147 * INCLUDE_vTaskDelayUntil is set to will ensure backward compatibility.
149 #define INCLUDE_xTaskDelayUntil INCLUDE_vTaskDelayUntil
153 #ifndef INCLUDE_xTaskDelayUntil
154 #define INCLUDE_xTaskDelayUntil 0
157 #ifndef INCLUDE_vTaskDelay
158 #define INCLUDE_vTaskDelay 0
161 #ifndef INCLUDE_xTaskGetIdleTaskHandle
162 #define INCLUDE_xTaskGetIdleTaskHandle 0
165 #ifndef INCLUDE_xTaskAbortDelay
166 #define INCLUDE_xTaskAbortDelay 0
169 #ifndef INCLUDE_xQueueGetMutexHolder
170 #define INCLUDE_xQueueGetMutexHolder 0
173 #ifndef INCLUDE_xSemaphoreGetMutexHolder
174 #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
177 #ifndef INCLUDE_xTaskGetHandle
178 #define INCLUDE_xTaskGetHandle 0
181 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
182 #define INCLUDE_uxTaskGetStackHighWaterMark 0
185 #ifndef INCLUDE_uxTaskGetStackHighWaterMark2
186 #define INCLUDE_uxTaskGetStackHighWaterMark2 0
189 #ifndef INCLUDE_eTaskGetState
190 #define INCLUDE_eTaskGetState 0
193 #ifndef INCLUDE_xTaskResumeFromISR
194 #define INCLUDE_xTaskResumeFromISR 1
197 #ifndef INCLUDE_xTimerPendFunctionCall
198 #define INCLUDE_xTimerPendFunctionCall 0
201 #ifndef INCLUDE_xTaskGetSchedulerState
202 #define INCLUDE_xTaskGetSchedulerState 0
205 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
206 #define INCLUDE_xTaskGetCurrentTaskHandle 0
209 #if configUSE_CO_ROUTINES != 0
210 #ifndef configMAX_CO_ROUTINE_PRIORITIES
211 #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
215 #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
216 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
219 #ifndef configUSE_APPLICATION_TASK_TAG
220 #define configUSE_APPLICATION_TASK_TAG 0
223 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
224 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
227 #ifndef configUSE_RECURSIVE_MUTEXES
228 #define configUSE_RECURSIVE_MUTEXES 0
231 #ifndef configUSE_MUTEXES
232 #define configUSE_MUTEXES 0
235 #ifndef configUSE_TIMERS
236 #define configUSE_TIMERS 0
239 #ifndef configUSE_COUNTING_SEMAPHORES
240 #define configUSE_COUNTING_SEMAPHORES 0
243 #ifndef configUSE_ALTERNATIVE_API
244 #define configUSE_ALTERNATIVE_API 0
247 #ifndef portCRITICAL_NESTING_IN_TCB
248 #define portCRITICAL_NESTING_IN_TCB 0
251 #ifndef configMAX_TASK_NAME_LEN
252 #define configMAX_TASK_NAME_LEN 16
255 #ifndef configIDLE_SHOULD_YIELD
256 #define configIDLE_SHOULD_YIELD 1
259 #if configMAX_TASK_NAME_LEN < 1
260 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
264 #define configASSERT( x )
265 #define configASSERT_DEFINED 0
267 #define configASSERT_DEFINED 1
270 /* configPRECONDITION should be defined as configASSERT.
271 * The CBMC proofs need a way to track assumptions and assertions.
272 * A configPRECONDITION statement should express an implicit invariant or
273 * assumption made. A configASSERT statement should express an invariant that must
274 * hold explicit before calling the code. */
275 #ifndef configPRECONDITION
276 #define configPRECONDITION( X ) configASSERT( X )
277 #define configPRECONDITION_DEFINED 0
279 #define configPRECONDITION_DEFINED 1
282 #ifndef portMEMORY_BARRIER
283 #define portMEMORY_BARRIER()
286 #ifndef portSOFTWARE_BARRIER
287 #define portSOFTWARE_BARRIER()
290 /* The timers module relies on xTaskGetSchedulerState(). */
291 #if configUSE_TIMERS == 1
293 #ifndef configTIMER_TASK_PRIORITY
294 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
295 #endif /* configTIMER_TASK_PRIORITY */
297 #ifndef configTIMER_QUEUE_LENGTH
298 #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
299 #endif /* configTIMER_QUEUE_LENGTH */
301 #ifndef configTIMER_TASK_STACK_DEPTH
302 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
303 #endif /* configTIMER_TASK_STACK_DEPTH */
305 #endif /* configUSE_TIMERS */
307 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
308 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
311 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
312 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
315 #ifndef portCLEAN_UP_TCB
316 #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
319 #ifndef portPRE_TASK_DELETE_HOOK
320 #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
323 #ifndef portSETUP_TCB
324 #define portSETUP_TCB( pxTCB ) ( void ) pxTCB
327 #ifndef configQUEUE_REGISTRY_SIZE
328 #define configQUEUE_REGISTRY_SIZE 0U
331 #if ( configQUEUE_REGISTRY_SIZE < 1 )
332 #define vQueueAddToRegistry( xQueue, pcName )
333 #define vQueueUnregisterQueue( xQueue )
334 #define pcQueueGetName( xQueue )
337 #ifndef portPOINTER_SIZE_TYPE
338 #define portPOINTER_SIZE_TYPE uint32_t
341 /* Remove any unused trace macros. */
344 /* Used to perform any necessary initialisation - for example, open a file
345 * into which trace is to be written. */
351 /* Use to close a trace, for example close a file into which trace has been
356 #ifndef traceTASK_SWITCHED_IN
358 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
359 * to the task control block of the selected task. */
360 #define traceTASK_SWITCHED_IN()
363 #ifndef traceINCREASE_TICK_COUNT
365 /* Called before stepping the tick count after waking from tickless idle
367 #define traceINCREASE_TICK_COUNT( x )
370 #ifndef traceLOW_POWER_IDLE_BEGIN
371 /* Called immediately before entering tickless idle. */
372 #define traceLOW_POWER_IDLE_BEGIN()
375 #ifndef traceLOW_POWER_IDLE_END
376 /* Called when returning to the Idle task after a tickless idle. */
377 #define traceLOW_POWER_IDLE_END()
380 #ifndef traceTASK_SWITCHED_OUT
382 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
383 * to the task control block of the task being switched out. */
384 #define traceTASK_SWITCHED_OUT()
387 #ifndef traceTASK_PRIORITY_INHERIT
389 /* Called when a task attempts to take a mutex that is already held by a
390 * lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
391 * that holds the mutex. uxInheritedPriority is the priority the mutex holder
392 * will inherit (the priority of the task that is attempting to obtain the
394 #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
397 #ifndef traceTASK_PRIORITY_DISINHERIT
399 /* Called when a task releases a mutex, the holding of which had resulted in
400 * the task inheriting the priority of a higher priority task.
401 * pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
402 * mutex. uxOriginalPriority is the task's configured (base) priority. */
403 #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
406 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
408 /* Task is about to block because it cannot read from a
409 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
410 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
411 * task that attempted the read. */
412 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
415 #ifndef traceBLOCKING_ON_QUEUE_PEEK
417 /* Task is about to block because it cannot read from a
418 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
419 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
420 * task that attempted the read. */
421 #define traceBLOCKING_ON_QUEUE_PEEK( pxQueue )
424 #ifndef traceBLOCKING_ON_QUEUE_SEND
426 /* Task is about to block because it cannot write to a
427 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
428 * upon which the write was attempted. pxCurrentTCB points to the TCB of the
429 * task that attempted the write. */
430 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
433 #ifndef configCHECK_FOR_STACK_OVERFLOW
434 #define configCHECK_FOR_STACK_OVERFLOW 0
437 #ifndef configRECORD_STACK_HIGH_ADDRESS
438 #define configRECORD_STACK_HIGH_ADDRESS 0
441 #ifndef configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H
442 #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 0
445 /* The following event macros are embedded in the kernel API calls. */
447 #ifndef traceMOVED_TASK_TO_READY_STATE
448 #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
451 #ifndef tracePOST_MOVED_TASK_TO_READY_STATE
452 #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
455 #ifndef traceQUEUE_CREATE
456 #define traceQUEUE_CREATE( pxNewQueue )
459 #ifndef traceQUEUE_CREATE_FAILED
460 #define traceQUEUE_CREATE_FAILED( ucQueueType )
463 #ifndef traceCREATE_MUTEX
464 #define traceCREATE_MUTEX( pxNewQueue )
467 #ifndef traceCREATE_MUTEX_FAILED
468 #define traceCREATE_MUTEX_FAILED()
471 #ifndef traceGIVE_MUTEX_RECURSIVE
472 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
475 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
476 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
479 #ifndef traceTAKE_MUTEX_RECURSIVE
480 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
483 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
484 #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
487 #ifndef traceCREATE_COUNTING_SEMAPHORE
488 #define traceCREATE_COUNTING_SEMAPHORE()
491 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
492 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
495 #ifndef traceQUEUE_SET_SEND
496 #define traceQUEUE_SET_SEND traceQUEUE_SEND
499 #ifndef traceQUEUE_SEND
500 #define traceQUEUE_SEND( pxQueue )
503 #ifndef traceQUEUE_SEND_FAILED
504 #define traceQUEUE_SEND_FAILED( pxQueue )
507 #ifndef traceQUEUE_RECEIVE
508 #define traceQUEUE_RECEIVE( pxQueue )
511 #ifndef traceQUEUE_PEEK
512 #define traceQUEUE_PEEK( pxQueue )
515 #ifndef traceQUEUE_PEEK_FAILED
516 #define traceQUEUE_PEEK_FAILED( pxQueue )
519 #ifndef traceQUEUE_PEEK_FROM_ISR
520 #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
523 #ifndef traceQUEUE_RECEIVE_FAILED
524 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
527 #ifndef traceQUEUE_SEND_FROM_ISR
528 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
531 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
532 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
535 #ifndef traceQUEUE_RECEIVE_FROM_ISR
536 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
539 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
540 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
543 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
544 #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
547 #ifndef traceQUEUE_DELETE
548 #define traceQUEUE_DELETE( pxQueue )
551 #ifndef traceTASK_CREATE
552 #define traceTASK_CREATE( pxNewTCB )
555 #ifndef traceTASK_CREATE_FAILED
556 #define traceTASK_CREATE_FAILED()
559 #ifndef traceTASK_DELETE
560 #define traceTASK_DELETE( pxTaskToDelete )
563 #ifndef traceTASK_DELAY_UNTIL
564 #define traceTASK_DELAY_UNTIL( x )
567 #ifndef traceTASK_DELAY
568 #define traceTASK_DELAY()
571 #ifndef traceTASK_PRIORITY_SET
572 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
575 #ifndef traceTASK_SUSPEND
576 #define traceTASK_SUSPEND( pxTaskToSuspend )
579 #ifndef traceTASK_RESUME
580 #define traceTASK_RESUME( pxTaskToResume )
583 #ifndef traceTASK_RESUME_FROM_ISR
584 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
587 #ifndef traceTASK_INCREMENT_TICK
588 #define traceTASK_INCREMENT_TICK( xTickCount )
591 #ifndef traceTIMER_CREATE
592 #define traceTIMER_CREATE( pxNewTimer )
595 #ifndef traceTIMER_CREATE_FAILED
596 #define traceTIMER_CREATE_FAILED()
599 #ifndef traceTIMER_COMMAND_SEND
600 #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
603 #ifndef traceTIMER_EXPIRED
604 #define traceTIMER_EXPIRED( pxTimer )
607 #ifndef traceTIMER_COMMAND_RECEIVED
608 #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
612 #define traceMALLOC( pvAddress, uiSize )
616 #define traceFREE( pvAddress, uiSize )
619 #ifndef traceEVENT_GROUP_CREATE
620 #define traceEVENT_GROUP_CREATE( xEventGroup )
623 #ifndef traceEVENT_GROUP_CREATE_FAILED
624 #define traceEVENT_GROUP_CREATE_FAILED()
627 #ifndef traceEVENT_GROUP_SYNC_BLOCK
628 #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
631 #ifndef traceEVENT_GROUP_SYNC_END
632 #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
635 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
636 #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
639 #ifndef traceEVENT_GROUP_WAIT_BITS_END
640 #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
643 #ifndef traceEVENT_GROUP_CLEAR_BITS
644 #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
647 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
648 #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
651 #ifndef traceEVENT_GROUP_SET_BITS
652 #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
655 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
656 #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
659 #ifndef traceEVENT_GROUP_DELETE
660 #define traceEVENT_GROUP_DELETE( xEventGroup )
663 #ifndef tracePEND_FUNC_CALL
664 #define tracePEND_FUNC_CALL( xFunctionToPend, pvParameter1, ulParameter2, ret )
667 #ifndef tracePEND_FUNC_CALL_FROM_ISR
668 #define tracePEND_FUNC_CALL_FROM_ISR( xFunctionToPend, pvParameter1, ulParameter2, ret )
671 #ifndef traceQUEUE_REGISTRY_ADD
672 #define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName )
675 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
676 #define traceTASK_NOTIFY_TAKE_BLOCK( uxIndexToWait )
679 #ifndef traceTASK_NOTIFY_TAKE
680 #define traceTASK_NOTIFY_TAKE( uxIndexToWait )
683 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
684 #define traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait )
687 #ifndef traceTASK_NOTIFY_WAIT
688 #define traceTASK_NOTIFY_WAIT( uxIndexToWait )
691 #ifndef traceTASK_NOTIFY
692 #define traceTASK_NOTIFY( uxIndexToNotify )
695 #ifndef traceTASK_NOTIFY_FROM_ISR
696 #define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
699 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
700 #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
703 #ifndef traceSTREAM_BUFFER_CREATE_FAILED
704 #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer )
707 #ifndef traceSTREAM_BUFFER_CREATE_STATIC_FAILED
708 #define traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer )
711 #ifndef traceSTREAM_BUFFER_CREATE
712 #define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer )
715 #ifndef traceSTREAM_BUFFER_DELETE
716 #define traceSTREAM_BUFFER_DELETE( xStreamBuffer )
719 #ifndef traceSTREAM_BUFFER_RESET
720 #define traceSTREAM_BUFFER_RESET( xStreamBuffer )
723 #ifndef traceBLOCKING_ON_STREAM_BUFFER_SEND
724 #define traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer )
727 #ifndef traceSTREAM_BUFFER_SEND
728 #define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent )
731 #ifndef traceSTREAM_BUFFER_SEND_FAILED
732 #define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer )
735 #ifndef traceSTREAM_BUFFER_SEND_FROM_ISR
736 #define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent )
739 #ifndef traceBLOCKING_ON_STREAM_BUFFER_RECEIVE
740 #define traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer )
743 #ifndef traceSTREAM_BUFFER_RECEIVE
744 #define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength )
747 #ifndef traceSTREAM_BUFFER_RECEIVE_FAILED
748 #define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer )
751 #ifndef traceSTREAM_BUFFER_RECEIVE_FROM_ISR
752 #define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
755 #ifndef configGENERATE_RUN_TIME_STATS
756 #define configGENERATE_RUN_TIME_STATS 0
759 #if ( configGENERATE_RUN_TIME_STATS == 1 )
761 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
762 #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.
763 #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
765 #ifndef portGET_RUN_TIME_COUNTER_VALUE
766 #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
767 #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.
768 #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
769 #endif /* portGET_RUN_TIME_COUNTER_VALUE */
771 #endif /* configGENERATE_RUN_TIME_STATS */
773 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
774 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
777 #ifndef configUSE_MALLOC_FAILED_HOOK
778 #define configUSE_MALLOC_FAILED_HOOK 0
781 #ifndef portPRIVILEGE_BIT
782 #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
785 #ifndef portYIELD_WITHIN_API
786 #define portYIELD_WITHIN_API portYIELD
789 #ifndef portSUPPRESS_TICKS_AND_SLEEP
790 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
793 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
794 #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
797 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
798 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
801 #ifndef configUSE_TICKLESS_IDLE
802 #define configUSE_TICKLESS_IDLE 0
805 #ifndef configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING
806 #define configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING( x )
809 #ifndef configPRE_SLEEP_PROCESSING
810 #define configPRE_SLEEP_PROCESSING( x )
813 #ifndef configPOST_SLEEP_PROCESSING
814 #define configPOST_SLEEP_PROCESSING( x )
817 #ifndef configUSE_QUEUE_SETS
818 #define configUSE_QUEUE_SETS 0
821 #ifndef portTASK_USES_FLOATING_POINT
822 #define portTASK_USES_FLOATING_POINT()
825 #ifndef portALLOCATE_SECURE_CONTEXT
826 #define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
829 #ifndef portDONT_DISCARD
830 #define portDONT_DISCARD
833 #ifndef configUSE_TIME_SLICING
834 #define configUSE_TIME_SLICING 1
837 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
838 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
841 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
842 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
845 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
846 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
849 #ifndef configUSE_TRACE_FACILITY
850 #define configUSE_TRACE_FACILITY 0
853 #ifndef mtCOVERAGE_TEST_MARKER
854 #define mtCOVERAGE_TEST_MARKER()
857 #ifndef mtCOVERAGE_TEST_DELAY
858 #define mtCOVERAGE_TEST_DELAY()
861 #ifndef portASSERT_IF_IN_ISR
862 #define portASSERT_IF_IN_ISR()
865 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
866 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
869 #ifndef configAPPLICATION_ALLOCATED_HEAP
870 #define configAPPLICATION_ALLOCATED_HEAP 0
873 #ifndef configUSE_TASK_NOTIFICATIONS
874 #define configUSE_TASK_NOTIFICATIONS 1
877 #ifndef configTASK_NOTIFICATION_ARRAY_ENTRIES
878 #define configTASK_NOTIFICATION_ARRAY_ENTRIES 1
881 #if configTASK_NOTIFICATION_ARRAY_ENTRIES < 1
882 #error configTASK_NOTIFICATION_ARRAY_ENTRIES must be at least 1
885 #ifndef configUSE_POSIX_ERRNO
886 #define configUSE_POSIX_ERRNO 0
889 #ifndef portTICK_TYPE_IS_ATOMIC
890 #define portTICK_TYPE_IS_ATOMIC 0
893 #ifndef configSUPPORT_STATIC_ALLOCATION
894 /* Defaults to 0 for backward compatibility. */
895 #define configSUPPORT_STATIC_ALLOCATION 0
898 #ifndef configSUPPORT_DYNAMIC_ALLOCATION
899 /* Defaults to 1 for backward compatibility. */
900 #define configSUPPORT_DYNAMIC_ALLOCATION 1
903 #ifndef configSTACK_DEPTH_TYPE
905 /* Defaults to uint16_t for backward compatibility, but can be overridden
906 * in FreeRTOSConfig.h if uint16_t is too restrictive. */
907 #define configSTACK_DEPTH_TYPE uint16_t
910 #ifndef configRUN_TIME_COUNTER_TYPE
912 /* Defaults to uint32_t for backward compatibility, but can be overridden in
913 * FreeRTOSConfig.h if uint32_t is too restrictive. */
915 #define configRUN_TIME_COUNTER_TYPE uint32_t
918 #ifndef configMESSAGE_BUFFER_LENGTH_TYPE
920 /* Defaults to size_t for backward compatibility, but can be overridden
921 * in FreeRTOSConfig.h if lengths will always be less than the number of bytes
923 #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
926 /* Sanity check the configuration. */
927 #if ( configUSE_TICKLESS_IDLE != 0 )
928 #if ( INCLUDE_vTaskSuspend != 1 )
929 #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0
930 #endif /* INCLUDE_vTaskSuspend */
931 #endif /* configUSE_TICKLESS_IDLE */
933 #if ( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
934 #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
937 #if ( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )
938 #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
941 #ifndef configINITIAL_TICK_COUNT
942 #define configINITIAL_TICK_COUNT 0
945 #if ( portTICK_TYPE_IS_ATOMIC == 0 )
947 /* Either variables of tick type cannot be read atomically, or
948 * portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
949 * the tick count is returned to the standard critical section macros. */
950 #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
951 #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
952 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
953 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
956 /* The tick type can be read atomically, so critical sections used when the
957 * tick count is returned can be defined away. */
958 #define portTICK_TYPE_ENTER_CRITICAL()
959 #define portTICK_TYPE_EXIT_CRITICAL()
960 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
961 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
962 #endif /* if ( portTICK_TYPE_IS_ATOMIC == 0 ) */
964 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
966 #ifndef configENABLE_BACKWARD_COMPATIBILITY
967 #define configENABLE_BACKWARD_COMPATIBILITY 1
972 /* configPRINTF() was not defined, so define it away to nothing. To use
973 * configPRINTF() then define it as follows (where MyPrintFunction() is
974 * provided by the application writer):
976 * void MyPrintFunction(const char *pcFormat, ... );
977 #define configPRINTF( X ) MyPrintFunction X
979 * Then call like a standard printf() function, but placing brackets around
980 * all parameters so they are passed as a single parameter. For example:
981 * configPRINTF( ("Value = %d", MyVariable) ); */
982 #define configPRINTF( X )
987 /* The application writer has not provided their own MAX macro, so define
988 * the following generic implementation. */
989 #define configMAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
994 /* The application writer has not provided their own MIN macro, so define
995 * the following generic implementation. */
996 #define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
999 #if configENABLE_BACKWARD_COMPATIBILITY == 1
1000 #define eTaskStateGet eTaskGetState
1001 #define portTickType TickType_t
1002 #define xTaskHandle TaskHandle_t
1003 #define xQueueHandle QueueHandle_t
1004 #define xSemaphoreHandle SemaphoreHandle_t
1005 #define xQueueSetHandle QueueSetHandle_t
1006 #define xQueueSetMemberHandle QueueSetMemberHandle_t
1007 #define xTimeOutType TimeOut_t
1008 #define xMemoryRegion MemoryRegion_t
1009 #define xTaskParameters TaskParameters_t
1010 #define xTaskStatusType TaskStatus_t
1011 #define xTimerHandle TimerHandle_t
1012 #define xCoRoutineHandle CoRoutineHandle_t
1013 #define pdTASK_HOOK_CODE TaskHookFunction_t
1014 #define portTICK_RATE_MS portTICK_PERIOD_MS
1015 #define pcTaskGetTaskName pcTaskGetName
1016 #define pcTimerGetTimerName pcTimerGetName
1017 #define pcQueueGetQueueName pcQueueGetName
1018 #define vTaskGetTaskInfo vTaskGetInfo
1019 #define xTaskGetIdleRunTimeCounter ulTaskGetIdleRunTimeCounter
1021 /* Backward compatibility within the scheduler code only - these definitions
1022 * are not really required but are included for completeness. */
1023 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
1024 #define pdTASK_CODE TaskFunction_t
1025 #define xListItem ListItem_t
1026 #define xList List_t
1028 /* For libraries that break the list data hiding, and access list structure
1029 * members directly (which is not supposed to be done). */
1030 #define pxContainer pvContainer
1031 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
1033 #if ( configUSE_ALTERNATIVE_API != 0 )
1034 #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0
1037 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
1038 * if floating point hardware is otherwise supported by the FreeRTOS port in use.
1039 * This constant is not supported by all FreeRTOS ports that include floating
1041 #ifndef configUSE_TASK_FPU_SUPPORT
1042 #define configUSE_TASK_FPU_SUPPORT 1
1045 /* Set configENABLE_MPU to 1 to enable MPU support and 0 to disable it. This is
1046 * currently used in ARMv8M ports. */
1047 #ifndef configENABLE_MPU
1048 #define configENABLE_MPU 0
1051 /* Set configENABLE_FPU to 1 to enable FPU support and 0 to disable it. This is
1052 * currently used in ARMv8M ports. */
1053 #ifndef configENABLE_FPU
1054 #define configENABLE_FPU 1
1057 /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it.
1058 * This is currently used in ARMv8M ports. */
1059 #ifndef configENABLE_TRUSTZONE
1060 #define configENABLE_TRUSTZONE 1
1063 /* Set configRUN_FREERTOS_SECURE_ONLY to 1 to run the FreeRTOS ARMv8M port on
1064 * the Secure Side only. */
1065 #ifndef configRUN_FREERTOS_SECURE_ONLY
1066 #define configRUN_FREERTOS_SECURE_ONLY 0
1069 #ifndef configRUN_ADDITIONAL_TESTS
1070 #define configRUN_ADDITIONAL_TESTS 0
1074 /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
1075 * dynamically allocated RAM, in which case when any task is deleted it is known
1076 * that both the task's stack and TCB need to be freed. Sometimes the
1077 * FreeRTOSConfig.h settings only allow a task to be created using statically
1078 * allocated RAM, in which case when any task is deleted it is known that neither
1079 * the task's stack or TCB should be freed. Sometimes the FreeRTOSConfig.h
1080 * settings allow a task to be created using either statically or dynamically
1081 * allocated RAM, in which case a member of the TCB is used to record whether the
1082 * stack and/or TCB were allocated statically or dynamically, so when a task is
1083 * deleted the RAM that was allocated dynamically is freed again and no attempt is
1084 * made to free the RAM that was allocated statically.
1085 * tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a
1086 * task to be created using either statically or dynamically allocated RAM. Note
1087 * that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with
1088 * a statically allocated stack and a dynamically allocated TCB.
1090 * The following table lists various combinations of portUSING_MPU_WRAPPERS,
1091 * configSUPPORT_DYNAMIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION and
1092 * when it is possible to have both static and dynamic allocation:
1093 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1094 * | MPU | Dynamic | Static | Available Functions | Possible Allocations | Both Dynamic and | Need Free |
1095 * | | | | | | Static Possible | |
1096 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1097 * | 0 | 0 | 1 | xTaskCreateStatic | TCB - Static, Stack - Static | No | No |
1098 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1099 * | 0 | 1 | 0 | xTaskCreate | TCB - Dynamic, Stack - Dynamic | No | Yes |
1100 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1101 * | 0 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1102 * | | | | xTaskCreateStatic | 2. TCB - Static, Stack - Static | | |
1103 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1104 * | 1 | 0 | 1 | xTaskCreateStatic, | TCB - Static, Stack - Static | No | No |
1105 * | | | | xTaskCreateRestrictedStatic | | | |
1106 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1107 * | 1 | 1 | 0 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1108 * | | | | xTaskCreateRestricted | 2. TCB - Dynamic, Stack - Static | | |
1109 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1110 * | 1 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1111 * | | | | xTaskCreateStatic, | 2. TCB - Dynamic, Stack - Static | | |
1112 * | | | | xTaskCreateRestricted, | 3. TCB - Static, Stack - Static | | |
1113 * | | | | xTaskCreateRestrictedStatic | | | |
1114 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1116 #define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE \
1117 ( ( ( portUSING_MPU_WRAPPERS == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) || \
1118 ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) )
1121 * In line with software engineering best practice, FreeRTOS implements a strict
1122 * data hiding policy, so the real structures used by FreeRTOS to maintain the
1123 * state of tasks, queues, semaphores, etc. are not accessible to the application
1124 * code. However, if the application writer wants to statically allocate such
1125 * an object then the size of the object needs to be known. Dummy structures
1126 * that are guaranteed to have the same size and alignment requirements of the
1127 * real objects are used for this purpose. The dummy list and list item
1128 * structures below are used for inclusion in such a dummy structure.
1130 struct xSTATIC_LIST_ITEM
1132 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1136 void * pvDummy3[ 4 ];
1137 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1141 typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
1143 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1144 struct xSTATIC_MINI_LIST_ITEM
1146 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1150 void * pvDummy3[ 2 ];
1152 typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
1154 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1155 typedef struct xSTATIC_LIST
1157 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1160 UBaseType_t uxDummy2;
1162 StaticMiniListItem_t xDummy4;
1163 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1169 * In line with software engineering best practice, especially when supplying a
1170 * library that is likely to change in future versions, FreeRTOS implements a
1171 * strict data hiding policy. This means the Task structure used internally by
1172 * FreeRTOS is not accessible to application code. However, if the application
1173 * writer wants to statically allocate the memory required to create a task then
1174 * the size of the task object needs to be known. The StaticTask_t structure
1175 * below is provided for this purpose. Its sizes and alignment requirements are
1176 * guaranteed to match those of the genuine structure, no matter which
1177 * architecture is being used, and no matter how the values in FreeRTOSConfig.h
1178 * are set. Its contents are somewhat obfuscated in the hope users will
1179 * recognise that it would be unwise to make direct use of the structure members.
1181 typedef struct xSTATIC_TCB
1184 #if ( portUSING_MPU_WRAPPERS == 1 )
1185 xMPU_SETTINGS xDummy2;
1187 StaticListItem_t xDummy3[ 2 ];
1188 UBaseType_t uxDummy5;
1190 uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
1191 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
1194 #if ( portCRITICAL_NESTING_IN_TCB == 1 )
1195 UBaseType_t uxDummy9;
1197 #if ( configUSE_TRACE_FACILITY == 1 )
1198 UBaseType_t uxDummy10[ 2 ];
1200 #if ( configUSE_MUTEXES == 1 )
1201 UBaseType_t uxDummy12[ 2 ];
1203 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
1206 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
1207 void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
1209 #if ( configGENERATE_RUN_TIME_STATS == 1 )
1210 configRUN_TIME_COUNTER_TYPE ulDummy16;
1212 #if ( configUSE_NEWLIB_REENTRANT == 1 )
1213 struct _reent xDummy17;
1215 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1216 uint32_t ulDummy18[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
1217 uint8_t ucDummy19[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
1219 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
1223 #if ( INCLUDE_xTaskAbortDelay == 1 )
1226 #if ( configUSE_POSIX_ERRNO == 1 )
1232 * In line with software engineering best practice, especially when supplying a
1233 * library that is likely to change in future versions, FreeRTOS implements a
1234 * strict data hiding policy. This means the Queue structure used internally by
1235 * FreeRTOS is not accessible to application code. However, if the application
1236 * writer wants to statically allocate the memory required to create a queue
1237 * then the size of the queue object needs to be known. The StaticQueue_t
1238 * structure below is provided for this purpose. Its sizes and alignment
1239 * requirements are guaranteed to match those of the genuine structure, no
1240 * matter which architecture is being used, and no matter how the values in
1241 * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope
1242 * users will recognise that it would be unwise to make direct use of the
1243 * structure members.
1245 typedef struct xSTATIC_QUEUE
1247 void * pvDummy1[ 3 ];
1252 UBaseType_t uxDummy2;
1255 StaticList_t xDummy3[ 2 ];
1256 UBaseType_t uxDummy4[ 3 ];
1257 uint8_t ucDummy5[ 2 ];
1259 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1263 #if ( configUSE_QUEUE_SETS == 1 )
1267 #if ( configUSE_TRACE_FACILITY == 1 )
1268 UBaseType_t uxDummy8;
1272 typedef StaticQueue_t StaticSemaphore_t;
1275 * In line with software engineering best practice, especially when supplying a
1276 * library that is likely to change in future versions, FreeRTOS implements a
1277 * strict data hiding policy. This means the event group structure used
1278 * internally by FreeRTOS is not accessible to application code. However, if
1279 * the application writer wants to statically allocate the memory required to
1280 * create an event group then the size of the event group object needs to be
1281 * know. The StaticEventGroup_t structure below is provided for this purpose.
1282 * Its sizes and alignment requirements are guaranteed to match those of the
1283 * genuine structure, no matter which architecture is being used, and no matter
1284 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
1285 * obfuscated in the hope users will recognise that it would be unwise to make
1286 * direct use of the structure members.
1288 typedef struct xSTATIC_EVENT_GROUP
1291 StaticList_t xDummy2;
1293 #if ( configUSE_TRACE_FACILITY == 1 )
1294 UBaseType_t uxDummy3;
1297 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1300 } StaticEventGroup_t;
1303 * In line with software engineering best practice, especially when supplying a
1304 * library that is likely to change in future versions, FreeRTOS implements a
1305 * strict data hiding policy. This means the software timer structure used
1306 * internally by FreeRTOS is not accessible to application code. However, if
1307 * the application writer wants to statically allocate the memory required to
1308 * create a software timer then the size of the queue object needs to be known.
1309 * The StaticTimer_t structure below is provided for this purpose. Its sizes
1310 * and alignment requirements are guaranteed to match those of the genuine
1311 * structure, no matter which architecture is being used, and no matter how the
1312 * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in
1313 * the hope users will recognise that it would be unwise to make direct use of
1314 * the structure members.
1316 typedef struct xSTATIC_TIMER
1319 StaticListItem_t xDummy2;
1322 TaskFunction_t pvDummy6;
1323 #if ( configUSE_TRACE_FACILITY == 1 )
1324 UBaseType_t uxDummy7;
1330 * In line with software engineering best practice, especially when supplying a
1331 * library that is likely to change in future versions, FreeRTOS implements a
1332 * strict data hiding policy. This means the stream buffer structure used
1333 * internally by FreeRTOS is not accessible to application code. However, if
1334 * the application writer wants to statically allocate the memory required to
1335 * create a stream buffer then the size of the stream buffer object needs to be
1336 * known. The StaticStreamBuffer_t structure below is provided for this
1337 * purpose. Its size and alignment requirements are guaranteed to match those
1338 * of the genuine structure, no matter which architecture is being used, and
1339 * no matter how the values in FreeRTOSConfig.h are set. Its contents are
1340 * somewhat obfuscated in the hope users will recognise that it would be unwise
1341 * to make direct use of the structure members.
1343 typedef struct xSTATIC_STREAM_BUFFER
1345 size_t uxDummy1[ 4 ];
1346 void * pvDummy2[ 3 ];
1348 #if ( configUSE_TRACE_FACILITY == 1 )
1349 UBaseType_t uxDummy4;
1351 } StaticStreamBuffer_t;
1353 /* Message buffers are built on stream buffers. */
1354 typedef StaticStreamBuffer_t StaticMessageBuffer_t;
1362 #endif /* INC_FREERTOS_H */