2 * FreeRTOS Kernel V10.3.1
\r
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
6 * this software and associated documentation files (the "Software"), to deal in
\r
7 * the Software without restriction, including without limitation the rights to
\r
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
9 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
10 * subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software.
\r
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
22 * http://www.FreeRTOS.org
\r
23 * http://aws.amazon.com/freertos
\r
27 #ifndef INC_FREERTOS_H
\r
28 #define INC_FREERTOS_H
\r
31 * Include the generic headers required for the FreeRTOS port being used.
\r
36 * If stdint.h cannot be located then:
\r
37 * + If using GCC ensure the -nostdint options is *not* being used.
\r
38 * + Ensure the project's include path includes the directory in which your
\r
39 * compiler stores stdint.h.
\r
40 * + Set any compiler options necessary for it to support C99, as technically
\r
41 * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
\r
43 * + The FreeRTOS download includes a simple stdint.h definition that can be
\r
44 * used in cases where none is provided by the compiler. The files only
\r
45 * contains the typedefs required to build FreeRTOS. Read the instructions
\r
46 * in FreeRTOS/source/stdint.readme for more information.
\r
48 #include <stdint.h> /* READ COMMENT ABOVE. */
\r
54 /* Application specific configuration options. */
\r
55 #include "FreeRTOSConfig.h"
\r
57 /* Basic FreeRTOS definitions. */
\r
58 #include "projdefs.h"
\r
60 /* Definitions specific to the port being used. */
\r
61 #include "portable.h"
\r
63 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */
\r
64 #ifndef configUSE_NEWLIB_REENTRANT
\r
65 #define configUSE_NEWLIB_REENTRANT 0
\r
68 /* Required if struct _reent is used. */
\r
69 #if ( configUSE_NEWLIB_REENTRANT == 1 )
\r
74 * Check all the required application specific macros have been defined.
\r
75 * These macros are application specific and (as downloaded) are defined
\r
76 * within FreeRTOSConfig.h.
\r
79 #ifndef configMINIMAL_STACK_SIZE
\r
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.
\r
83 #ifndef configMAX_PRIORITIES
\r
84 #error Missing definition: configMAX_PRIORITIES must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
\r
87 #if configMAX_PRIORITIES < 1
\r
88 #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
\r
91 #ifndef configUSE_PREEMPTION
\r
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.
\r
95 #ifndef configUSE_IDLE_HOOK
\r
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.
\r
99 #ifndef configUSE_TICK_HOOK
\r
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.
\r
103 #ifndef configUSE_16_BIT_TICKS
\r
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.
\r
107 #ifndef configUSE_CO_ROUTINES
\r
108 #define configUSE_CO_ROUTINES 0
\r
111 #ifndef INCLUDE_vTaskPrioritySet
\r
112 #define INCLUDE_vTaskPrioritySet 0
\r
115 #ifndef INCLUDE_uxTaskPriorityGet
\r
116 #define INCLUDE_uxTaskPriorityGet 0
\r
119 #ifndef INCLUDE_vTaskDelete
\r
120 #define INCLUDE_vTaskDelete 0
\r
123 #ifndef INCLUDE_vTaskSuspend
\r
124 #define INCLUDE_vTaskSuspend 0
\r
127 #ifndef INCLUDE_vTaskDelayUntil
\r
128 #define INCLUDE_vTaskDelayUntil 0
\r
131 #ifndef INCLUDE_vTaskDelay
\r
132 #define INCLUDE_vTaskDelay 0
\r
135 #ifndef INCLUDE_xTaskGetIdleTaskHandle
\r
136 #define INCLUDE_xTaskGetIdleTaskHandle 0
\r
139 #ifndef INCLUDE_xTaskAbortDelay
\r
140 #define INCLUDE_xTaskAbortDelay 0
\r
143 #ifndef INCLUDE_xQueueGetMutexHolder
\r
144 #define INCLUDE_xQueueGetMutexHolder 0
\r
147 #ifndef INCLUDE_xSemaphoreGetMutexHolder
\r
148 #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
\r
151 #ifndef INCLUDE_xTaskGetHandle
\r
152 #define INCLUDE_xTaskGetHandle 0
\r
155 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
\r
156 #define INCLUDE_uxTaskGetStackHighWaterMark 0
\r
159 #ifndef INCLUDE_uxTaskGetStackHighWaterMark2
\r
160 #define INCLUDE_uxTaskGetStackHighWaterMark2 0
\r
163 #ifndef INCLUDE_eTaskGetState
\r
164 #define INCLUDE_eTaskGetState 0
\r
167 #ifndef INCLUDE_xTaskResumeFromISR
\r
168 #define INCLUDE_xTaskResumeFromISR 1
\r
171 #ifndef INCLUDE_xTimerPendFunctionCall
\r
172 #define INCLUDE_xTimerPendFunctionCall 0
\r
175 #ifndef INCLUDE_xTaskGetSchedulerState
\r
176 #define INCLUDE_xTaskGetSchedulerState 0
\r
179 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
\r
180 #define INCLUDE_xTaskGetCurrentTaskHandle 0
\r
183 #if configUSE_CO_ROUTINES != 0
\r
184 #ifndef configMAX_CO_ROUTINE_PRIORITIES
\r
185 #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
\r
189 #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
\r
190 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
\r
193 #ifndef configUSE_APPLICATION_TASK_TAG
\r
194 #define configUSE_APPLICATION_TASK_TAG 0
\r
197 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
\r
198 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
\r
201 #ifndef configUSE_RECURSIVE_MUTEXES
\r
202 #define configUSE_RECURSIVE_MUTEXES 0
\r
205 #ifndef configUSE_MUTEXES
\r
206 #define configUSE_MUTEXES 0
\r
209 #ifndef configUSE_TIMERS
\r
210 #define configUSE_TIMERS 0
\r
213 #ifndef configUSE_COUNTING_SEMAPHORES
\r
214 #define configUSE_COUNTING_SEMAPHORES 0
\r
217 #ifndef configUSE_ALTERNATIVE_API
\r
218 #define configUSE_ALTERNATIVE_API 0
\r
221 #ifndef portCRITICAL_NESTING_IN_TCB
\r
222 #define portCRITICAL_NESTING_IN_TCB 0
\r
225 #ifndef configMAX_TASK_NAME_LEN
\r
226 #define configMAX_TASK_NAME_LEN 16
\r
229 #ifndef configIDLE_SHOULD_YIELD
\r
230 #define configIDLE_SHOULD_YIELD 1
\r
233 #if configMAX_TASK_NAME_LEN < 1
\r
234 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
\r
237 #ifndef configASSERT
\r
238 #define configASSERT( x )
\r
239 #define configASSERT_DEFINED 0
\r
241 #define configASSERT_DEFINED 1
\r
244 /* configPRECONDITION should be defined as configASSERT.
\r
245 * The CBMC proofs need a way to track assumptions and assertions.
\r
246 * A configPRECONDITION statement should express an implicit invariant or
\r
247 * assumption made. A configASSERT statement should express an invariant that must
\r
248 * hold explicit before calling the code. */
\r
249 #ifndef configPRECONDITION
\r
250 #define configPRECONDITION( X ) configASSERT( X )
\r
251 #define configPRECONDITION_DEFINED 0
\r
253 #define configPRECONDITION_DEFINED 1
\r
256 #ifndef portMEMORY_BARRIER
\r
257 #define portMEMORY_BARRIER()
\r
260 #ifndef portSOFTWARE_BARRIER
\r
261 #define portSOFTWARE_BARRIER()
\r
264 /* The timers module relies on xTaskGetSchedulerState(). */
\r
265 #if configUSE_TIMERS == 1
\r
267 #ifndef configTIMER_TASK_PRIORITY
\r
268 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
\r
269 #endif /* configTIMER_TASK_PRIORITY */
\r
271 #ifndef configTIMER_QUEUE_LENGTH
\r
272 #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
\r
273 #endif /* configTIMER_QUEUE_LENGTH */
\r
275 #ifndef configTIMER_TASK_STACK_DEPTH
\r
276 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
\r
277 #endif /* configTIMER_TASK_STACK_DEPTH */
\r
279 #endif /* configUSE_TIMERS */
\r
281 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
\r
282 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
\r
285 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
\r
286 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
\r
289 #ifndef portCLEAN_UP_TCB
\r
290 #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
\r
293 #ifndef portPRE_TASK_DELETE_HOOK
\r
294 #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
\r
297 #ifndef portSETUP_TCB
\r
298 #define portSETUP_TCB( pxTCB ) ( void ) pxTCB
\r
301 #ifndef configQUEUE_REGISTRY_SIZE
\r
302 #define configQUEUE_REGISTRY_SIZE 0U
\r
305 #if ( configQUEUE_REGISTRY_SIZE < 1 )
\r
306 #define vQueueAddToRegistry( xQueue, pcName )
\r
307 #define vQueueUnregisterQueue( xQueue )
\r
308 #define pcQueueGetName( xQueue )
\r
311 #ifndef portPOINTER_SIZE_TYPE
\r
312 #define portPOINTER_SIZE_TYPE uint32_t
\r
315 /* Remove any unused trace macros. */
\r
318 /* Used to perform any necessary initialisation - for example, open a file
\r
319 * into which trace is to be written. */
\r
320 #define traceSTART()
\r
325 /* Use to close a trace, for example close a file into which trace has been
\r
330 #ifndef traceTASK_SWITCHED_IN
\r
332 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
\r
333 * to the task control block of the selected task. */
\r
334 #define traceTASK_SWITCHED_IN()
\r
337 #ifndef traceINCREASE_TICK_COUNT
\r
339 /* Called before stepping the tick count after waking from tickless idle
\r
341 #define traceINCREASE_TICK_COUNT( x )
\r
344 #ifndef traceLOW_POWER_IDLE_BEGIN
\r
345 /* Called immediately before entering tickless idle. */
\r
346 #define traceLOW_POWER_IDLE_BEGIN()
\r
349 #ifndef traceLOW_POWER_IDLE_END
\r
350 /* Called when returning to the Idle task after a tickless idle. */
\r
351 #define traceLOW_POWER_IDLE_END()
\r
354 #ifndef traceTASK_SWITCHED_OUT
\r
356 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
\r
357 * to the task control block of the task being switched out. */
\r
358 #define traceTASK_SWITCHED_OUT()
\r
361 #ifndef traceTASK_PRIORITY_INHERIT
\r
363 /* Called when a task attempts to take a mutex that is already held by a
\r
364 * lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
\r
365 * that holds the mutex. uxInheritedPriority is the priority the mutex holder
\r
366 * will inherit (the priority of the task that is attempting to obtain the
\r
368 #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
\r
371 #ifndef traceTASK_PRIORITY_DISINHERIT
\r
373 /* Called when a task releases a mutex, the holding of which had resulted in
\r
374 * the task inheriting the priority of a higher priority task.
\r
375 * pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
\r
376 * mutex. uxOriginalPriority is the task's configured (base) priority. */
\r
377 #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
\r
380 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
\r
382 /* Task is about to block because it cannot read from a
\r
383 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
384 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
\r
385 * task that attempted the read. */
\r
386 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
\r
389 #ifndef traceBLOCKING_ON_QUEUE_PEEK
\r
391 /* Task is about to block because it cannot read from a
\r
392 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
393 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
\r
394 * task that attempted the read. */
\r
395 #define traceBLOCKING_ON_QUEUE_PEEK( pxQueue )
\r
398 #ifndef traceBLOCKING_ON_QUEUE_SEND
\r
400 /* Task is about to block because it cannot write to a
\r
401 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
402 * upon which the write was attempted. pxCurrentTCB points to the TCB of the
\r
403 * task that attempted the write. */
\r
404 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
\r
407 #ifndef configCHECK_FOR_STACK_OVERFLOW
\r
408 #define configCHECK_FOR_STACK_OVERFLOW 0
\r
411 #ifndef configRECORD_STACK_HIGH_ADDRESS
\r
412 #define configRECORD_STACK_HIGH_ADDRESS 0
\r
415 #ifndef configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H
\r
416 #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 0
\r
419 /* The following event macros are embedded in the kernel API calls. */
\r
421 #ifndef traceMOVED_TASK_TO_READY_STATE
\r
422 #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
\r
425 #ifndef tracePOST_MOVED_TASK_TO_READY_STATE
\r
426 #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
\r
429 #ifndef traceQUEUE_CREATE
\r
430 #define traceQUEUE_CREATE( pxNewQueue )
\r
433 #ifndef traceQUEUE_CREATE_FAILED
\r
434 #define traceQUEUE_CREATE_FAILED( ucQueueType )
\r
437 #ifndef traceCREATE_MUTEX
\r
438 #define traceCREATE_MUTEX( pxNewQueue )
\r
441 #ifndef traceCREATE_MUTEX_FAILED
\r
442 #define traceCREATE_MUTEX_FAILED()
\r
445 #ifndef traceGIVE_MUTEX_RECURSIVE
\r
446 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
\r
449 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
\r
450 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
\r
453 #ifndef traceTAKE_MUTEX_RECURSIVE
\r
454 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
\r
457 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
\r
458 #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
\r
461 #ifndef traceCREATE_COUNTING_SEMAPHORE
\r
462 #define traceCREATE_COUNTING_SEMAPHORE()
\r
465 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
\r
466 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
\r
469 #ifndef traceQUEUE_SET_SEND
\r
470 #define traceQUEUE_SET_SEND traceQUEUE_SEND
\r
473 #ifndef traceQUEUE_SEND
\r
474 #define traceQUEUE_SEND( pxQueue )
\r
477 #ifndef traceQUEUE_SEND_FAILED
\r
478 #define traceQUEUE_SEND_FAILED( pxQueue )
\r
481 #ifndef traceQUEUE_RECEIVE
\r
482 #define traceQUEUE_RECEIVE( pxQueue )
\r
485 #ifndef traceQUEUE_PEEK
\r
486 #define traceQUEUE_PEEK( pxQueue )
\r
489 #ifndef traceQUEUE_PEEK_FAILED
\r
490 #define traceQUEUE_PEEK_FAILED( pxQueue )
\r
493 #ifndef traceQUEUE_PEEK_FROM_ISR
\r
494 #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
\r
497 #ifndef traceQUEUE_RECEIVE_FAILED
\r
498 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
\r
501 #ifndef traceQUEUE_SEND_FROM_ISR
\r
502 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
\r
505 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
\r
506 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
\r
509 #ifndef traceQUEUE_RECEIVE_FROM_ISR
\r
510 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
\r
513 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
\r
514 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
\r
517 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
\r
518 #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
\r
521 #ifndef traceQUEUE_DELETE
\r
522 #define traceQUEUE_DELETE( pxQueue )
\r
525 #ifndef traceTASK_CREATE
\r
526 #define traceTASK_CREATE( pxNewTCB )
\r
529 #ifndef traceTASK_CREATE_FAILED
\r
530 #define traceTASK_CREATE_FAILED()
\r
533 #ifndef traceTASK_DELETE
\r
534 #define traceTASK_DELETE( pxTaskToDelete )
\r
537 #ifndef traceTASK_DELAY_UNTIL
\r
538 #define traceTASK_DELAY_UNTIL( x )
\r
541 #ifndef traceTASK_DELAY
\r
542 #define traceTASK_DELAY()
\r
545 #ifndef traceTASK_PRIORITY_SET
\r
546 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
\r
549 #ifndef traceTASK_SUSPEND
\r
550 #define traceTASK_SUSPEND( pxTaskToSuspend )
\r
553 #ifndef traceTASK_RESUME
\r
554 #define traceTASK_RESUME( pxTaskToResume )
\r
557 #ifndef traceTASK_RESUME_FROM_ISR
\r
558 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
\r
561 #ifndef traceTASK_INCREMENT_TICK
\r
562 #define traceTASK_INCREMENT_TICK( xTickCount )
\r
565 #ifndef traceTIMER_CREATE
\r
566 #define traceTIMER_CREATE( pxNewTimer )
\r
569 #ifndef traceTIMER_CREATE_FAILED
\r
570 #define traceTIMER_CREATE_FAILED()
\r
573 #ifndef traceTIMER_COMMAND_SEND
\r
574 #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
\r
577 #ifndef traceTIMER_EXPIRED
\r
578 #define traceTIMER_EXPIRED( pxTimer )
\r
581 #ifndef traceTIMER_COMMAND_RECEIVED
\r
582 #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
\r
585 #ifndef traceMALLOC
\r
586 #define traceMALLOC( pvAddress, uiSize )
\r
590 #define traceFREE( pvAddress, uiSize )
\r
593 #ifndef traceEVENT_GROUP_CREATE
\r
594 #define traceEVENT_GROUP_CREATE( xEventGroup )
\r
597 #ifndef traceEVENT_GROUP_CREATE_FAILED
\r
598 #define traceEVENT_GROUP_CREATE_FAILED()
\r
601 #ifndef traceEVENT_GROUP_SYNC_BLOCK
\r
602 #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
\r
605 #ifndef traceEVENT_GROUP_SYNC_END
\r
606 #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
\r
609 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
\r
610 #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
\r
613 #ifndef traceEVENT_GROUP_WAIT_BITS_END
\r
614 #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
\r
617 #ifndef traceEVENT_GROUP_CLEAR_BITS
\r
618 #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
\r
621 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
\r
622 #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
\r
625 #ifndef traceEVENT_GROUP_SET_BITS
\r
626 #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
\r
629 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
\r
630 #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
\r
633 #ifndef traceEVENT_GROUP_DELETE
\r
634 #define traceEVENT_GROUP_DELETE( xEventGroup )
\r
637 #ifndef tracePEND_FUNC_CALL
\r
638 #define tracePEND_FUNC_CALL( xFunctionToPend, pvParameter1, ulParameter2, ret )
\r
641 #ifndef tracePEND_FUNC_CALL_FROM_ISR
\r
642 #define tracePEND_FUNC_CALL_FROM_ISR( xFunctionToPend, pvParameter1, ulParameter2, ret )
\r
645 #ifndef traceQUEUE_REGISTRY_ADD
\r
646 #define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName )
\r
649 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
\r
650 #define traceTASK_NOTIFY_TAKE_BLOCK( uxIndexToWait )
\r
653 #ifndef traceTASK_NOTIFY_TAKE
\r
654 #define traceTASK_NOTIFY_TAKE( uxIndexToWait )
\r
657 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
\r
658 #define traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait )
\r
661 #ifndef traceTASK_NOTIFY_WAIT
\r
662 #define traceTASK_NOTIFY_WAIT( uxIndexToWait )
\r
665 #ifndef traceTASK_NOTIFY
\r
666 #define traceTASK_NOTIFY( uxIndexToNotify )
\r
669 #ifndef traceTASK_NOTIFY_FROM_ISR
\r
670 #define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
\r
673 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
\r
674 #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
\r
677 #ifndef traceSTREAM_BUFFER_CREATE_FAILED
\r
678 #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer )
\r
681 #ifndef traceSTREAM_BUFFER_CREATE_STATIC_FAILED
\r
682 #define traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer )
\r
685 #ifndef traceSTREAM_BUFFER_CREATE
\r
686 #define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer )
\r
689 #ifndef traceSTREAM_BUFFER_DELETE
\r
690 #define traceSTREAM_BUFFER_DELETE( xStreamBuffer )
\r
693 #ifndef traceSTREAM_BUFFER_RESET
\r
694 #define traceSTREAM_BUFFER_RESET( xStreamBuffer )
\r
697 #ifndef traceBLOCKING_ON_STREAM_BUFFER_SEND
\r
698 #define traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer )
\r
701 #ifndef traceSTREAM_BUFFER_SEND
\r
702 #define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent )
\r
705 #ifndef traceSTREAM_BUFFER_SEND_FAILED
\r
706 #define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer )
\r
709 #ifndef traceSTREAM_BUFFER_SEND_FROM_ISR
\r
710 #define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent )
\r
713 #ifndef traceBLOCKING_ON_STREAM_BUFFER_RECEIVE
\r
714 #define traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer )
\r
717 #ifndef traceSTREAM_BUFFER_RECEIVE
\r
718 #define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength )
\r
721 #ifndef traceSTREAM_BUFFER_RECEIVE_FAILED
\r
722 #define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer )
\r
725 #ifndef traceSTREAM_BUFFER_RECEIVE_FROM_ISR
\r
726 #define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
\r
729 #ifndef configGENERATE_RUN_TIME_STATS
\r
730 #define configGENERATE_RUN_TIME_STATS 0
\r
733 #if ( configGENERATE_RUN_TIME_STATS == 1 )
\r
735 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
\r
736 #error If configGENERATE_RUN_TIME_STATS is defined then portCONFIGURE_TIMER_FOR_RUN_TIME_STATS must also be defined. portCONFIGURE_TIMER_FOR_RUN_TIME_STATS should call a port layer function to setup a peripheral timer/counter that can then be used as the run time counter time base.
\r
737 #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
\r
739 #ifndef portGET_RUN_TIME_COUNTER_VALUE
\r
740 #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
\r
741 #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined. See the examples provided and the FreeRTOS web site for more information.
\r
742 #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
\r
743 #endif /* portGET_RUN_TIME_COUNTER_VALUE */
\r
745 #endif /* configGENERATE_RUN_TIME_STATS */
\r
747 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
\r
748 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
\r
751 #ifndef configUSE_MALLOC_FAILED_HOOK
\r
752 #define configUSE_MALLOC_FAILED_HOOK 0
\r
755 #ifndef portPRIVILEGE_BIT
\r
756 #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
\r
759 #ifndef portYIELD_WITHIN_API
\r
760 #define portYIELD_WITHIN_API portYIELD
\r
763 #ifndef portSUPPRESS_TICKS_AND_SLEEP
\r
764 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
\r
767 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
\r
768 #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
\r
771 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
\r
772 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
\r
775 #ifndef configUSE_TICKLESS_IDLE
\r
776 #define configUSE_TICKLESS_IDLE 0
\r
779 #ifndef configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING
\r
780 #define configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING( x )
\r
783 #ifndef configPRE_SLEEP_PROCESSING
\r
784 #define configPRE_SLEEP_PROCESSING( x )
\r
787 #ifndef configPOST_SLEEP_PROCESSING
\r
788 #define configPOST_SLEEP_PROCESSING( x )
\r
791 #ifndef configUSE_QUEUE_SETS
\r
792 #define configUSE_QUEUE_SETS 0
\r
795 #ifndef portTASK_USES_FLOATING_POINT
\r
796 #define portTASK_USES_FLOATING_POINT()
\r
799 #ifndef portALLOCATE_SECURE_CONTEXT
\r
800 #define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
\r
803 #ifndef portDONT_DISCARD
\r
804 #define portDONT_DISCARD
\r
807 #ifndef configUSE_TIME_SLICING
\r
808 #define configUSE_TIME_SLICING 1
\r
811 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
\r
812 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
\r
815 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
\r
816 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
\r
819 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
\r
820 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
\r
823 #ifndef configUSE_TRACE_FACILITY
\r
824 #define configUSE_TRACE_FACILITY 0
\r
827 #ifndef mtCOVERAGE_TEST_MARKER
\r
828 #define mtCOVERAGE_TEST_MARKER()
\r
831 #ifndef mtCOVERAGE_TEST_DELAY
\r
832 #define mtCOVERAGE_TEST_DELAY()
\r
835 #ifndef portASSERT_IF_IN_ISR
\r
836 #define portASSERT_IF_IN_ISR()
\r
839 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
\r
840 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
\r
843 #ifndef configAPPLICATION_ALLOCATED_HEAP
\r
844 #define configAPPLICATION_ALLOCATED_HEAP 0
\r
847 #ifndef configUSE_TASK_NOTIFICATIONS
\r
848 #define configUSE_TASK_NOTIFICATIONS 1
\r
851 #ifndef configTASK_NOTIFICATION_ARRAY_ENTRIES
\r
852 #define configTASK_NOTIFICATION_ARRAY_ENTRIES 1
\r
855 #if configTASK_NOTIFICATION_ARRAY_ENTRIES < 1
\r
856 #error configTASK_NOTIFICATION_ARRAY_ENTRIES must be at least 1
\r
859 #ifndef configUSE_POSIX_ERRNO
\r
860 #define configUSE_POSIX_ERRNO 0
\r
863 #ifndef portTICK_TYPE_IS_ATOMIC
\r
864 #define portTICK_TYPE_IS_ATOMIC 0
\r
867 #ifndef configSUPPORT_STATIC_ALLOCATION
\r
868 /* Defaults to 0 for backward compatibility. */
\r
869 #define configSUPPORT_STATIC_ALLOCATION 0
\r
872 #ifndef configSUPPORT_DYNAMIC_ALLOCATION
\r
873 /* Defaults to 1 for backward compatibility. */
\r
874 #define configSUPPORT_DYNAMIC_ALLOCATION 1
\r
877 #ifndef configSTACK_DEPTH_TYPE
\r
879 /* Defaults to uint16_t for backward compatibility, but can be overridden
\r
880 * in FreeRTOSConfig.h if uint16_t is too restrictive. */
\r
881 #define configSTACK_DEPTH_TYPE uint16_t
\r
884 #ifndef configMESSAGE_BUFFER_LENGTH_TYPE
\r
886 /* Defaults to size_t for backward compatibility, but can be overridden
\r
887 * in FreeRTOSConfig.h if lengths will always be less than the number of bytes
\r
889 #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
\r
892 /* Sanity check the configuration. */
\r
893 #if ( configUSE_TICKLESS_IDLE != 0 )
\r
894 #if ( INCLUDE_vTaskSuspend != 1 )
\r
895 #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0
\r
896 #endif /* INCLUDE_vTaskSuspend */
\r
897 #endif /* configUSE_TICKLESS_IDLE */
\r
899 #if ( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
\r
900 #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
\r
903 #if ( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )
\r
904 #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
\r
907 #ifndef configINITIAL_TICK_COUNT
\r
908 #define configINITIAL_TICK_COUNT 0
\r
911 #if ( portTICK_TYPE_IS_ATOMIC == 0 )
\r
913 /* Either variables of tick type cannot be read atomically, or
\r
914 * portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
\r
915 * the tick count is returned to the standard critical section macros. */
\r
916 #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
\r
917 #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
\r
918 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
\r
919 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
\r
922 /* The tick type can be read atomically, so critical sections used when the
\r
923 * tick count is returned can be defined away. */
\r
924 #define portTICK_TYPE_ENTER_CRITICAL()
\r
925 #define portTICK_TYPE_EXIT_CRITICAL()
\r
926 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
\r
927 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
\r
928 #endif /* if ( portTICK_TYPE_IS_ATOMIC == 0 ) */
\r
930 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
\r
931 * V8 if desired. */
\r
932 #ifndef configENABLE_BACKWARD_COMPATIBILITY
\r
933 #define configENABLE_BACKWARD_COMPATIBILITY 1
\r
936 #ifndef configPRINTF
\r
938 /* configPRINTF() was not defined, so define it away to nothing. To use
\r
939 * configPRINTF() then define it as follows (where MyPrintFunction() is
\r
940 * provided by the application writer):
\r
942 * void MyPrintFunction(const char *pcFormat, ... );
\r
943 #define configPRINTF( X ) MyPrintFunction X
\r
945 * Then call like a standard printf() function, but placing brackets around
\r
946 * all parameters so they are passed as a single parameter. For example:
\r
947 * configPRINTF( ("Value = %d", MyVariable) ); */
\r
948 #define configPRINTF( X )
\r
953 /* The application writer has not provided their own MAX macro, so define
\r
954 * the following generic implementation. */
\r
955 #define configMAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
\r
960 /* The application writer has not provided their own MAX macro, so define
\r
961 * the following generic implementation. */
\r
962 #define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
\r
965 #if configENABLE_BACKWARD_COMPATIBILITY == 1
\r
966 #define eTaskStateGet eTaskGetState
\r
967 #define portTickType TickType_t
\r
968 #define xTaskHandle TaskHandle_t
\r
969 #define xQueueHandle QueueHandle_t
\r
970 #define xSemaphoreHandle SemaphoreHandle_t
\r
971 #define xQueueSetHandle QueueSetHandle_t
\r
972 #define xQueueSetMemberHandle QueueSetMemberHandle_t
\r
973 #define xTimeOutType TimeOut_t
\r
974 #define xMemoryRegion MemoryRegion_t
\r
975 #define xTaskParameters TaskParameters_t
\r
976 #define xTaskStatusType TaskStatus_t
\r
977 #define xTimerHandle TimerHandle_t
\r
978 #define xCoRoutineHandle CoRoutineHandle_t
\r
979 #define pdTASK_HOOK_CODE TaskHookFunction_t
\r
980 #define portTICK_RATE_MS portTICK_PERIOD_MS
\r
981 #define pcTaskGetTaskName pcTaskGetName
\r
982 #define pcTimerGetTimerName pcTimerGetName
\r
983 #define pcQueueGetQueueName pcQueueGetName
\r
984 #define vTaskGetTaskInfo vTaskGetInfo
\r
985 #define xTaskGetIdleRunTimeCounter ulTaskGetIdleRunTimeCounter
\r
987 /* Backward compatibility within the scheduler code only - these definitions
\r
988 * are not really required but are included for completeness. */
\r
989 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
\r
990 #define pdTASK_CODE TaskFunction_t
\r
991 #define xListItem ListItem_t
\r
992 #define xList List_t
\r
994 /* For libraries that break the list data hiding, and access list structure
\r
995 * members directly (which is not supposed to be done). */
\r
996 #define pxContainer pvContainer
\r
997 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
\r
999 #if ( configUSE_ALTERNATIVE_API != 0 )
\r
1000 #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0
\r
1003 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
\r
1004 * if floating point hardware is otherwise supported by the FreeRTOS port in use.
\r
1005 * This constant is not supported by all FreeRTOS ports that include floating
\r
1006 * point support. */
\r
1007 #ifndef configUSE_TASK_FPU_SUPPORT
\r
1008 #define configUSE_TASK_FPU_SUPPORT 1
\r
1011 /* Set configENABLE_MPU to 1 to enable MPU support and 0 to disable it. This is
\r
1012 * currently used in ARMv8M ports. */
\r
1013 #ifndef configENABLE_MPU
\r
1014 #define configENABLE_MPU 0
\r
1017 /* Set configENABLE_FPU to 1 to enable FPU support and 0 to disable it. This is
\r
1018 * currently used in ARMv8M ports. */
\r
1019 #ifndef configENABLE_FPU
\r
1020 #define configENABLE_FPU 1
\r
1023 /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it.
\r
1024 * This is currently used in ARMv8M ports. */
\r
1025 #ifndef configENABLE_TRUSTZONE
\r
1026 #define configENABLE_TRUSTZONE 1
\r
1029 /* Set configRUN_FREERTOS_SECURE_ONLY to 1 to run the FreeRTOS ARMv8M port on
\r
1030 * the Secure Side only. */
\r
1031 #ifndef configRUN_FREERTOS_SECURE_ONLY
\r
1032 #define configRUN_FREERTOS_SECURE_ONLY 0
\r
1035 /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
\r
1036 * dynamically allocated RAM, in which case when any task is deleted it is known
\r
1037 * that both the task's stack and TCB need to be freed. Sometimes the
\r
1038 * FreeRTOSConfig.h settings only allow a task to be created using statically
\r
1039 * allocated RAM, in which case when any task is deleted it is known that neither
\r
1040 * the task's stack or TCB should be freed. Sometimes the FreeRTOSConfig.h
\r
1041 * settings allow a task to be created using either statically or dynamically
\r
1042 * allocated RAM, in which case a member of the TCB is used to record whether the
\r
1043 * stack and/or TCB were allocated statically or dynamically, so when a task is
\r
1044 * deleted the RAM that was allocated dynamically is freed again and no attempt is
\r
1045 * made to free the RAM that was allocated statically.
\r
1046 * tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a
\r
1047 * task to be created using either statically or dynamically allocated RAM. Note
\r
1048 * that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with
\r
1049 * a statically allocated stack and a dynamically allocated TCB.
\r
1051 * The following table lists various combinations of portUSING_MPU_WRAPPERS,
\r
1052 * configSUPPORT_DYNAMIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION and
\r
1053 * when it is possible to have both static and dynamic allocation:
\r
1054 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
\r
1055 * | MPU | Dynamic | Static | Available Functions | Possible Allocations | Both Dynamic and | Need Free |
\r
1056 * | | | | | | Static Possible | |
\r
1057 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
\r
1058 * | 0 | 0 | 1 | xTaskCreateStatic | TCB - Static, Stack - Static | No | No |
\r
1059 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1060 * | 0 | 1 | 0 | xTaskCreate | TCB - Dynamic, Stack - Dynamic | No | Yes |
\r
1061 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1062 * | 0 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
\r
1063 * | | | | xTaskCreateStatic | 2. TCB - Static, Stack - Static | | |
\r
1064 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1065 * | 1 | 0 | 1 | xTaskCreateStatic, | TCB - Static, Stack - Static | No | No |
\r
1066 * | | | | xTaskCreateRestrictedStatic | | | |
\r
1067 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1068 * | 1 | 1 | 0 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
\r
1069 * | | | | xTaskCreateRestricted | 2. TCB - Dynamic, Stack - Static | | |
\r
1070 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1071 * | 1 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
\r
1072 * | | | | xTaskCreateStatic, | 2. TCB - Dynamic, Stack - Static | | |
\r
1073 * | | | | xTaskCreateRestricted, | 3. TCB - Static, Stack - Static | | |
\r
1074 * | | | | xTaskCreateRestrictedStatic | | | |
\r
1075 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
\r
1077 #define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE \
\r
1078 ( ( ( portUSING_MPU_WRAPPERS == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) || \
\r
1079 ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) )
\r
1082 * In line with software engineering best practice, FreeRTOS implements a strict
\r
1083 * data hiding policy, so the real structures used by FreeRTOS to maintain the
\r
1084 * state of tasks, queues, semaphores, etc. are not accessible to the application
\r
1085 * code. However, if the application writer wants to statically allocate such
\r
1086 * an object then the size of the object needs to be know. Dummy structures
\r
1087 * that are guaranteed to have the same size and alignment requirements of the
\r
1088 * real objects are used for this purpose. The dummy list and list item
\r
1089 * structures below are used for inclusion in such a dummy structure.
\r
1091 struct xSTATIC_LIST_ITEM
\r
1093 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1094 TickType_t xDummy1;
\r
1096 TickType_t xDummy2;
\r
1097 void * pvDummy3[ 4 ];
\r
1098 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1099 TickType_t xDummy4;
\r
1102 typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
\r
1104 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
\r
1105 struct xSTATIC_MINI_LIST_ITEM
\r
1107 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1108 TickType_t xDummy1;
\r
1110 TickType_t xDummy2;
\r
1111 void * pvDummy3[ 2 ];
\r
1113 typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
\r
1115 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
\r
1116 typedef struct xSTATIC_LIST
\r
1118 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1119 TickType_t xDummy1;
\r
1121 UBaseType_t uxDummy2;
\r
1123 StaticMiniListItem_t xDummy4;
\r
1124 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1125 TickType_t xDummy5;
\r
1130 * In line with software engineering best practice, especially when supplying a
\r
1131 * library that is likely to change in future versions, FreeRTOS implements a
\r
1132 * strict data hiding policy. This means the Task structure used internally by
\r
1133 * FreeRTOS is not accessible to application code. However, if the application
\r
1134 * writer wants to statically allocate the memory required to create a task then
\r
1135 * the size of the task object needs to be know. The StaticTask_t structure
\r
1136 * below is provided for this purpose. Its sizes and alignment requirements are
\r
1137 * guaranteed to match those of the genuine structure, no matter which
\r
1138 * architecture is being used, and no matter how the values in FreeRTOSConfig.h
\r
1139 * are set. Its contents are somewhat obfuscated in the hope users will
\r
1140 * recognise that it would be unwise to make direct use of the structure members.
\r
1142 typedef struct xSTATIC_TCB
\r
1145 #if ( portUSING_MPU_WRAPPERS == 1 )
\r
1146 xMPU_SETTINGS xDummy2;
\r
1148 StaticListItem_t xDummy3[ 2 ];
\r
1149 UBaseType_t uxDummy5;
\r
1151 uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
\r
1152 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
\r
1155 #if ( portCRITICAL_NESTING_IN_TCB == 1 )
\r
1156 UBaseType_t uxDummy9;
\r
1158 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1159 UBaseType_t uxDummy10[ 2 ];
\r
1161 #if ( configUSE_MUTEXES == 1 )
\r
1162 UBaseType_t uxDummy12[ 2 ];
\r
1164 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
\r
1167 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
\r
1168 void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
\r
1170 #if ( configGENERATE_RUN_TIME_STATS == 1 )
\r
1171 uint32_t ulDummy16;
\r
1173 #if ( configUSE_NEWLIB_REENTRANT == 1 )
\r
1174 struct _reent xDummy17;
\r
1176 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
\r
1177 uint32_t ulDummy18[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
\r
1178 uint8_t ucDummy19[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
\r
1180 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
\r
1181 uint8_t uxDummy20;
\r
1184 #if ( INCLUDE_xTaskAbortDelay == 1 )
\r
1185 uint8_t ucDummy21;
\r
1187 #if ( configUSE_POSIX_ERRNO == 1 )
\r
1193 * In line with software engineering best practice, especially when supplying a
\r
1194 * library that is likely to change in future versions, FreeRTOS implements a
\r
1195 * strict data hiding policy. This means the Queue structure used internally by
\r
1196 * FreeRTOS is not accessible to application code. However, if the application
\r
1197 * writer wants to statically allocate the memory required to create a queue
\r
1198 * then the size of the queue object needs to be know. The StaticQueue_t
\r
1199 * structure below is provided for this purpose. Its sizes and alignment
\r
1200 * requirements are guaranteed to match those of the genuine structure, no
\r
1201 * matter which architecture is being used, and no matter how the values in
\r
1202 * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope
\r
1203 * users will recognise that it would be unwise to make direct use of the
\r
1204 * structure members.
\r
1206 typedef struct xSTATIC_QUEUE
\r
1208 void * pvDummy1[ 3 ];
\r
1213 UBaseType_t uxDummy2;
\r
1216 StaticList_t xDummy3[ 2 ];
\r
1217 UBaseType_t uxDummy4[ 3 ];
\r
1218 uint8_t ucDummy5[ 2 ];
\r
1220 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
\r
1224 #if ( configUSE_QUEUE_SETS == 1 )
\r
1228 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1229 UBaseType_t uxDummy8;
\r
1233 typedef StaticQueue_t StaticSemaphore_t;
\r
1236 * In line with software engineering best practice, especially when supplying a
\r
1237 * library that is likely to change in future versions, FreeRTOS implements a
\r
1238 * strict data hiding policy. This means the event group structure used
\r
1239 * internally by FreeRTOS is not accessible to application code. However, if
\r
1240 * the application writer wants to statically allocate the memory required to
\r
1241 * create an event group then the size of the event group object needs to be
\r
1242 * know. The StaticEventGroup_t structure below is provided for this purpose.
\r
1243 * Its sizes and alignment requirements are guaranteed to match those of the
\r
1244 * genuine structure, no matter which architecture is being used, and no matter
\r
1245 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
\r
1246 * obfuscated in the hope users will recognise that it would be unwise to make
\r
1247 * direct use of the structure members.
\r
1249 typedef struct xSTATIC_EVENT_GROUP
\r
1251 TickType_t xDummy1;
\r
1252 StaticList_t xDummy2;
\r
1254 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1255 UBaseType_t uxDummy3;
\r
1258 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
\r
1261 } StaticEventGroup_t;
\r
1264 * In line with software engineering best practice, especially when supplying a
\r
1265 * library that is likely to change in future versions, FreeRTOS implements a
\r
1266 * strict data hiding policy. This means the software timer structure used
\r
1267 * internally by FreeRTOS is not accessible to application code. However, if
\r
1268 * the application writer wants to statically allocate the memory required to
\r
1269 * create a software timer then the size of the queue object needs to be know.
\r
1270 * The StaticTimer_t structure below is provided for this purpose. Its sizes
\r
1271 * and alignment requirements are guaranteed to match those of the genuine
\r
1272 * structure, no matter which architecture is being used, and no matter how the
\r
1273 * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in
\r
1274 * the hope users will recognise that it would be unwise to make direct use of
\r
1275 * the structure members.
\r
1277 typedef struct xSTATIC_TIMER
\r
1280 StaticListItem_t xDummy2;
\r
1281 TickType_t xDummy3;
\r
1283 TaskFunction_t pvDummy6;
\r
1284 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1285 UBaseType_t uxDummy7;
\r
1291 * In line with software engineering best practice, especially when supplying a
\r
1292 * library that is likely to change in future versions, FreeRTOS implements a
\r
1293 * strict data hiding policy. This means the stream buffer structure used
\r
1294 * internally by FreeRTOS is not accessible to application code. However, if
\r
1295 * the application writer wants to statically allocate the memory required to
\r
1296 * create a stream buffer then the size of the stream buffer object needs to be
\r
1297 * know. The StaticStreamBuffer_t structure below is provided for this purpose.
\r
1298 * Its size and alignment requirements are guaranteed to match those of the
\r
1299 * genuine structure, no matter which architecture is being used, and no matter
\r
1300 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
\r
1301 * obfuscated in the hope users will recognise that it would be unwise to make
\r
1302 * direct use of the structure members.
\r
1304 typedef struct xSTATIC_STREAM_BUFFER
\r
1306 size_t uxDummy1[ 4 ];
\r
1307 void * pvDummy2[ 3 ];
\r
1309 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1310 UBaseType_t uxDummy4;
\r
1312 } StaticStreamBuffer_t;
\r
1314 /* Message buffers are built on stream buffers. */
\r
1315 typedef StaticStreamBuffer_t StaticMessageBuffer_t;
\r
1317 #ifdef __cplusplus
\r
1321 #endif /* INC_FREERTOS_H */
\r