Francisco Paez / freertos-cm3

Dependents:   mbed_lpc1768_freertos_lib

Committer:
fep
Date:
Wed May 31 02:36:43 2017 +0000
Revision:
0:5ff20db10a96
FreeRTOS v9.0.0 for ARM Cortex-M3 based boards.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fep 0:5ff20db10a96 1 /*
fep 0:5ff20db10a96 2 FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
fep 0:5ff20db10a96 3 All rights reserved
fep 0:5ff20db10a96 4
fep 0:5ff20db10a96 5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
fep 0:5ff20db10a96 6
fep 0:5ff20db10a96 7 This file is part of the FreeRTOS distribution.
fep 0:5ff20db10a96 8
fep 0:5ff20db10a96 9 FreeRTOS is free software; you can redistribute it and/or modify it under
fep 0:5ff20db10a96 10 the terms of the GNU General Public License (version 2) as published by the
fep 0:5ff20db10a96 11 Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
fep 0:5ff20db10a96 12
fep 0:5ff20db10a96 13 ***************************************************************************
fep 0:5ff20db10a96 14 >>! NOTE: The modification to the GPL is included to allow you to !<<
fep 0:5ff20db10a96 15 >>! distribute a combined work that includes FreeRTOS without being !<<
fep 0:5ff20db10a96 16 >>! obliged to provide the source code for proprietary components !<<
fep 0:5ff20db10a96 17 >>! outside of the FreeRTOS kernel. !<<
fep 0:5ff20db10a96 18 ***************************************************************************
fep 0:5ff20db10a96 19
fep 0:5ff20db10a96 20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
fep 0:5ff20db10a96 21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
fep 0:5ff20db10a96 22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
fep 0:5ff20db10a96 23 link: http://www.freertos.org/a00114.html
fep 0:5ff20db10a96 24
fep 0:5ff20db10a96 25 ***************************************************************************
fep 0:5ff20db10a96 26 * *
fep 0:5ff20db10a96 27 * FreeRTOS provides completely free yet professionally developed, *
fep 0:5ff20db10a96 28 * robust, strictly quality controlled, supported, and cross *
fep 0:5ff20db10a96 29 * platform software that is more than just the market leader, it *
fep 0:5ff20db10a96 30 * is the industry's de facto standard. *
fep 0:5ff20db10a96 31 * *
fep 0:5ff20db10a96 32 * Help yourself get started quickly while simultaneously helping *
fep 0:5ff20db10a96 33 * to support the FreeRTOS project by purchasing a FreeRTOS *
fep 0:5ff20db10a96 34 * tutorial book, reference manual, or both: *
fep 0:5ff20db10a96 35 * http://www.FreeRTOS.org/Documentation *
fep 0:5ff20db10a96 36 * *
fep 0:5ff20db10a96 37 ***************************************************************************
fep 0:5ff20db10a96 38
fep 0:5ff20db10a96 39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
fep 0:5ff20db10a96 40 the FAQ page "My application does not run, what could be wrong?". Have you
fep 0:5ff20db10a96 41 defined configASSERT()?
fep 0:5ff20db10a96 42
fep 0:5ff20db10a96 43 http://www.FreeRTOS.org/support - In return for receiving this top quality
fep 0:5ff20db10a96 44 embedded software for free we request you assist our global community by
fep 0:5ff20db10a96 45 participating in the support forum.
fep 0:5ff20db10a96 46
fep 0:5ff20db10a96 47 http://www.FreeRTOS.org/training - Investing in training allows your team to
fep 0:5ff20db10a96 48 be as productive as possible as early as possible. Now you can receive
fep 0:5ff20db10a96 49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
fep 0:5ff20db10a96 50 Ltd, and the world's leading authority on the world's leading RTOS.
fep 0:5ff20db10a96 51
fep 0:5ff20db10a96 52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
fep 0:5ff20db10a96 53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
fep 0:5ff20db10a96 54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
fep 0:5ff20db10a96 55
fep 0:5ff20db10a96 56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
fep 0:5ff20db10a96 57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
fep 0:5ff20db10a96 58
fep 0:5ff20db10a96 59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
fep 0:5ff20db10a96 60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
fep 0:5ff20db10a96 61 licenses offer ticketed support, indemnification and commercial middleware.
fep 0:5ff20db10a96 62
fep 0:5ff20db10a96 63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
fep 0:5ff20db10a96 64 engineered and independently SIL3 certified version for use in safety and
fep 0:5ff20db10a96 65 mission critical applications that require provable dependability.
fep 0:5ff20db10a96 66
fep 0:5ff20db10a96 67 1 tab == 4 spaces!
fep 0:5ff20db10a96 68 */
fep 0:5ff20db10a96 69
fep 0:5ff20db10a96 70 #ifndef INC_FREERTOS_H
fep 0:5ff20db10a96 71 #define INC_FREERTOS_H
fep 0:5ff20db10a96 72
fep 0:5ff20db10a96 73 /*
fep 0:5ff20db10a96 74 * Include the generic headers required for the FreeRTOS port being used.
fep 0:5ff20db10a96 75 */
fep 0:5ff20db10a96 76 #include <stddef.h>
fep 0:5ff20db10a96 77
fep 0:5ff20db10a96 78 /*
fep 0:5ff20db10a96 79 * If stdint.h cannot be located then:
fep 0:5ff20db10a96 80 * + If using GCC ensure the -nostdint options is *not* being used.
fep 0:5ff20db10a96 81 * + Ensure the project's include path includes the directory in which your
fep 0:5ff20db10a96 82 * compiler stores stdint.h.
fep 0:5ff20db10a96 83 * + Set any compiler options necessary for it to support C99, as technically
fep 0:5ff20db10a96 84 * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
fep 0:5ff20db10a96 85 * other way).
fep 0:5ff20db10a96 86 * + The FreeRTOS download includes a simple stdint.h definition that can be
fep 0:5ff20db10a96 87 * used in cases where none is provided by the compiler. The files only
fep 0:5ff20db10a96 88 * contains the typedefs required to build FreeRTOS. Read the instructions
fep 0:5ff20db10a96 89 * in FreeRTOS/source/stdint.readme for more information.
fep 0:5ff20db10a96 90 */
fep 0:5ff20db10a96 91 #include <stdint.h> /* READ COMMENT ABOVE. */
fep 0:5ff20db10a96 92
fep 0:5ff20db10a96 93 #ifdef __cplusplus
fep 0:5ff20db10a96 94 extern "C" {
fep 0:5ff20db10a96 95 #endif
fep 0:5ff20db10a96 96
fep 0:5ff20db10a96 97 /* Application specific configuration options. */
fep 0:5ff20db10a96 98 #include "FreeRTOSConfig.h"
fep 0:5ff20db10a96 99
fep 0:5ff20db10a96 100 /* Basic FreeRTOS definitions. */
fep 0:5ff20db10a96 101 #include "projdefs.h"
fep 0:5ff20db10a96 102
fep 0:5ff20db10a96 103 /* Definitions specific to the port being used. */
fep 0:5ff20db10a96 104 #include "portable.h"
fep 0:5ff20db10a96 105
fep 0:5ff20db10a96 106 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */
fep 0:5ff20db10a96 107 #ifndef configUSE_NEWLIB_REENTRANT
fep 0:5ff20db10a96 108 #define configUSE_NEWLIB_REENTRANT 0
fep 0:5ff20db10a96 109 #endif
fep 0:5ff20db10a96 110
fep 0:5ff20db10a96 111 /* Required if struct _reent is used. */
fep 0:5ff20db10a96 112 #if ( configUSE_NEWLIB_REENTRANT == 1 )
fep 0:5ff20db10a96 113 #include <reent.h>
fep 0:5ff20db10a96 114 #endif
fep 0:5ff20db10a96 115 /*
fep 0:5ff20db10a96 116 * Check all the required application specific macros have been defined.
fep 0:5ff20db10a96 117 * These macros are application specific and (as downloaded) are defined
fep 0:5ff20db10a96 118 * within FreeRTOSConfig.h.
fep 0:5ff20db10a96 119 */
fep 0:5ff20db10a96 120
fep 0:5ff20db10a96 121 #ifndef configMINIMAL_STACK_SIZE
fep 0:5ff20db10a96 122 #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.
fep 0:5ff20db10a96 123 #endif
fep 0:5ff20db10a96 124
fep 0:5ff20db10a96 125 #ifndef configMAX_PRIORITIES
fep 0:5ff20db10a96 126 #error Missing definition: configMAX_PRIORITIES must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
fep 0:5ff20db10a96 127 #endif
fep 0:5ff20db10a96 128
fep 0:5ff20db10a96 129 #ifndef configUSE_PREEMPTION
fep 0:5ff20db10a96 130 #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.
fep 0:5ff20db10a96 131 #endif
fep 0:5ff20db10a96 132
fep 0:5ff20db10a96 133 #ifndef configUSE_IDLE_HOOK
fep 0:5ff20db10a96 134 #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.
fep 0:5ff20db10a96 135 #endif
fep 0:5ff20db10a96 136
fep 0:5ff20db10a96 137 #ifndef configUSE_TICK_HOOK
fep 0:5ff20db10a96 138 #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.
fep 0:5ff20db10a96 139 #endif
fep 0:5ff20db10a96 140
fep 0:5ff20db10a96 141 #ifndef configUSE_16_BIT_TICKS
fep 0:5ff20db10a96 142 #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.
fep 0:5ff20db10a96 143 #endif
fep 0:5ff20db10a96 144
fep 0:5ff20db10a96 145 #ifndef configMAX_PRIORITIES
fep 0:5ff20db10a96 146 #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
fep 0:5ff20db10a96 147 #endif
fep 0:5ff20db10a96 148
fep 0:5ff20db10a96 149 #ifndef configUSE_CO_ROUTINES
fep 0:5ff20db10a96 150 #define configUSE_CO_ROUTINES 0
fep 0:5ff20db10a96 151 #endif
fep 0:5ff20db10a96 152
fep 0:5ff20db10a96 153 #ifndef INCLUDE_vTaskPrioritySet
fep 0:5ff20db10a96 154 #define INCLUDE_vTaskPrioritySet 0
fep 0:5ff20db10a96 155 #endif
fep 0:5ff20db10a96 156
fep 0:5ff20db10a96 157 #ifndef INCLUDE_uxTaskPriorityGet
fep 0:5ff20db10a96 158 #define INCLUDE_uxTaskPriorityGet 0
fep 0:5ff20db10a96 159 #endif
fep 0:5ff20db10a96 160
fep 0:5ff20db10a96 161 #ifndef INCLUDE_vTaskDelete
fep 0:5ff20db10a96 162 #define INCLUDE_vTaskDelete 0
fep 0:5ff20db10a96 163 #endif
fep 0:5ff20db10a96 164
fep 0:5ff20db10a96 165 #ifndef INCLUDE_vTaskSuspend
fep 0:5ff20db10a96 166 #define INCLUDE_vTaskSuspend 0
fep 0:5ff20db10a96 167 #endif
fep 0:5ff20db10a96 168
fep 0:5ff20db10a96 169 #ifndef INCLUDE_vTaskDelayUntil
fep 0:5ff20db10a96 170 #define INCLUDE_vTaskDelayUntil 0
fep 0:5ff20db10a96 171 #endif
fep 0:5ff20db10a96 172
fep 0:5ff20db10a96 173 #ifndef INCLUDE_vTaskDelay
fep 0:5ff20db10a96 174 #define INCLUDE_vTaskDelay 0
fep 0:5ff20db10a96 175 #endif
fep 0:5ff20db10a96 176
fep 0:5ff20db10a96 177 #ifndef INCLUDE_xTaskGetIdleTaskHandle
fep 0:5ff20db10a96 178 #define INCLUDE_xTaskGetIdleTaskHandle 0
fep 0:5ff20db10a96 179 #endif
fep 0:5ff20db10a96 180
fep 0:5ff20db10a96 181 #ifndef INCLUDE_xTaskAbortDelay
fep 0:5ff20db10a96 182 #define INCLUDE_xTaskAbortDelay 0
fep 0:5ff20db10a96 183 #endif
fep 0:5ff20db10a96 184
fep 0:5ff20db10a96 185 #ifndef INCLUDE_xQueueGetMutexHolder
fep 0:5ff20db10a96 186 #define INCLUDE_xQueueGetMutexHolder 0
fep 0:5ff20db10a96 187 #endif
fep 0:5ff20db10a96 188
fep 0:5ff20db10a96 189 #ifndef INCLUDE_xSemaphoreGetMutexHolder
fep 0:5ff20db10a96 190 #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
fep 0:5ff20db10a96 191 #endif
fep 0:5ff20db10a96 192
fep 0:5ff20db10a96 193 #ifndef INCLUDE_xTaskGetHandle
fep 0:5ff20db10a96 194 #define INCLUDE_xTaskGetHandle 0
fep 0:5ff20db10a96 195 #endif
fep 0:5ff20db10a96 196
fep 0:5ff20db10a96 197 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
fep 0:5ff20db10a96 198 #define INCLUDE_uxTaskGetStackHighWaterMark 0
fep 0:5ff20db10a96 199 #endif
fep 0:5ff20db10a96 200
fep 0:5ff20db10a96 201 #ifndef INCLUDE_eTaskGetState
fep 0:5ff20db10a96 202 #define INCLUDE_eTaskGetState 0
fep 0:5ff20db10a96 203 #endif
fep 0:5ff20db10a96 204
fep 0:5ff20db10a96 205 #ifndef INCLUDE_xTaskResumeFromISR
fep 0:5ff20db10a96 206 #define INCLUDE_xTaskResumeFromISR 1
fep 0:5ff20db10a96 207 #endif
fep 0:5ff20db10a96 208
fep 0:5ff20db10a96 209 #ifndef INCLUDE_xTimerPendFunctionCall
fep 0:5ff20db10a96 210 #define INCLUDE_xTimerPendFunctionCall 0
fep 0:5ff20db10a96 211 #endif
fep 0:5ff20db10a96 212
fep 0:5ff20db10a96 213 #ifndef INCLUDE_xTaskGetSchedulerState
fep 0:5ff20db10a96 214 #define INCLUDE_xTaskGetSchedulerState 0
fep 0:5ff20db10a96 215 #endif
fep 0:5ff20db10a96 216
fep 0:5ff20db10a96 217 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
fep 0:5ff20db10a96 218 #define INCLUDE_xTaskGetCurrentTaskHandle 0
fep 0:5ff20db10a96 219 #endif
fep 0:5ff20db10a96 220
fep 0:5ff20db10a96 221 #if configUSE_CO_ROUTINES != 0
fep 0:5ff20db10a96 222 #ifndef configMAX_CO_ROUTINE_PRIORITIES
fep 0:5ff20db10a96 223 #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
fep 0:5ff20db10a96 224 #endif
fep 0:5ff20db10a96 225 #endif
fep 0:5ff20db10a96 226
fep 0:5ff20db10a96 227 #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
fep 0:5ff20db10a96 228 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
fep 0:5ff20db10a96 229 #endif
fep 0:5ff20db10a96 230
fep 0:5ff20db10a96 231 #ifndef configUSE_APPLICATION_TASK_TAG
fep 0:5ff20db10a96 232 #define configUSE_APPLICATION_TASK_TAG 0
fep 0:5ff20db10a96 233 #endif
fep 0:5ff20db10a96 234
fep 0:5ff20db10a96 235 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
fep 0:5ff20db10a96 236 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
fep 0:5ff20db10a96 237 #endif
fep 0:5ff20db10a96 238
fep 0:5ff20db10a96 239 #ifndef configUSE_RECURSIVE_MUTEXES
fep 0:5ff20db10a96 240 #define configUSE_RECURSIVE_MUTEXES 0
fep 0:5ff20db10a96 241 #endif
fep 0:5ff20db10a96 242
fep 0:5ff20db10a96 243 #ifndef configUSE_MUTEXES
fep 0:5ff20db10a96 244 #define configUSE_MUTEXES 0
fep 0:5ff20db10a96 245 #endif
fep 0:5ff20db10a96 246
fep 0:5ff20db10a96 247 #ifndef configUSE_TIMERS
fep 0:5ff20db10a96 248 #define configUSE_TIMERS 0
fep 0:5ff20db10a96 249 #endif
fep 0:5ff20db10a96 250
fep 0:5ff20db10a96 251 #ifndef configUSE_COUNTING_SEMAPHORES
fep 0:5ff20db10a96 252 #define configUSE_COUNTING_SEMAPHORES 0
fep 0:5ff20db10a96 253 #endif
fep 0:5ff20db10a96 254
fep 0:5ff20db10a96 255 #ifndef configUSE_ALTERNATIVE_API
fep 0:5ff20db10a96 256 #define configUSE_ALTERNATIVE_API 0
fep 0:5ff20db10a96 257 #endif
fep 0:5ff20db10a96 258
fep 0:5ff20db10a96 259 #ifndef portCRITICAL_NESTING_IN_TCB
fep 0:5ff20db10a96 260 #define portCRITICAL_NESTING_IN_TCB 0
fep 0:5ff20db10a96 261 #endif
fep 0:5ff20db10a96 262
fep 0:5ff20db10a96 263 #ifndef configMAX_TASK_NAME_LEN
fep 0:5ff20db10a96 264 #define configMAX_TASK_NAME_LEN 16
fep 0:5ff20db10a96 265 #endif
fep 0:5ff20db10a96 266
fep 0:5ff20db10a96 267 #ifndef configIDLE_SHOULD_YIELD
fep 0:5ff20db10a96 268 #define configIDLE_SHOULD_YIELD 1
fep 0:5ff20db10a96 269 #endif
fep 0:5ff20db10a96 270
fep 0:5ff20db10a96 271 #if configMAX_TASK_NAME_LEN < 1
fep 0:5ff20db10a96 272 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
fep 0:5ff20db10a96 273 #endif
fep 0:5ff20db10a96 274
fep 0:5ff20db10a96 275 #ifndef configASSERT
fep 0:5ff20db10a96 276 #define configASSERT( x )
fep 0:5ff20db10a96 277 #define configASSERT_DEFINED 0
fep 0:5ff20db10a96 278 #else
fep 0:5ff20db10a96 279 #define configASSERT_DEFINED 1
fep 0:5ff20db10a96 280 #endif
fep 0:5ff20db10a96 281
fep 0:5ff20db10a96 282 /* The timers module relies on xTaskGetSchedulerState(). */
fep 0:5ff20db10a96 283 #if configUSE_TIMERS == 1
fep 0:5ff20db10a96 284
fep 0:5ff20db10a96 285 #ifndef configTIMER_TASK_PRIORITY
fep 0:5ff20db10a96 286 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
fep 0:5ff20db10a96 287 #endif /* configTIMER_TASK_PRIORITY */
fep 0:5ff20db10a96 288
fep 0:5ff20db10a96 289 #ifndef configTIMER_QUEUE_LENGTH
fep 0:5ff20db10a96 290 #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
fep 0:5ff20db10a96 291 #endif /* configTIMER_QUEUE_LENGTH */
fep 0:5ff20db10a96 292
fep 0:5ff20db10a96 293 #ifndef configTIMER_TASK_STACK_DEPTH
fep 0:5ff20db10a96 294 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
fep 0:5ff20db10a96 295 #endif /* configTIMER_TASK_STACK_DEPTH */
fep 0:5ff20db10a96 296
fep 0:5ff20db10a96 297 #endif /* configUSE_TIMERS */
fep 0:5ff20db10a96 298
fep 0:5ff20db10a96 299 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
fep 0:5ff20db10a96 300 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
fep 0:5ff20db10a96 301 #endif
fep 0:5ff20db10a96 302
fep 0:5ff20db10a96 303 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
fep 0:5ff20db10a96 304 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
fep 0:5ff20db10a96 305 #endif
fep 0:5ff20db10a96 306
fep 0:5ff20db10a96 307 #ifndef portCLEAN_UP_TCB
fep 0:5ff20db10a96 308 #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
fep 0:5ff20db10a96 309 #endif
fep 0:5ff20db10a96 310
fep 0:5ff20db10a96 311 #ifndef portPRE_TASK_DELETE_HOOK
fep 0:5ff20db10a96 312 #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
fep 0:5ff20db10a96 313 #endif
fep 0:5ff20db10a96 314
fep 0:5ff20db10a96 315 #ifndef portSETUP_TCB
fep 0:5ff20db10a96 316 #define portSETUP_TCB( pxTCB ) ( void ) pxTCB
fep 0:5ff20db10a96 317 #endif
fep 0:5ff20db10a96 318
fep 0:5ff20db10a96 319 #ifndef configQUEUE_REGISTRY_SIZE
fep 0:5ff20db10a96 320 #define configQUEUE_REGISTRY_SIZE 0U
fep 0:5ff20db10a96 321 #endif
fep 0:5ff20db10a96 322
fep 0:5ff20db10a96 323 #if ( configQUEUE_REGISTRY_SIZE < 1 )
fep 0:5ff20db10a96 324 #define vQueueAddToRegistry( xQueue, pcName )
fep 0:5ff20db10a96 325 #define vQueueUnregisterQueue( xQueue )
fep 0:5ff20db10a96 326 #define pcQueueGetName( xQueue )
fep 0:5ff20db10a96 327 #endif
fep 0:5ff20db10a96 328
fep 0:5ff20db10a96 329 #ifndef portPOINTER_SIZE_TYPE
fep 0:5ff20db10a96 330 #define portPOINTER_SIZE_TYPE uint32_t
fep 0:5ff20db10a96 331 #endif
fep 0:5ff20db10a96 332
fep 0:5ff20db10a96 333 /* Remove any unused trace macros. */
fep 0:5ff20db10a96 334 #ifndef traceSTART
fep 0:5ff20db10a96 335 /* Used to perform any necessary initialisation - for example, open a file
fep 0:5ff20db10a96 336 into which trace is to be written. */
fep 0:5ff20db10a96 337 #define traceSTART()
fep 0:5ff20db10a96 338 #endif
fep 0:5ff20db10a96 339
fep 0:5ff20db10a96 340 #ifndef traceEND
fep 0:5ff20db10a96 341 /* Use to close a trace, for example close a file into which trace has been
fep 0:5ff20db10a96 342 written. */
fep 0:5ff20db10a96 343 #define traceEND()
fep 0:5ff20db10a96 344 #endif
fep 0:5ff20db10a96 345
fep 0:5ff20db10a96 346 #ifndef traceTASK_SWITCHED_IN
fep 0:5ff20db10a96 347 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
fep 0:5ff20db10a96 348 to the task control block of the selected task. */
fep 0:5ff20db10a96 349 #define traceTASK_SWITCHED_IN()
fep 0:5ff20db10a96 350 #endif
fep 0:5ff20db10a96 351
fep 0:5ff20db10a96 352 #ifndef traceINCREASE_TICK_COUNT
fep 0:5ff20db10a96 353 /* Called before stepping the tick count after waking from tickless idle
fep 0:5ff20db10a96 354 sleep. */
fep 0:5ff20db10a96 355 #define traceINCREASE_TICK_COUNT( x )
fep 0:5ff20db10a96 356 #endif
fep 0:5ff20db10a96 357
fep 0:5ff20db10a96 358 #ifndef traceLOW_POWER_IDLE_BEGIN
fep 0:5ff20db10a96 359 /* Called immediately before entering tickless idle. */
fep 0:5ff20db10a96 360 #define traceLOW_POWER_IDLE_BEGIN()
fep 0:5ff20db10a96 361 #endif
fep 0:5ff20db10a96 362
fep 0:5ff20db10a96 363 #ifndef traceLOW_POWER_IDLE_END
fep 0:5ff20db10a96 364 /* Called when returning to the Idle task after a tickless idle. */
fep 0:5ff20db10a96 365 #define traceLOW_POWER_IDLE_END()
fep 0:5ff20db10a96 366 #endif
fep 0:5ff20db10a96 367
fep 0:5ff20db10a96 368 #ifndef traceTASK_SWITCHED_OUT
fep 0:5ff20db10a96 369 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
fep 0:5ff20db10a96 370 to the task control block of the task being switched out. */
fep 0:5ff20db10a96 371 #define traceTASK_SWITCHED_OUT()
fep 0:5ff20db10a96 372 #endif
fep 0:5ff20db10a96 373
fep 0:5ff20db10a96 374 #ifndef traceTASK_PRIORITY_INHERIT
fep 0:5ff20db10a96 375 /* Called when a task attempts to take a mutex that is already held by a
fep 0:5ff20db10a96 376 lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
fep 0:5ff20db10a96 377 that holds the mutex. uxInheritedPriority is the priority the mutex holder
fep 0:5ff20db10a96 378 will inherit (the priority of the task that is attempting to obtain the
fep 0:5ff20db10a96 379 muted. */
fep 0:5ff20db10a96 380 #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
fep 0:5ff20db10a96 381 #endif
fep 0:5ff20db10a96 382
fep 0:5ff20db10a96 383 #ifndef traceTASK_PRIORITY_DISINHERIT
fep 0:5ff20db10a96 384 /* Called when a task releases a mutex, the holding of which had resulted in
fep 0:5ff20db10a96 385 the task inheriting the priority of a higher priority task.
fep 0:5ff20db10a96 386 pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
fep 0:5ff20db10a96 387 mutex. uxOriginalPriority is the task's configured (base) priority. */
fep 0:5ff20db10a96 388 #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
fep 0:5ff20db10a96 389 #endif
fep 0:5ff20db10a96 390
fep 0:5ff20db10a96 391 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
fep 0:5ff20db10a96 392 /* Task is about to block because it cannot read from a
fep 0:5ff20db10a96 393 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
fep 0:5ff20db10a96 394 upon which the read was attempted. pxCurrentTCB points to the TCB of the
fep 0:5ff20db10a96 395 task that attempted the read. */
fep 0:5ff20db10a96 396 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
fep 0:5ff20db10a96 397 #endif
fep 0:5ff20db10a96 398
fep 0:5ff20db10a96 399 #ifndef traceBLOCKING_ON_QUEUE_SEND
fep 0:5ff20db10a96 400 /* Task is about to block because it cannot write to a
fep 0:5ff20db10a96 401 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
fep 0:5ff20db10a96 402 upon which the write was attempted. pxCurrentTCB points to the TCB of the
fep 0:5ff20db10a96 403 task that attempted the write. */
fep 0:5ff20db10a96 404 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
fep 0:5ff20db10a96 405 #endif
fep 0:5ff20db10a96 406
fep 0:5ff20db10a96 407 #ifndef configCHECK_FOR_STACK_OVERFLOW
fep 0:5ff20db10a96 408 #define configCHECK_FOR_STACK_OVERFLOW 0
fep 0:5ff20db10a96 409 #endif
fep 0:5ff20db10a96 410
fep 0:5ff20db10a96 411 /* The following event macros are embedded in the kernel API calls. */
fep 0:5ff20db10a96 412
fep 0:5ff20db10a96 413 #ifndef traceMOVED_TASK_TO_READY_STATE
fep 0:5ff20db10a96 414 #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
fep 0:5ff20db10a96 415 #endif
fep 0:5ff20db10a96 416
fep 0:5ff20db10a96 417 #ifndef tracePOST_MOVED_TASK_TO_READY_STATE
fep 0:5ff20db10a96 418 #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
fep 0:5ff20db10a96 419 #endif
fep 0:5ff20db10a96 420
fep 0:5ff20db10a96 421 #ifndef traceQUEUE_CREATE
fep 0:5ff20db10a96 422 #define traceQUEUE_CREATE( pxNewQueue )
fep 0:5ff20db10a96 423 #endif
fep 0:5ff20db10a96 424
fep 0:5ff20db10a96 425 #ifndef traceQUEUE_CREATE_FAILED
fep 0:5ff20db10a96 426 #define traceQUEUE_CREATE_FAILED( ucQueueType )
fep 0:5ff20db10a96 427 #endif
fep 0:5ff20db10a96 428
fep 0:5ff20db10a96 429 #ifndef traceCREATE_MUTEX
fep 0:5ff20db10a96 430 #define traceCREATE_MUTEX( pxNewQueue )
fep 0:5ff20db10a96 431 #endif
fep 0:5ff20db10a96 432
fep 0:5ff20db10a96 433 #ifndef traceCREATE_MUTEX_FAILED
fep 0:5ff20db10a96 434 #define traceCREATE_MUTEX_FAILED()
fep 0:5ff20db10a96 435 #endif
fep 0:5ff20db10a96 436
fep 0:5ff20db10a96 437 #ifndef traceGIVE_MUTEX_RECURSIVE
fep 0:5ff20db10a96 438 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
fep 0:5ff20db10a96 439 #endif
fep 0:5ff20db10a96 440
fep 0:5ff20db10a96 441 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
fep 0:5ff20db10a96 442 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
fep 0:5ff20db10a96 443 #endif
fep 0:5ff20db10a96 444
fep 0:5ff20db10a96 445 #ifndef traceTAKE_MUTEX_RECURSIVE
fep 0:5ff20db10a96 446 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
fep 0:5ff20db10a96 447 #endif
fep 0:5ff20db10a96 448
fep 0:5ff20db10a96 449 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
fep 0:5ff20db10a96 450 #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
fep 0:5ff20db10a96 451 #endif
fep 0:5ff20db10a96 452
fep 0:5ff20db10a96 453 #ifndef traceCREATE_COUNTING_SEMAPHORE
fep 0:5ff20db10a96 454 #define traceCREATE_COUNTING_SEMAPHORE()
fep 0:5ff20db10a96 455 #endif
fep 0:5ff20db10a96 456
fep 0:5ff20db10a96 457 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
fep 0:5ff20db10a96 458 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
fep 0:5ff20db10a96 459 #endif
fep 0:5ff20db10a96 460
fep 0:5ff20db10a96 461 #ifndef traceQUEUE_SEND
fep 0:5ff20db10a96 462 #define traceQUEUE_SEND( pxQueue )
fep 0:5ff20db10a96 463 #endif
fep 0:5ff20db10a96 464
fep 0:5ff20db10a96 465 #ifndef traceQUEUE_SEND_FAILED
fep 0:5ff20db10a96 466 #define traceQUEUE_SEND_FAILED( pxQueue )
fep 0:5ff20db10a96 467 #endif
fep 0:5ff20db10a96 468
fep 0:5ff20db10a96 469 #ifndef traceQUEUE_RECEIVE
fep 0:5ff20db10a96 470 #define traceQUEUE_RECEIVE( pxQueue )
fep 0:5ff20db10a96 471 #endif
fep 0:5ff20db10a96 472
fep 0:5ff20db10a96 473 #ifndef traceQUEUE_PEEK
fep 0:5ff20db10a96 474 #define traceQUEUE_PEEK( pxQueue )
fep 0:5ff20db10a96 475 #endif
fep 0:5ff20db10a96 476
fep 0:5ff20db10a96 477 #ifndef traceQUEUE_PEEK_FROM_ISR
fep 0:5ff20db10a96 478 #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
fep 0:5ff20db10a96 479 #endif
fep 0:5ff20db10a96 480
fep 0:5ff20db10a96 481 #ifndef traceQUEUE_RECEIVE_FAILED
fep 0:5ff20db10a96 482 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
fep 0:5ff20db10a96 483 #endif
fep 0:5ff20db10a96 484
fep 0:5ff20db10a96 485 #ifndef traceQUEUE_SEND_FROM_ISR
fep 0:5ff20db10a96 486 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
fep 0:5ff20db10a96 487 #endif
fep 0:5ff20db10a96 488
fep 0:5ff20db10a96 489 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
fep 0:5ff20db10a96 490 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
fep 0:5ff20db10a96 491 #endif
fep 0:5ff20db10a96 492
fep 0:5ff20db10a96 493 #ifndef traceQUEUE_RECEIVE_FROM_ISR
fep 0:5ff20db10a96 494 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
fep 0:5ff20db10a96 495 #endif
fep 0:5ff20db10a96 496
fep 0:5ff20db10a96 497 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
fep 0:5ff20db10a96 498 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
fep 0:5ff20db10a96 499 #endif
fep 0:5ff20db10a96 500
fep 0:5ff20db10a96 501 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
fep 0:5ff20db10a96 502 #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
fep 0:5ff20db10a96 503 #endif
fep 0:5ff20db10a96 504
fep 0:5ff20db10a96 505 #ifndef traceQUEUE_DELETE
fep 0:5ff20db10a96 506 #define traceQUEUE_DELETE( pxQueue )
fep 0:5ff20db10a96 507 #endif
fep 0:5ff20db10a96 508
fep 0:5ff20db10a96 509 #ifndef traceTASK_CREATE
fep 0:5ff20db10a96 510 #define traceTASK_CREATE( pxNewTCB )
fep 0:5ff20db10a96 511 #endif
fep 0:5ff20db10a96 512
fep 0:5ff20db10a96 513 #ifndef traceTASK_CREATE_FAILED
fep 0:5ff20db10a96 514 #define traceTASK_CREATE_FAILED()
fep 0:5ff20db10a96 515 #endif
fep 0:5ff20db10a96 516
fep 0:5ff20db10a96 517 #ifndef traceTASK_DELETE
fep 0:5ff20db10a96 518 #define traceTASK_DELETE( pxTaskToDelete )
fep 0:5ff20db10a96 519 #endif
fep 0:5ff20db10a96 520
fep 0:5ff20db10a96 521 #ifndef traceTASK_DELAY_UNTIL
fep 0:5ff20db10a96 522 #define traceTASK_DELAY_UNTIL( x )
fep 0:5ff20db10a96 523 #endif
fep 0:5ff20db10a96 524
fep 0:5ff20db10a96 525 #ifndef traceTASK_DELAY
fep 0:5ff20db10a96 526 #define traceTASK_DELAY()
fep 0:5ff20db10a96 527 #endif
fep 0:5ff20db10a96 528
fep 0:5ff20db10a96 529 #ifndef traceTASK_PRIORITY_SET
fep 0:5ff20db10a96 530 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
fep 0:5ff20db10a96 531 #endif
fep 0:5ff20db10a96 532
fep 0:5ff20db10a96 533 #ifndef traceTASK_SUSPEND
fep 0:5ff20db10a96 534 #define traceTASK_SUSPEND( pxTaskToSuspend )
fep 0:5ff20db10a96 535 #endif
fep 0:5ff20db10a96 536
fep 0:5ff20db10a96 537 #ifndef traceTASK_RESUME
fep 0:5ff20db10a96 538 #define traceTASK_RESUME( pxTaskToResume )
fep 0:5ff20db10a96 539 #endif
fep 0:5ff20db10a96 540
fep 0:5ff20db10a96 541 #ifndef traceTASK_RESUME_FROM_ISR
fep 0:5ff20db10a96 542 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
fep 0:5ff20db10a96 543 #endif
fep 0:5ff20db10a96 544
fep 0:5ff20db10a96 545 #ifndef traceTASK_INCREMENT_TICK
fep 0:5ff20db10a96 546 #define traceTASK_INCREMENT_TICK( xTickCount )
fep 0:5ff20db10a96 547 #endif
fep 0:5ff20db10a96 548
fep 0:5ff20db10a96 549 #ifndef traceTIMER_CREATE
fep 0:5ff20db10a96 550 #define traceTIMER_CREATE( pxNewTimer )
fep 0:5ff20db10a96 551 #endif
fep 0:5ff20db10a96 552
fep 0:5ff20db10a96 553 #ifndef traceTIMER_CREATE_FAILED
fep 0:5ff20db10a96 554 #define traceTIMER_CREATE_FAILED()
fep 0:5ff20db10a96 555 #endif
fep 0:5ff20db10a96 556
fep 0:5ff20db10a96 557 #ifndef traceTIMER_COMMAND_SEND
fep 0:5ff20db10a96 558 #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
fep 0:5ff20db10a96 559 #endif
fep 0:5ff20db10a96 560
fep 0:5ff20db10a96 561 #ifndef traceTIMER_EXPIRED
fep 0:5ff20db10a96 562 #define traceTIMER_EXPIRED( pxTimer )
fep 0:5ff20db10a96 563 #endif
fep 0:5ff20db10a96 564
fep 0:5ff20db10a96 565 #ifndef traceTIMER_COMMAND_RECEIVED
fep 0:5ff20db10a96 566 #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
fep 0:5ff20db10a96 567 #endif
fep 0:5ff20db10a96 568
fep 0:5ff20db10a96 569 #ifndef traceMALLOC
fep 0:5ff20db10a96 570 #define traceMALLOC( pvAddress, uiSize )
fep 0:5ff20db10a96 571 #endif
fep 0:5ff20db10a96 572
fep 0:5ff20db10a96 573 #ifndef traceFREE
fep 0:5ff20db10a96 574 #define traceFREE( pvAddress, uiSize )
fep 0:5ff20db10a96 575 #endif
fep 0:5ff20db10a96 576
fep 0:5ff20db10a96 577 #ifndef traceEVENT_GROUP_CREATE
fep 0:5ff20db10a96 578 #define traceEVENT_GROUP_CREATE( xEventGroup )
fep 0:5ff20db10a96 579 #endif
fep 0:5ff20db10a96 580
fep 0:5ff20db10a96 581 #ifndef traceEVENT_GROUP_CREATE_FAILED
fep 0:5ff20db10a96 582 #define traceEVENT_GROUP_CREATE_FAILED()
fep 0:5ff20db10a96 583 #endif
fep 0:5ff20db10a96 584
fep 0:5ff20db10a96 585 #ifndef traceEVENT_GROUP_SYNC_BLOCK
fep 0:5ff20db10a96 586 #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
fep 0:5ff20db10a96 587 #endif
fep 0:5ff20db10a96 588
fep 0:5ff20db10a96 589 #ifndef traceEVENT_GROUP_SYNC_END
fep 0:5ff20db10a96 590 #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
fep 0:5ff20db10a96 591 #endif
fep 0:5ff20db10a96 592
fep 0:5ff20db10a96 593 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
fep 0:5ff20db10a96 594 #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
fep 0:5ff20db10a96 595 #endif
fep 0:5ff20db10a96 596
fep 0:5ff20db10a96 597 #ifndef traceEVENT_GROUP_WAIT_BITS_END
fep 0:5ff20db10a96 598 #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
fep 0:5ff20db10a96 599 #endif
fep 0:5ff20db10a96 600
fep 0:5ff20db10a96 601 #ifndef traceEVENT_GROUP_CLEAR_BITS
fep 0:5ff20db10a96 602 #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
fep 0:5ff20db10a96 603 #endif
fep 0:5ff20db10a96 604
fep 0:5ff20db10a96 605 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
fep 0:5ff20db10a96 606 #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
fep 0:5ff20db10a96 607 #endif
fep 0:5ff20db10a96 608
fep 0:5ff20db10a96 609 #ifndef traceEVENT_GROUP_SET_BITS
fep 0:5ff20db10a96 610 #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
fep 0:5ff20db10a96 611 #endif
fep 0:5ff20db10a96 612
fep 0:5ff20db10a96 613 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
fep 0:5ff20db10a96 614 #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
fep 0:5ff20db10a96 615 #endif
fep 0:5ff20db10a96 616
fep 0:5ff20db10a96 617 #ifndef traceEVENT_GROUP_DELETE
fep 0:5ff20db10a96 618 #define traceEVENT_GROUP_DELETE( xEventGroup )
fep 0:5ff20db10a96 619 #endif
fep 0:5ff20db10a96 620
fep 0:5ff20db10a96 621 #ifndef tracePEND_FUNC_CALL
fep 0:5ff20db10a96 622 #define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret)
fep 0:5ff20db10a96 623 #endif
fep 0:5ff20db10a96 624
fep 0:5ff20db10a96 625 #ifndef tracePEND_FUNC_CALL_FROM_ISR
fep 0:5ff20db10a96 626 #define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret)
fep 0:5ff20db10a96 627 #endif
fep 0:5ff20db10a96 628
fep 0:5ff20db10a96 629 #ifndef traceQUEUE_REGISTRY_ADD
fep 0:5ff20db10a96 630 #define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)
fep 0:5ff20db10a96 631 #endif
fep 0:5ff20db10a96 632
fep 0:5ff20db10a96 633 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
fep 0:5ff20db10a96 634 #define traceTASK_NOTIFY_TAKE_BLOCK()
fep 0:5ff20db10a96 635 #endif
fep 0:5ff20db10a96 636
fep 0:5ff20db10a96 637 #ifndef traceTASK_NOTIFY_TAKE
fep 0:5ff20db10a96 638 #define traceTASK_NOTIFY_TAKE()
fep 0:5ff20db10a96 639 #endif
fep 0:5ff20db10a96 640
fep 0:5ff20db10a96 641 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
fep 0:5ff20db10a96 642 #define traceTASK_NOTIFY_WAIT_BLOCK()
fep 0:5ff20db10a96 643 #endif
fep 0:5ff20db10a96 644
fep 0:5ff20db10a96 645 #ifndef traceTASK_NOTIFY_WAIT
fep 0:5ff20db10a96 646 #define traceTASK_NOTIFY_WAIT()
fep 0:5ff20db10a96 647 #endif
fep 0:5ff20db10a96 648
fep 0:5ff20db10a96 649 #ifndef traceTASK_NOTIFY
fep 0:5ff20db10a96 650 #define traceTASK_NOTIFY()
fep 0:5ff20db10a96 651 #endif
fep 0:5ff20db10a96 652
fep 0:5ff20db10a96 653 #ifndef traceTASK_NOTIFY_FROM_ISR
fep 0:5ff20db10a96 654 #define traceTASK_NOTIFY_FROM_ISR()
fep 0:5ff20db10a96 655 #endif
fep 0:5ff20db10a96 656
fep 0:5ff20db10a96 657 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
fep 0:5ff20db10a96 658 #define traceTASK_NOTIFY_GIVE_FROM_ISR()
fep 0:5ff20db10a96 659 #endif
fep 0:5ff20db10a96 660
fep 0:5ff20db10a96 661 #ifndef configGENERATE_RUN_TIME_STATS
fep 0:5ff20db10a96 662 #define configGENERATE_RUN_TIME_STATS 0
fep 0:5ff20db10a96 663 #endif
fep 0:5ff20db10a96 664
fep 0:5ff20db10a96 665 #if ( configGENERATE_RUN_TIME_STATS == 1 )
fep 0:5ff20db10a96 666
fep 0:5ff20db10a96 667 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
fep 0:5ff20db10a96 668 #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.
fep 0:5ff20db10a96 669 #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
fep 0:5ff20db10a96 670
fep 0:5ff20db10a96 671 #ifndef portGET_RUN_TIME_COUNTER_VALUE
fep 0:5ff20db10a96 672 #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
fep 0:5ff20db10a96 673 #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.
fep 0:5ff20db10a96 674 #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
fep 0:5ff20db10a96 675 #endif /* portGET_RUN_TIME_COUNTER_VALUE */
fep 0:5ff20db10a96 676
fep 0:5ff20db10a96 677 #endif /* configGENERATE_RUN_TIME_STATS */
fep 0:5ff20db10a96 678
fep 0:5ff20db10a96 679 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
fep 0:5ff20db10a96 680 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
fep 0:5ff20db10a96 681 #endif
fep 0:5ff20db10a96 682
fep 0:5ff20db10a96 683 #ifndef configUSE_MALLOC_FAILED_HOOK
fep 0:5ff20db10a96 684 #define configUSE_MALLOC_FAILED_HOOK 0
fep 0:5ff20db10a96 685 #endif
fep 0:5ff20db10a96 686
fep 0:5ff20db10a96 687 #ifndef portPRIVILEGE_BIT
fep 0:5ff20db10a96 688 #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
fep 0:5ff20db10a96 689 #endif
fep 0:5ff20db10a96 690
fep 0:5ff20db10a96 691 #ifndef portYIELD_WITHIN_API
fep 0:5ff20db10a96 692 #define portYIELD_WITHIN_API portYIELD
fep 0:5ff20db10a96 693 #endif
fep 0:5ff20db10a96 694
fep 0:5ff20db10a96 695 #ifndef portSUPPRESS_TICKS_AND_SLEEP
fep 0:5ff20db10a96 696 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
fep 0:5ff20db10a96 697 #endif
fep 0:5ff20db10a96 698
fep 0:5ff20db10a96 699 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
fep 0:5ff20db10a96 700 #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
fep 0:5ff20db10a96 701 #endif
fep 0:5ff20db10a96 702
fep 0:5ff20db10a96 703 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
fep 0:5ff20db10a96 704 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
fep 0:5ff20db10a96 705 #endif
fep 0:5ff20db10a96 706
fep 0:5ff20db10a96 707 #ifndef configUSE_TICKLESS_IDLE
fep 0:5ff20db10a96 708 #define configUSE_TICKLESS_IDLE 0
fep 0:5ff20db10a96 709 #endif
fep 0:5ff20db10a96 710
fep 0:5ff20db10a96 711 #ifndef configPRE_SLEEP_PROCESSING
fep 0:5ff20db10a96 712 #define configPRE_SLEEP_PROCESSING( x )
fep 0:5ff20db10a96 713 #endif
fep 0:5ff20db10a96 714
fep 0:5ff20db10a96 715 #ifndef configPOST_SLEEP_PROCESSING
fep 0:5ff20db10a96 716 #define configPOST_SLEEP_PROCESSING( x )
fep 0:5ff20db10a96 717 #endif
fep 0:5ff20db10a96 718
fep 0:5ff20db10a96 719 #ifndef configUSE_QUEUE_SETS
fep 0:5ff20db10a96 720 #define configUSE_QUEUE_SETS 0
fep 0:5ff20db10a96 721 #endif
fep 0:5ff20db10a96 722
fep 0:5ff20db10a96 723 #ifndef portTASK_USES_FLOATING_POINT
fep 0:5ff20db10a96 724 #define portTASK_USES_FLOATING_POINT()
fep 0:5ff20db10a96 725 #endif
fep 0:5ff20db10a96 726
fep 0:5ff20db10a96 727 #ifndef configUSE_TIME_SLICING
fep 0:5ff20db10a96 728 #define configUSE_TIME_SLICING 1
fep 0:5ff20db10a96 729 #endif
fep 0:5ff20db10a96 730
fep 0:5ff20db10a96 731 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
fep 0:5ff20db10a96 732 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
fep 0:5ff20db10a96 733 #endif
fep 0:5ff20db10a96 734
fep 0:5ff20db10a96 735 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
fep 0:5ff20db10a96 736 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
fep 0:5ff20db10a96 737 #endif
fep 0:5ff20db10a96 738
fep 0:5ff20db10a96 739 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
fep 0:5ff20db10a96 740 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
fep 0:5ff20db10a96 741 #endif
fep 0:5ff20db10a96 742
fep 0:5ff20db10a96 743 #ifndef configUSE_TRACE_FACILITY
fep 0:5ff20db10a96 744 #define configUSE_TRACE_FACILITY 0
fep 0:5ff20db10a96 745 #endif
fep 0:5ff20db10a96 746
fep 0:5ff20db10a96 747 #ifndef mtCOVERAGE_TEST_MARKER
fep 0:5ff20db10a96 748 #define mtCOVERAGE_TEST_MARKER()
fep 0:5ff20db10a96 749 #endif
fep 0:5ff20db10a96 750
fep 0:5ff20db10a96 751 #ifndef mtCOVERAGE_TEST_DELAY
fep 0:5ff20db10a96 752 #define mtCOVERAGE_TEST_DELAY()
fep 0:5ff20db10a96 753 #endif
fep 0:5ff20db10a96 754
fep 0:5ff20db10a96 755 #ifndef portASSERT_IF_IN_ISR
fep 0:5ff20db10a96 756 #define portASSERT_IF_IN_ISR()
fep 0:5ff20db10a96 757 #endif
fep 0:5ff20db10a96 758
fep 0:5ff20db10a96 759 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
fep 0:5ff20db10a96 760 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
fep 0:5ff20db10a96 761 #endif
fep 0:5ff20db10a96 762
fep 0:5ff20db10a96 763 #ifndef configAPPLICATION_ALLOCATED_HEAP
fep 0:5ff20db10a96 764 #define configAPPLICATION_ALLOCATED_HEAP 0
fep 0:5ff20db10a96 765 #endif
fep 0:5ff20db10a96 766
fep 0:5ff20db10a96 767 #ifndef configUSE_TASK_NOTIFICATIONS
fep 0:5ff20db10a96 768 #define configUSE_TASK_NOTIFICATIONS 1
fep 0:5ff20db10a96 769 #endif
fep 0:5ff20db10a96 770
fep 0:5ff20db10a96 771 #ifndef portTICK_TYPE_IS_ATOMIC
fep 0:5ff20db10a96 772 #define portTICK_TYPE_IS_ATOMIC 0
fep 0:5ff20db10a96 773 #endif
fep 0:5ff20db10a96 774
fep 0:5ff20db10a96 775 #ifndef configSUPPORT_STATIC_ALLOCATION
fep 0:5ff20db10a96 776 /* Defaults to 0 for backward compatibility. */
fep 0:5ff20db10a96 777 #define configSUPPORT_STATIC_ALLOCATION 0
fep 0:5ff20db10a96 778 #endif
fep 0:5ff20db10a96 779
fep 0:5ff20db10a96 780 #ifndef configSUPPORT_DYNAMIC_ALLOCATION
fep 0:5ff20db10a96 781 /* Defaults to 1 for backward compatibility. */
fep 0:5ff20db10a96 782 #define configSUPPORT_DYNAMIC_ALLOCATION 1
fep 0:5ff20db10a96 783 #endif
fep 0:5ff20db10a96 784
fep 0:5ff20db10a96 785 /* Sanity check the configuration. */
fep 0:5ff20db10a96 786 #if( configUSE_TICKLESS_IDLE != 0 )
fep 0:5ff20db10a96 787 #if( INCLUDE_vTaskSuspend != 1 )
fep 0:5ff20db10a96 788 #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0
fep 0:5ff20db10a96 789 #endif /* INCLUDE_vTaskSuspend */
fep 0:5ff20db10a96 790 #endif /* configUSE_TICKLESS_IDLE */
fep 0:5ff20db10a96 791
fep 0:5ff20db10a96 792 #if( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
fep 0:5ff20db10a96 793 #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
fep 0:5ff20db10a96 794 #endif
fep 0:5ff20db10a96 795
fep 0:5ff20db10a96 796 #if( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )
fep 0:5ff20db10a96 797 #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
fep 0:5ff20db10a96 798 #endif
fep 0:5ff20db10a96 799
fep 0:5ff20db10a96 800 #if( portTICK_TYPE_IS_ATOMIC == 0 )
fep 0:5ff20db10a96 801 /* Either variables of tick type cannot be read atomically, or
fep 0:5ff20db10a96 802 portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
fep 0:5ff20db10a96 803 the tick count is returned to the standard critical section macros. */
fep 0:5ff20db10a96 804 #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
fep 0:5ff20db10a96 805 #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
fep 0:5ff20db10a96 806 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
fep 0:5ff20db10a96 807 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
fep 0:5ff20db10a96 808 #else
fep 0:5ff20db10a96 809 /* The tick type can be read atomically, so critical sections used when the
fep 0:5ff20db10a96 810 tick count is returned can be defined away. */
fep 0:5ff20db10a96 811 #define portTICK_TYPE_ENTER_CRITICAL()
fep 0:5ff20db10a96 812 #define portTICK_TYPE_EXIT_CRITICAL()
fep 0:5ff20db10a96 813 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
fep 0:5ff20db10a96 814 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
fep 0:5ff20db10a96 815 #endif
fep 0:5ff20db10a96 816
fep 0:5ff20db10a96 817 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
fep 0:5ff20db10a96 818 V8 if desired. */
fep 0:5ff20db10a96 819 #ifndef configENABLE_BACKWARD_COMPATIBILITY
fep 0:5ff20db10a96 820 #define configENABLE_BACKWARD_COMPATIBILITY 1
fep 0:5ff20db10a96 821 #endif
fep 0:5ff20db10a96 822
fep 0:5ff20db10a96 823 #if configENABLE_BACKWARD_COMPATIBILITY == 1
fep 0:5ff20db10a96 824 #define eTaskStateGet eTaskGetState
fep 0:5ff20db10a96 825 #define portTickType TickType_t
fep 0:5ff20db10a96 826 #define xTaskHandle TaskHandle_t
fep 0:5ff20db10a96 827 #define xQueueHandle QueueHandle_t
fep 0:5ff20db10a96 828 #define xSemaphoreHandle SemaphoreHandle_t
fep 0:5ff20db10a96 829 #define xQueueSetHandle QueueSetHandle_t
fep 0:5ff20db10a96 830 #define xQueueSetMemberHandle QueueSetMemberHandle_t
fep 0:5ff20db10a96 831 #define xTimeOutType TimeOut_t
fep 0:5ff20db10a96 832 #define xMemoryRegion MemoryRegion_t
fep 0:5ff20db10a96 833 #define xTaskParameters TaskParameters_t
fep 0:5ff20db10a96 834 #define xTaskStatusType TaskStatus_t
fep 0:5ff20db10a96 835 #define xTimerHandle TimerHandle_t
fep 0:5ff20db10a96 836 #define xCoRoutineHandle CoRoutineHandle_t
fep 0:5ff20db10a96 837 #define pdTASK_HOOK_CODE TaskHookFunction_t
fep 0:5ff20db10a96 838 #define portTICK_RATE_MS portTICK_PERIOD_MS
fep 0:5ff20db10a96 839 #define pcTaskGetTaskName pcTaskGetName
fep 0:5ff20db10a96 840 #define pcTimerGetTimerName pcTimerGetName
fep 0:5ff20db10a96 841 #define pcQueueGetQueueName pcQueueGetName
fep 0:5ff20db10a96 842 #define vTaskGetTaskInfo vTaskGetInfo
fep 0:5ff20db10a96 843
fep 0:5ff20db10a96 844 /* Backward compatibility within the scheduler code only - these definitions
fep 0:5ff20db10a96 845 are not really required but are included for completeness. */
fep 0:5ff20db10a96 846 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
fep 0:5ff20db10a96 847 #define pdTASK_CODE TaskFunction_t
fep 0:5ff20db10a96 848 #define xListItem ListItem_t
fep 0:5ff20db10a96 849 #define xList List_t
fep 0:5ff20db10a96 850 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
fep 0:5ff20db10a96 851
fep 0:5ff20db10a96 852 #if( configUSE_ALTERNATIVE_API != 0 )
fep 0:5ff20db10a96 853 #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0
fep 0:5ff20db10a96 854 #endif
fep 0:5ff20db10a96 855
fep 0:5ff20db10a96 856 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
fep 0:5ff20db10a96 857 if floating point hardware is otherwise supported by the FreeRTOS port in use.
fep 0:5ff20db10a96 858 This constant is not supported by all FreeRTOS ports that include floating
fep 0:5ff20db10a96 859 point support. */
fep 0:5ff20db10a96 860 #ifndef configUSE_TASK_FPU_SUPPORT
fep 0:5ff20db10a96 861 #define configUSE_TASK_FPU_SUPPORT 1
fep 0:5ff20db10a96 862 #endif
fep 0:5ff20db10a96 863
fep 0:5ff20db10a96 864 /*
fep 0:5ff20db10a96 865 * In line with software engineering best practice, FreeRTOS implements a strict
fep 0:5ff20db10a96 866 * data hiding policy, so the real structures used by FreeRTOS to maintain the
fep 0:5ff20db10a96 867 * state of tasks, queues, semaphores, etc. are not accessible to the application
fep 0:5ff20db10a96 868 * code. However, if the application writer wants to statically allocate such
fep 0:5ff20db10a96 869 * an object then the size of the object needs to be know. Dummy structures
fep 0:5ff20db10a96 870 * that are guaranteed to have the same size and alignment requirements of the
fep 0:5ff20db10a96 871 * real objects are used for this purpose. The dummy list and list item
fep 0:5ff20db10a96 872 * structures below are used for inclusion in such a dummy structure.
fep 0:5ff20db10a96 873 */
fep 0:5ff20db10a96 874 struct xSTATIC_LIST_ITEM
fep 0:5ff20db10a96 875 {
fep 0:5ff20db10a96 876 TickType_t xDummy1;
fep 0:5ff20db10a96 877 void *pvDummy2[ 4 ];
fep 0:5ff20db10a96 878 };
fep 0:5ff20db10a96 879 typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
fep 0:5ff20db10a96 880
fep 0:5ff20db10a96 881 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
fep 0:5ff20db10a96 882 struct xSTATIC_MINI_LIST_ITEM
fep 0:5ff20db10a96 883 {
fep 0:5ff20db10a96 884 TickType_t xDummy1;
fep 0:5ff20db10a96 885 void *pvDummy2[ 2 ];
fep 0:5ff20db10a96 886 };
fep 0:5ff20db10a96 887 typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
fep 0:5ff20db10a96 888
fep 0:5ff20db10a96 889 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
fep 0:5ff20db10a96 890 typedef struct xSTATIC_LIST
fep 0:5ff20db10a96 891 {
fep 0:5ff20db10a96 892 UBaseType_t uxDummy1;
fep 0:5ff20db10a96 893 void *pvDummy2;
fep 0:5ff20db10a96 894 StaticMiniListItem_t xDummy3;
fep 0:5ff20db10a96 895 } StaticList_t;
fep 0:5ff20db10a96 896
fep 0:5ff20db10a96 897 /*
fep 0:5ff20db10a96 898 * In line with software engineering best practice, especially when supplying a
fep 0:5ff20db10a96 899 * library that is likely to change in future versions, FreeRTOS implements a
fep 0:5ff20db10a96 900 * strict data hiding policy. This means the Task structure used internally by
fep 0:5ff20db10a96 901 * FreeRTOS is not accessible to application code. However, if the application
fep 0:5ff20db10a96 902 * writer wants to statically allocate the memory required to create a task then
fep 0:5ff20db10a96 903 * the size of the task object needs to be know. The StaticTask_t structure
fep 0:5ff20db10a96 904 * below is provided for this purpose. Its sizes and alignment requirements are
fep 0:5ff20db10a96 905 * guaranteed to match those of the genuine structure, no matter which
fep 0:5ff20db10a96 906 * architecture is being used, and no matter how the values in FreeRTOSConfig.h
fep 0:5ff20db10a96 907 * are set. Its contents are somewhat obfuscated in the hope users will
fep 0:5ff20db10a96 908 * recognise that it would be unwise to make direct use of the structure members.
fep 0:5ff20db10a96 909 */
fep 0:5ff20db10a96 910 typedef struct xSTATIC_TCB
fep 0:5ff20db10a96 911 {
fep 0:5ff20db10a96 912 void *pxDummy1;
fep 0:5ff20db10a96 913 #if ( portUSING_MPU_WRAPPERS == 1 )
fep 0:5ff20db10a96 914 xMPU_SETTINGS xDummy2;
fep 0:5ff20db10a96 915 #endif
fep 0:5ff20db10a96 916 StaticListItem_t xDummy3[ 2 ];
fep 0:5ff20db10a96 917 UBaseType_t uxDummy5;
fep 0:5ff20db10a96 918 void *pxDummy6;
fep 0:5ff20db10a96 919 uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
fep 0:5ff20db10a96 920 #if ( portSTACK_GROWTH > 0 )
fep 0:5ff20db10a96 921 void *pxDummy8;
fep 0:5ff20db10a96 922 #endif
fep 0:5ff20db10a96 923 #if ( portCRITICAL_NESTING_IN_TCB == 1 )
fep 0:5ff20db10a96 924 UBaseType_t uxDummy9;
fep 0:5ff20db10a96 925 #endif
fep 0:5ff20db10a96 926 #if ( configUSE_TRACE_FACILITY == 1 )
fep 0:5ff20db10a96 927 UBaseType_t uxDummy10[ 2 ];
fep 0:5ff20db10a96 928 #endif
fep 0:5ff20db10a96 929 #if ( configUSE_MUTEXES == 1 )
fep 0:5ff20db10a96 930 UBaseType_t uxDummy12[ 2 ];
fep 0:5ff20db10a96 931 #endif
fep 0:5ff20db10a96 932 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
fep 0:5ff20db10a96 933 void *pxDummy14;
fep 0:5ff20db10a96 934 #endif
fep 0:5ff20db10a96 935 #if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
fep 0:5ff20db10a96 936 void *pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
fep 0:5ff20db10a96 937 #endif
fep 0:5ff20db10a96 938 #if ( configGENERATE_RUN_TIME_STATS == 1 )
fep 0:5ff20db10a96 939 uint32_t ulDummy16;
fep 0:5ff20db10a96 940 #endif
fep 0:5ff20db10a96 941 #if ( configUSE_NEWLIB_REENTRANT == 1 )
fep 0:5ff20db10a96 942 struct _reent xDummy17;
fep 0:5ff20db10a96 943 #endif
fep 0:5ff20db10a96 944 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
fep 0:5ff20db10a96 945 uint32_t ulDummy18;
fep 0:5ff20db10a96 946 uint8_t ucDummy19;
fep 0:5ff20db10a96 947 #endif
fep 0:5ff20db10a96 948 #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
fep 0:5ff20db10a96 949 uint8_t uxDummy20;
fep 0:5ff20db10a96 950 #endif
fep 0:5ff20db10a96 951
fep 0:5ff20db10a96 952 } StaticTask_t;
fep 0:5ff20db10a96 953
fep 0:5ff20db10a96 954 /*
fep 0:5ff20db10a96 955 * In line with software engineering best practice, especially when supplying a
fep 0:5ff20db10a96 956 * library that is likely to change in future versions, FreeRTOS implements a
fep 0:5ff20db10a96 957 * strict data hiding policy. This means the Queue structure used internally by
fep 0:5ff20db10a96 958 * FreeRTOS is not accessible to application code. However, if the application
fep 0:5ff20db10a96 959 * writer wants to statically allocate the memory required to create a queue
fep 0:5ff20db10a96 960 * then the size of the queue object needs to be know. The StaticQueue_t
fep 0:5ff20db10a96 961 * structure below is provided for this purpose. Its sizes and alignment
fep 0:5ff20db10a96 962 * requirements are guaranteed to match those of the genuine structure, no
fep 0:5ff20db10a96 963 * matter which architecture is being used, and no matter how the values in
fep 0:5ff20db10a96 964 * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope
fep 0:5ff20db10a96 965 * users will recognise that it would be unwise to make direct use of the
fep 0:5ff20db10a96 966 * structure members.
fep 0:5ff20db10a96 967 */
fep 0:5ff20db10a96 968 typedef struct xSTATIC_QUEUE
fep 0:5ff20db10a96 969 {
fep 0:5ff20db10a96 970 void *pvDummy1[ 3 ];
fep 0:5ff20db10a96 971
fep 0:5ff20db10a96 972 union
fep 0:5ff20db10a96 973 {
fep 0:5ff20db10a96 974 void *pvDummy2;
fep 0:5ff20db10a96 975 UBaseType_t uxDummy2;
fep 0:5ff20db10a96 976 } u;
fep 0:5ff20db10a96 977
fep 0:5ff20db10a96 978 StaticList_t xDummy3[ 2 ];
fep 0:5ff20db10a96 979 UBaseType_t uxDummy4[ 3 ];
fep 0:5ff20db10a96 980 uint8_t ucDummy5[ 2 ];
fep 0:5ff20db10a96 981
fep 0:5ff20db10a96 982 #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
fep 0:5ff20db10a96 983 uint8_t ucDummy6;
fep 0:5ff20db10a96 984 #endif
fep 0:5ff20db10a96 985
fep 0:5ff20db10a96 986 #if ( configUSE_QUEUE_SETS == 1 )
fep 0:5ff20db10a96 987 void *pvDummy7;
fep 0:5ff20db10a96 988 #endif
fep 0:5ff20db10a96 989
fep 0:5ff20db10a96 990 #if ( configUSE_TRACE_FACILITY == 1 )
fep 0:5ff20db10a96 991 UBaseType_t uxDummy8;
fep 0:5ff20db10a96 992 uint8_t ucDummy9;
fep 0:5ff20db10a96 993 #endif
fep 0:5ff20db10a96 994
fep 0:5ff20db10a96 995 } StaticQueue_t;
fep 0:5ff20db10a96 996 typedef StaticQueue_t StaticSemaphore_t;
fep 0:5ff20db10a96 997
fep 0:5ff20db10a96 998 /*
fep 0:5ff20db10a96 999 * In line with software engineering best practice, especially when supplying a
fep 0:5ff20db10a96 1000 * library that is likely to change in future versions, FreeRTOS implements a
fep 0:5ff20db10a96 1001 * strict data hiding policy. This means the event group structure used
fep 0:5ff20db10a96 1002 * internally by FreeRTOS is not accessible to application code. However, if
fep 0:5ff20db10a96 1003 * the application writer wants to statically allocate the memory required to
fep 0:5ff20db10a96 1004 * create an event group then the size of the event group object needs to be
fep 0:5ff20db10a96 1005 * know. The StaticEventGroup_t structure below is provided for this purpose.
fep 0:5ff20db10a96 1006 * Its sizes and alignment requirements are guaranteed to match those of the
fep 0:5ff20db10a96 1007 * genuine structure, no matter which architecture is being used, and no matter
fep 0:5ff20db10a96 1008 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
fep 0:5ff20db10a96 1009 * obfuscated in the hope users will recognise that it would be unwise to make
fep 0:5ff20db10a96 1010 * direct use of the structure members.
fep 0:5ff20db10a96 1011 */
fep 0:5ff20db10a96 1012 typedef struct xSTATIC_EVENT_GROUP
fep 0:5ff20db10a96 1013 {
fep 0:5ff20db10a96 1014 TickType_t xDummy1;
fep 0:5ff20db10a96 1015 StaticList_t xDummy2;
fep 0:5ff20db10a96 1016
fep 0:5ff20db10a96 1017 #if( configUSE_TRACE_FACILITY == 1 )
fep 0:5ff20db10a96 1018 UBaseType_t uxDummy3;
fep 0:5ff20db10a96 1019 #endif
fep 0:5ff20db10a96 1020
fep 0:5ff20db10a96 1021 #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
fep 0:5ff20db10a96 1022 uint8_t ucDummy4;
fep 0:5ff20db10a96 1023 #endif
fep 0:5ff20db10a96 1024
fep 0:5ff20db10a96 1025 } StaticEventGroup_t;
fep 0:5ff20db10a96 1026
fep 0:5ff20db10a96 1027 /*
fep 0:5ff20db10a96 1028 * In line with software engineering best practice, especially when supplying a
fep 0:5ff20db10a96 1029 * library that is likely to change in future versions, FreeRTOS implements a
fep 0:5ff20db10a96 1030 * strict data hiding policy. This means the software timer structure used
fep 0:5ff20db10a96 1031 * internally by FreeRTOS is not accessible to application code. However, if
fep 0:5ff20db10a96 1032 * the application writer wants to statically allocate the memory required to
fep 0:5ff20db10a96 1033 * create a software timer then the size of the queue object needs to be know.
fep 0:5ff20db10a96 1034 * The StaticTimer_t structure below is provided for this purpose. Its sizes
fep 0:5ff20db10a96 1035 * and alignment requirements are guaranteed to match those of the genuine
fep 0:5ff20db10a96 1036 * structure, no matter which architecture is being used, and no matter how the
fep 0:5ff20db10a96 1037 * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in
fep 0:5ff20db10a96 1038 * the hope users will recognise that it would be unwise to make direct use of
fep 0:5ff20db10a96 1039 * the structure members.
fep 0:5ff20db10a96 1040 */
fep 0:5ff20db10a96 1041 typedef struct xSTATIC_TIMER
fep 0:5ff20db10a96 1042 {
fep 0:5ff20db10a96 1043 void *pvDummy1;
fep 0:5ff20db10a96 1044 StaticListItem_t xDummy2;
fep 0:5ff20db10a96 1045 TickType_t xDummy3;
fep 0:5ff20db10a96 1046 UBaseType_t uxDummy4;
fep 0:5ff20db10a96 1047 void *pvDummy5[ 2 ];
fep 0:5ff20db10a96 1048 #if( configUSE_TRACE_FACILITY == 1 )
fep 0:5ff20db10a96 1049 UBaseType_t uxDummy6;
fep 0:5ff20db10a96 1050 #endif
fep 0:5ff20db10a96 1051
fep 0:5ff20db10a96 1052 #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
fep 0:5ff20db10a96 1053 uint8_t ucDummy7;
fep 0:5ff20db10a96 1054 #endif
fep 0:5ff20db10a96 1055
fep 0:5ff20db10a96 1056 } StaticTimer_t;
fep 0:5ff20db10a96 1057
fep 0:5ff20db10a96 1058 #ifdef __cplusplus
fep 0:5ff20db10a96 1059 }
fep 0:5ff20db10a96 1060 #endif
fep 0:5ff20db10a96 1061
fep 0:5ff20db10a96 1062 #endif /* INC_FREERTOS_H */
fep 0:5ff20db10a96 1063
fep 0:5ff20db10a96 1064