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