FreeRTOS v_8.2.1 for LPC1768

Dependents:   frtos_v_8_bluetooth frtos_v_8_pololu frtos_v_8_Final

Committer:
JoaoJardim
Date:
Mon Dec 10 10:04:09 2018 +0000
Revision:
1:2f4de0d9dc8b
Parent:
0:91ad48ad5687
Same implementation as freertos_bluetooth at this time, but with FreeRTOS v_8.2.1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:91ad48ad5687 1 /*
dflet 0:91ad48ad5687 2 FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.
dflet 0:91ad48ad5687 3 All rights reserved
dflet 0:91ad48ad5687 4
dflet 0:91ad48ad5687 5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
dflet 0:91ad48ad5687 6
dflet 0:91ad48ad5687 7 This file is part of the FreeRTOS distribution.
dflet 0:91ad48ad5687 8
dflet 0:91ad48ad5687 9 FreeRTOS is free software; you can redistribute it and/or modify it under
dflet 0:91ad48ad5687 10 the terms of the GNU General Public License (version 2) as published by the
dflet 0:91ad48ad5687 11 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
dflet 0:91ad48ad5687 12
dflet 0:91ad48ad5687 13 ***************************************************************************
dflet 0:91ad48ad5687 14 >>! NOTE: The modification to the GPL is included to allow you to !<<
dflet 0:91ad48ad5687 15 >>! distribute a combined work that includes FreeRTOS without being !<<
dflet 0:91ad48ad5687 16 >>! obliged to provide the source code for proprietary components !<<
dflet 0:91ad48ad5687 17 >>! outside of the FreeRTOS kernel. !<<
dflet 0:91ad48ad5687 18 ***************************************************************************
dflet 0:91ad48ad5687 19
dflet 0:91ad48ad5687 20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
dflet 0:91ad48ad5687 21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
dflet 0:91ad48ad5687 22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
dflet 0:91ad48ad5687 23 link: http://www.freertos.org/a00114.html
dflet 0:91ad48ad5687 24
dflet 0:91ad48ad5687 25 ***************************************************************************
dflet 0:91ad48ad5687 26 * *
dflet 0:91ad48ad5687 27 * FreeRTOS provides completely free yet professionally developed, *
dflet 0:91ad48ad5687 28 * robust, strictly quality controlled, supported, and cross *
dflet 0:91ad48ad5687 29 * platform software that is more than just the market leader, it *
dflet 0:91ad48ad5687 30 * is the industry's de facto standard. *
dflet 0:91ad48ad5687 31 * *
dflet 0:91ad48ad5687 32 * Help yourself get started quickly while simultaneously helping *
dflet 0:91ad48ad5687 33 * to support the FreeRTOS project by purchasing a FreeRTOS *
dflet 0:91ad48ad5687 34 * tutorial book, reference manual, or both: *
dflet 0:91ad48ad5687 35 * http://www.FreeRTOS.org/Documentation *
dflet 0:91ad48ad5687 36 * *
dflet 0:91ad48ad5687 37 ***************************************************************************
dflet 0:91ad48ad5687 38
dflet 0:91ad48ad5687 39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
dflet 0:91ad48ad5687 40 the FAQ page "My application does not run, what could be wrong?". Have you
dflet 0:91ad48ad5687 41 defined configASSERT()?
dflet 0:91ad48ad5687 42
dflet 0:91ad48ad5687 43 http://www.FreeRTOS.org/support - In return for receiving this top quality
dflet 0:91ad48ad5687 44 embedded software for free we request you assist our global community by
dflet 0:91ad48ad5687 45 participating in the support forum.
dflet 0:91ad48ad5687 46
dflet 0:91ad48ad5687 47 http://www.FreeRTOS.org/training - Investing in training allows your team to
dflet 0:91ad48ad5687 48 be as productive as possible as early as possible. Now you can receive
dflet 0:91ad48ad5687 49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
dflet 0:91ad48ad5687 50 Ltd, and the world's leading authority on the world's leading RTOS.
dflet 0:91ad48ad5687 51
dflet 0:91ad48ad5687 52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
dflet 0:91ad48ad5687 53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
dflet 0:91ad48ad5687 54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
dflet 0:91ad48ad5687 55
dflet 0:91ad48ad5687 56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
dflet 0:91ad48ad5687 57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
dflet 0:91ad48ad5687 58
dflet 0:91ad48ad5687 59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
dflet 0:91ad48ad5687 60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
dflet 0:91ad48ad5687 61 licenses offer ticketed support, indemnification and commercial middleware.
dflet 0:91ad48ad5687 62
dflet 0:91ad48ad5687 63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
dflet 0:91ad48ad5687 64 engineered and independently SIL3 certified version for use in safety and
dflet 0:91ad48ad5687 65 mission critical applications that require provable dependability.
dflet 0:91ad48ad5687 66
dflet 0:91ad48ad5687 67 1 tab == 4 spaces!
dflet 0:91ad48ad5687 68 */
dflet 0:91ad48ad5687 69
dflet 0:91ad48ad5687 70 #ifndef INC_FREERTOS_H
dflet 0:91ad48ad5687 71 #define INC_FREERTOS_H
dflet 0:91ad48ad5687 72
dflet 0:91ad48ad5687 73 /*
dflet 0:91ad48ad5687 74 * Include the generic headers required for the FreeRTOS port being used.
dflet 0:91ad48ad5687 75 */
dflet 0:91ad48ad5687 76 #include <stddef.h>
dflet 0:91ad48ad5687 77
dflet 0:91ad48ad5687 78 /*
dflet 0:91ad48ad5687 79 * If stdint.h cannot be located then:
dflet 0:91ad48ad5687 80 * + If using GCC ensure the -nostdint options is *not* being used.
dflet 0:91ad48ad5687 81 * + Ensure the project's include path includes the directory in which your
dflet 0:91ad48ad5687 82 * compiler stores stdint.h.
dflet 0:91ad48ad5687 83 * + Set any compiler options necessary for it to support C99, as technically
dflet 0:91ad48ad5687 84 * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
dflet 0:91ad48ad5687 85 * other way).
dflet 0:91ad48ad5687 86 * + The FreeRTOS download includes a simple stdint.h definition that can be
dflet 0:91ad48ad5687 87 * used in cases where none is provided by the compiler. The files only
dflet 0:91ad48ad5687 88 * contains the typedefs required to build FreeRTOS. Read the instructions
dflet 0:91ad48ad5687 89 * in FreeRTOS/source/stdint.readme for more information.
dflet 0:91ad48ad5687 90 */
dflet 0:91ad48ad5687 91 #include <stdint.h> /* READ COMMENT ABOVE. */
dflet 0:91ad48ad5687 92
dflet 0:91ad48ad5687 93 #ifdef __cplusplus
dflet 0:91ad48ad5687 94 extern "C" {
dflet 0:91ad48ad5687 95 #endif
dflet 0:91ad48ad5687 96
dflet 0:91ad48ad5687 97 /* Application specific configuration options. */
dflet 0:91ad48ad5687 98 #include "FreeRTOSConfig.h"
dflet 0:91ad48ad5687 99
dflet 0:91ad48ad5687 100 /* Basic FreeRTOS definitions. */
dflet 0:91ad48ad5687 101 #include "projdefs.h"
dflet 0:91ad48ad5687 102
dflet 0:91ad48ad5687 103 /* Definitions specific to the port being used. */
dflet 0:91ad48ad5687 104 #include "portable.h"
dflet 0:91ad48ad5687 105
dflet 0:91ad48ad5687 106 /*
dflet 0:91ad48ad5687 107 * Check all the required application specific macros have been defined.
dflet 0:91ad48ad5687 108 * These macros are application specific and (as downloaded) are defined
dflet 0:91ad48ad5687 109 * within FreeRTOSConfig.h.
dflet 0:91ad48ad5687 110 */
dflet 0:91ad48ad5687 111
dflet 0:91ad48ad5687 112 #ifndef configMINIMAL_STACK_SIZE
dflet 0:91ad48ad5687 113 #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.
dflet 0:91ad48ad5687 114 #endif
dflet 0:91ad48ad5687 115
dflet 0:91ad48ad5687 116 #ifndef configMAX_PRIORITIES
dflet 0:91ad48ad5687 117 #error Missing definition: configMAX_PRIORITIES must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
dflet 0:91ad48ad5687 118 #endif
dflet 0:91ad48ad5687 119
dflet 0:91ad48ad5687 120 #ifndef configUSE_PREEMPTION
dflet 0:91ad48ad5687 121 #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.
dflet 0:91ad48ad5687 122 #endif
dflet 0:91ad48ad5687 123
dflet 0:91ad48ad5687 124 #ifndef configUSE_IDLE_HOOK
dflet 0:91ad48ad5687 125 #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.
dflet 0:91ad48ad5687 126 #endif
dflet 0:91ad48ad5687 127
dflet 0:91ad48ad5687 128 #ifndef configUSE_TICK_HOOK
dflet 0:91ad48ad5687 129 #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.
dflet 0:91ad48ad5687 130 #endif
dflet 0:91ad48ad5687 131
dflet 0:91ad48ad5687 132 #ifndef INCLUDE_vTaskPrioritySet
dflet 0:91ad48ad5687 133 #error Missing definition: INCLUDE_vTaskPrioritySet must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
dflet 0:91ad48ad5687 134 #endif
dflet 0:91ad48ad5687 135
dflet 0:91ad48ad5687 136 #ifndef INCLUDE_uxTaskPriorityGet
dflet 0:91ad48ad5687 137 #error Missing definition: INCLUDE_uxTaskPriorityGet must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
dflet 0:91ad48ad5687 138 #endif
dflet 0:91ad48ad5687 139
dflet 0:91ad48ad5687 140 #ifndef INCLUDE_vTaskDelete
dflet 0:91ad48ad5687 141 #error Missing definition: INCLUDE_vTaskDelete must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
dflet 0:91ad48ad5687 142 #endif
dflet 0:91ad48ad5687 143
dflet 0:91ad48ad5687 144 #ifndef INCLUDE_vTaskSuspend
dflet 0:91ad48ad5687 145 #error Missing definition: INCLUDE_vTaskSuspend must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
dflet 0:91ad48ad5687 146 #endif
dflet 0:91ad48ad5687 147
dflet 0:91ad48ad5687 148 #ifndef INCLUDE_vTaskDelayUntil
dflet 0:91ad48ad5687 149 #error Missing definition: INCLUDE_vTaskDelayUntil must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
dflet 0:91ad48ad5687 150 #endif
dflet 0:91ad48ad5687 151
dflet 0:91ad48ad5687 152 #ifndef INCLUDE_vTaskDelay
dflet 0:91ad48ad5687 153 #error Missing definition: INCLUDE_vTaskDelay must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
dflet 0:91ad48ad5687 154 #endif
dflet 0:91ad48ad5687 155
dflet 0:91ad48ad5687 156 #ifndef configUSE_16_BIT_TICKS
dflet 0:91ad48ad5687 157 #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.
dflet 0:91ad48ad5687 158 #endif
dflet 0:91ad48ad5687 159
dflet 0:91ad48ad5687 160 #ifndef configMAX_PRIORITIES
dflet 0:91ad48ad5687 161 #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
dflet 0:91ad48ad5687 162 #endif
dflet 0:91ad48ad5687 163
dflet 0:91ad48ad5687 164 #ifndef configUSE_CO_ROUTINES
dflet 0:91ad48ad5687 165 #define configUSE_CO_ROUTINES 0
dflet 0:91ad48ad5687 166 #endif
dflet 0:91ad48ad5687 167
dflet 0:91ad48ad5687 168 #if configUSE_CO_ROUTINES != 0
dflet 0:91ad48ad5687 169 #ifndef configMAX_CO_ROUTINE_PRIORITIES
dflet 0:91ad48ad5687 170 #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
dflet 0:91ad48ad5687 171 #endif
dflet 0:91ad48ad5687 172 #endif
dflet 0:91ad48ad5687 173
dflet 0:91ad48ad5687 174 #ifndef INCLUDE_xTaskGetIdleTaskHandle
dflet 0:91ad48ad5687 175 #define INCLUDE_xTaskGetIdleTaskHandle 0
dflet 0:91ad48ad5687 176 #endif
dflet 0:91ad48ad5687 177
dflet 0:91ad48ad5687 178 #ifndef INCLUDE_xTimerGetTimerDaemonTaskHandle
dflet 0:91ad48ad5687 179 #define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
dflet 0:91ad48ad5687 180 #endif
dflet 0:91ad48ad5687 181
dflet 0:91ad48ad5687 182 #ifndef INCLUDE_xQueueGetMutexHolder
dflet 0:91ad48ad5687 183 #define INCLUDE_xQueueGetMutexHolder 0
dflet 0:91ad48ad5687 184 #endif
dflet 0:91ad48ad5687 185
dflet 0:91ad48ad5687 186 #ifndef INCLUDE_xSemaphoreGetMutexHolder
dflet 0:91ad48ad5687 187 #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
dflet 0:91ad48ad5687 188 #endif
dflet 0:91ad48ad5687 189
dflet 0:91ad48ad5687 190 #ifndef INCLUDE_pcTaskGetTaskName
dflet 0:91ad48ad5687 191 #define INCLUDE_pcTaskGetTaskName 0
dflet 0:91ad48ad5687 192 #endif
dflet 0:91ad48ad5687 193
dflet 0:91ad48ad5687 194 #ifndef configUSE_APPLICATION_TASK_TAG
dflet 0:91ad48ad5687 195 #define configUSE_APPLICATION_TASK_TAG 0
dflet 0:91ad48ad5687 196 #endif
dflet 0:91ad48ad5687 197
dflet 0:91ad48ad5687 198 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
dflet 0:91ad48ad5687 199 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
dflet 0:91ad48ad5687 200 #endif
dflet 0:91ad48ad5687 201
dflet 0:91ad48ad5687 202 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
dflet 0:91ad48ad5687 203 #define INCLUDE_uxTaskGetStackHighWaterMark 0
dflet 0:91ad48ad5687 204 #endif
dflet 0:91ad48ad5687 205
dflet 0:91ad48ad5687 206 #ifndef INCLUDE_eTaskGetState
dflet 0:91ad48ad5687 207 #define INCLUDE_eTaskGetState 0
dflet 0:91ad48ad5687 208 #endif
dflet 0:91ad48ad5687 209
dflet 0:91ad48ad5687 210 #ifndef configUSE_RECURSIVE_MUTEXES
dflet 0:91ad48ad5687 211 #define configUSE_RECURSIVE_MUTEXES 0
dflet 0:91ad48ad5687 212 #endif
dflet 0:91ad48ad5687 213
dflet 0:91ad48ad5687 214 #ifndef configUSE_MUTEXES
dflet 0:91ad48ad5687 215 #define configUSE_MUTEXES 0
dflet 0:91ad48ad5687 216 #endif
dflet 0:91ad48ad5687 217
dflet 0:91ad48ad5687 218 #ifndef configUSE_TIMERS
dflet 0:91ad48ad5687 219 #define configUSE_TIMERS 0
dflet 0:91ad48ad5687 220 #endif
dflet 0:91ad48ad5687 221
dflet 0:91ad48ad5687 222 #ifndef configUSE_COUNTING_SEMAPHORES
dflet 0:91ad48ad5687 223 #define configUSE_COUNTING_SEMAPHORES 0
dflet 0:91ad48ad5687 224 #endif
dflet 0:91ad48ad5687 225
dflet 0:91ad48ad5687 226 #ifndef configUSE_ALTERNATIVE_API
dflet 0:91ad48ad5687 227 #define configUSE_ALTERNATIVE_API 0
dflet 0:91ad48ad5687 228 #endif
dflet 0:91ad48ad5687 229
dflet 0:91ad48ad5687 230 #ifndef portCRITICAL_NESTING_IN_TCB
dflet 0:91ad48ad5687 231 #define portCRITICAL_NESTING_IN_TCB 0
dflet 0:91ad48ad5687 232 #endif
dflet 0:91ad48ad5687 233
dflet 0:91ad48ad5687 234 #ifndef configMAX_TASK_NAME_LEN
dflet 0:91ad48ad5687 235 #define configMAX_TASK_NAME_LEN 16
dflet 0:91ad48ad5687 236 #endif
dflet 0:91ad48ad5687 237
dflet 0:91ad48ad5687 238 #ifndef configIDLE_SHOULD_YIELD
dflet 0:91ad48ad5687 239 #define configIDLE_SHOULD_YIELD 1
dflet 0:91ad48ad5687 240 #endif
dflet 0:91ad48ad5687 241
dflet 0:91ad48ad5687 242 #if configMAX_TASK_NAME_LEN < 1
dflet 0:91ad48ad5687 243 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
dflet 0:91ad48ad5687 244 #endif
dflet 0:91ad48ad5687 245
dflet 0:91ad48ad5687 246 #ifndef INCLUDE_xTaskResumeFromISR
dflet 0:91ad48ad5687 247 #define INCLUDE_xTaskResumeFromISR 1
dflet 0:91ad48ad5687 248 #endif
dflet 0:91ad48ad5687 249
dflet 0:91ad48ad5687 250 #ifndef INCLUDE_xEventGroupSetBitFromISR
dflet 0:91ad48ad5687 251 #define INCLUDE_xEventGroupSetBitFromISR 0
dflet 0:91ad48ad5687 252 #endif
dflet 0:91ad48ad5687 253
dflet 0:91ad48ad5687 254 #ifndef INCLUDE_xTimerPendFunctionCall
dflet 0:91ad48ad5687 255 #define INCLUDE_xTimerPendFunctionCall 0
dflet 0:91ad48ad5687 256 #endif
dflet 0:91ad48ad5687 257
dflet 0:91ad48ad5687 258 #ifndef configASSERT
dflet 0:91ad48ad5687 259 #define configASSERT( x )
dflet 0:91ad48ad5687 260 #define configASSERT_DEFINED 0
dflet 0:91ad48ad5687 261 #else
dflet 0:91ad48ad5687 262 #define configASSERT_DEFINED 1
dflet 0:91ad48ad5687 263 #endif
dflet 0:91ad48ad5687 264
dflet 0:91ad48ad5687 265 /* The timers module relies on xTaskGetSchedulerState(). */
dflet 0:91ad48ad5687 266 #if configUSE_TIMERS == 1
dflet 0:91ad48ad5687 267
dflet 0:91ad48ad5687 268 #ifndef configTIMER_TASK_PRIORITY
dflet 0:91ad48ad5687 269 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
dflet 0:91ad48ad5687 270 #endif /* configTIMER_TASK_PRIORITY */
dflet 0:91ad48ad5687 271
dflet 0:91ad48ad5687 272 #ifndef configTIMER_QUEUE_LENGTH
dflet 0:91ad48ad5687 273 #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
dflet 0:91ad48ad5687 274 #endif /* configTIMER_QUEUE_LENGTH */
dflet 0:91ad48ad5687 275
dflet 0:91ad48ad5687 276 #ifndef configTIMER_TASK_STACK_DEPTH
dflet 0:91ad48ad5687 277 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
dflet 0:91ad48ad5687 278 #endif /* configTIMER_TASK_STACK_DEPTH */
dflet 0:91ad48ad5687 279
dflet 0:91ad48ad5687 280 #endif /* configUSE_TIMERS */
dflet 0:91ad48ad5687 281
dflet 0:91ad48ad5687 282 #ifndef INCLUDE_xTaskGetSchedulerState
dflet 0:91ad48ad5687 283 #define INCLUDE_xTaskGetSchedulerState 0
dflet 0:91ad48ad5687 284 #endif
dflet 0:91ad48ad5687 285
dflet 0:91ad48ad5687 286 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
dflet 0:91ad48ad5687 287 #define INCLUDE_xTaskGetCurrentTaskHandle 0
dflet 0:91ad48ad5687 288 #endif
dflet 0:91ad48ad5687 289
dflet 0:91ad48ad5687 290
dflet 0:91ad48ad5687 291 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
dflet 0:91ad48ad5687 292 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
dflet 0:91ad48ad5687 293 #endif
dflet 0:91ad48ad5687 294
dflet 0:91ad48ad5687 295 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
dflet 0:91ad48ad5687 296 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
dflet 0:91ad48ad5687 297 #endif
dflet 0:91ad48ad5687 298
dflet 0:91ad48ad5687 299 #ifndef portCLEAN_UP_TCB
dflet 0:91ad48ad5687 300 #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
dflet 0:91ad48ad5687 301 #endif
dflet 0:91ad48ad5687 302
dflet 0:91ad48ad5687 303 #ifndef portPRE_TASK_DELETE_HOOK
dflet 0:91ad48ad5687 304 #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
dflet 0:91ad48ad5687 305 #endif
dflet 0:91ad48ad5687 306
dflet 0:91ad48ad5687 307 #ifndef portSETUP_TCB
dflet 0:91ad48ad5687 308 #define portSETUP_TCB( pxTCB ) ( void ) pxTCB
dflet 0:91ad48ad5687 309 #endif
dflet 0:91ad48ad5687 310
dflet 0:91ad48ad5687 311 #ifndef configQUEUE_REGISTRY_SIZE
dflet 0:91ad48ad5687 312 #define configQUEUE_REGISTRY_SIZE 0U
dflet 0:91ad48ad5687 313 #endif
dflet 0:91ad48ad5687 314
dflet 0:91ad48ad5687 315 #if ( configQUEUE_REGISTRY_SIZE < 1 )
dflet 0:91ad48ad5687 316 #define vQueueAddToRegistry( xQueue, pcName )
dflet 0:91ad48ad5687 317 #define vQueueUnregisterQueue( xQueue )
dflet 0:91ad48ad5687 318 #endif
dflet 0:91ad48ad5687 319
dflet 0:91ad48ad5687 320 #ifndef portPOINTER_SIZE_TYPE
dflet 0:91ad48ad5687 321 #define portPOINTER_SIZE_TYPE uint32_t
dflet 0:91ad48ad5687 322 #endif
dflet 0:91ad48ad5687 323
dflet 0:91ad48ad5687 324 /* Remove any unused trace macros. */
dflet 0:91ad48ad5687 325 #ifndef traceSTART
dflet 0:91ad48ad5687 326 /* Used to perform any necessary initialisation - for example, open a file
dflet 0:91ad48ad5687 327 into which trace is to be written. */
dflet 0:91ad48ad5687 328 #define traceSTART()
dflet 0:91ad48ad5687 329 #endif
dflet 0:91ad48ad5687 330
dflet 0:91ad48ad5687 331 #ifndef traceEND
dflet 0:91ad48ad5687 332 /* Use to close a trace, for example close a file into which trace has been
dflet 0:91ad48ad5687 333 written. */
dflet 0:91ad48ad5687 334 #define traceEND()
dflet 0:91ad48ad5687 335 #endif
dflet 0:91ad48ad5687 336
dflet 0:91ad48ad5687 337 #ifndef traceTASK_SWITCHED_IN
dflet 0:91ad48ad5687 338 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
dflet 0:91ad48ad5687 339 to the task control block of the selected task. */
dflet 0:91ad48ad5687 340 #define traceTASK_SWITCHED_IN()
dflet 0:91ad48ad5687 341 #endif
dflet 0:91ad48ad5687 342
dflet 0:91ad48ad5687 343 #ifndef traceINCREASE_TICK_COUNT
dflet 0:91ad48ad5687 344 /* Called before stepping the tick count after waking from tickless idle
dflet 0:91ad48ad5687 345 sleep. */
dflet 0:91ad48ad5687 346 #define traceINCREASE_TICK_COUNT( x )
dflet 0:91ad48ad5687 347 #endif
dflet 0:91ad48ad5687 348
dflet 0:91ad48ad5687 349 #ifndef traceLOW_POWER_IDLE_BEGIN
dflet 0:91ad48ad5687 350 /* Called immediately before entering tickless idle. */
dflet 0:91ad48ad5687 351 #define traceLOW_POWER_IDLE_BEGIN()
dflet 0:91ad48ad5687 352 #endif
dflet 0:91ad48ad5687 353
dflet 0:91ad48ad5687 354 #ifndef traceLOW_POWER_IDLE_END
dflet 0:91ad48ad5687 355 /* Called when returning to the Idle task after a tickless idle. */
dflet 0:91ad48ad5687 356 #define traceLOW_POWER_IDLE_END()
dflet 0:91ad48ad5687 357 #endif
dflet 0:91ad48ad5687 358
dflet 0:91ad48ad5687 359 #ifndef traceTASK_SWITCHED_OUT
dflet 0:91ad48ad5687 360 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
dflet 0:91ad48ad5687 361 to the task control block of the task being switched out. */
dflet 0:91ad48ad5687 362 #define traceTASK_SWITCHED_OUT()
dflet 0:91ad48ad5687 363 #endif
dflet 0:91ad48ad5687 364
dflet 0:91ad48ad5687 365 #ifndef traceTASK_PRIORITY_INHERIT
dflet 0:91ad48ad5687 366 /* Called when a task attempts to take a mutex that is already held by a
dflet 0:91ad48ad5687 367 lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
dflet 0:91ad48ad5687 368 that holds the mutex. uxInheritedPriority is the priority the mutex holder
dflet 0:91ad48ad5687 369 will inherit (the priority of the task that is attempting to obtain the
dflet 0:91ad48ad5687 370 muted. */
dflet 0:91ad48ad5687 371 #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
dflet 0:91ad48ad5687 372 #endif
dflet 0:91ad48ad5687 373
dflet 0:91ad48ad5687 374 #ifndef traceTASK_PRIORITY_DISINHERIT
dflet 0:91ad48ad5687 375 /* Called when a task releases a mutex, the holding of which had resulted in
dflet 0:91ad48ad5687 376 the task inheriting the priority of a higher priority task.
dflet 0:91ad48ad5687 377 pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
dflet 0:91ad48ad5687 378 mutex. uxOriginalPriority is the task's configured (base) priority. */
dflet 0:91ad48ad5687 379 #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
dflet 0:91ad48ad5687 380 #endif
dflet 0:91ad48ad5687 381
dflet 0:91ad48ad5687 382 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
dflet 0:91ad48ad5687 383 /* Task is about to block because it cannot read from a
dflet 0:91ad48ad5687 384 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
dflet 0:91ad48ad5687 385 upon which the read was attempted. pxCurrentTCB points to the TCB of the
dflet 0:91ad48ad5687 386 task that attempted the read. */
dflet 0:91ad48ad5687 387 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
dflet 0:91ad48ad5687 388 #endif
dflet 0:91ad48ad5687 389
dflet 0:91ad48ad5687 390 #ifndef traceBLOCKING_ON_QUEUE_SEND
dflet 0:91ad48ad5687 391 /* Task is about to block because it cannot write to a
dflet 0:91ad48ad5687 392 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
dflet 0:91ad48ad5687 393 upon which the write was attempted. pxCurrentTCB points to the TCB of the
dflet 0:91ad48ad5687 394 task that attempted the write. */
dflet 0:91ad48ad5687 395 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
dflet 0:91ad48ad5687 396 #endif
dflet 0:91ad48ad5687 397
dflet 0:91ad48ad5687 398 #ifndef configCHECK_FOR_STACK_OVERFLOW
dflet 0:91ad48ad5687 399 #define configCHECK_FOR_STACK_OVERFLOW 0
dflet 0:91ad48ad5687 400 #endif
dflet 0:91ad48ad5687 401
dflet 0:91ad48ad5687 402 /* The following event macros are embedded in the kernel API calls. */
dflet 0:91ad48ad5687 403
dflet 0:91ad48ad5687 404 #ifndef traceMOVED_TASK_TO_READY_STATE
dflet 0:91ad48ad5687 405 #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
dflet 0:91ad48ad5687 406 #endif
dflet 0:91ad48ad5687 407
dflet 0:91ad48ad5687 408 #ifndef traceQUEUE_CREATE
dflet 0:91ad48ad5687 409 #define traceQUEUE_CREATE( pxNewQueue )
dflet 0:91ad48ad5687 410 #endif
dflet 0:91ad48ad5687 411
dflet 0:91ad48ad5687 412 #ifndef traceQUEUE_CREATE_FAILED
dflet 0:91ad48ad5687 413 #define traceQUEUE_CREATE_FAILED( ucQueueType )
dflet 0:91ad48ad5687 414 #endif
dflet 0:91ad48ad5687 415
dflet 0:91ad48ad5687 416 #ifndef traceCREATE_MUTEX
dflet 0:91ad48ad5687 417 #define traceCREATE_MUTEX( pxNewQueue )
dflet 0:91ad48ad5687 418 #endif
dflet 0:91ad48ad5687 419
dflet 0:91ad48ad5687 420 #ifndef traceCREATE_MUTEX_FAILED
dflet 0:91ad48ad5687 421 #define traceCREATE_MUTEX_FAILED()
dflet 0:91ad48ad5687 422 #endif
dflet 0:91ad48ad5687 423
dflet 0:91ad48ad5687 424 #ifndef traceGIVE_MUTEX_RECURSIVE
dflet 0:91ad48ad5687 425 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
dflet 0:91ad48ad5687 426 #endif
dflet 0:91ad48ad5687 427
dflet 0:91ad48ad5687 428 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
dflet 0:91ad48ad5687 429 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
dflet 0:91ad48ad5687 430 #endif
dflet 0:91ad48ad5687 431
dflet 0:91ad48ad5687 432 #ifndef traceTAKE_MUTEX_RECURSIVE
dflet 0:91ad48ad5687 433 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
dflet 0:91ad48ad5687 434 #endif
dflet 0:91ad48ad5687 435
dflet 0:91ad48ad5687 436 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
dflet 0:91ad48ad5687 437 #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
dflet 0:91ad48ad5687 438 #endif
dflet 0:91ad48ad5687 439
dflet 0:91ad48ad5687 440 #ifndef traceCREATE_COUNTING_SEMAPHORE
dflet 0:91ad48ad5687 441 #define traceCREATE_COUNTING_SEMAPHORE()
dflet 0:91ad48ad5687 442 #endif
dflet 0:91ad48ad5687 443
dflet 0:91ad48ad5687 444 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
dflet 0:91ad48ad5687 445 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
dflet 0:91ad48ad5687 446 #endif
dflet 0:91ad48ad5687 447
dflet 0:91ad48ad5687 448 #ifndef traceQUEUE_SEND
dflet 0:91ad48ad5687 449 #define traceQUEUE_SEND( pxQueue )
dflet 0:91ad48ad5687 450 #endif
dflet 0:91ad48ad5687 451
dflet 0:91ad48ad5687 452 #ifndef traceQUEUE_SEND_FAILED
dflet 0:91ad48ad5687 453 #define traceQUEUE_SEND_FAILED( pxQueue )
dflet 0:91ad48ad5687 454 #endif
dflet 0:91ad48ad5687 455
dflet 0:91ad48ad5687 456 #ifndef traceQUEUE_RECEIVE
dflet 0:91ad48ad5687 457 #define traceQUEUE_RECEIVE( pxQueue )
dflet 0:91ad48ad5687 458 #endif
dflet 0:91ad48ad5687 459
dflet 0:91ad48ad5687 460 #ifndef traceQUEUE_PEEK
dflet 0:91ad48ad5687 461 #define traceQUEUE_PEEK( pxQueue )
dflet 0:91ad48ad5687 462 #endif
dflet 0:91ad48ad5687 463
dflet 0:91ad48ad5687 464 #ifndef traceQUEUE_PEEK_FROM_ISR
dflet 0:91ad48ad5687 465 #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
dflet 0:91ad48ad5687 466 #endif
dflet 0:91ad48ad5687 467
dflet 0:91ad48ad5687 468 #ifndef traceQUEUE_RECEIVE_FAILED
dflet 0:91ad48ad5687 469 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
dflet 0:91ad48ad5687 470 #endif
dflet 0:91ad48ad5687 471
dflet 0:91ad48ad5687 472 #ifndef traceQUEUE_SEND_FROM_ISR
dflet 0:91ad48ad5687 473 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
dflet 0:91ad48ad5687 474 #endif
dflet 0:91ad48ad5687 475
dflet 0:91ad48ad5687 476 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
dflet 0:91ad48ad5687 477 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
dflet 0:91ad48ad5687 478 #endif
dflet 0:91ad48ad5687 479
dflet 0:91ad48ad5687 480 #ifndef traceQUEUE_RECEIVE_FROM_ISR
dflet 0:91ad48ad5687 481 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
dflet 0:91ad48ad5687 482 #endif
dflet 0:91ad48ad5687 483
dflet 0:91ad48ad5687 484 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
dflet 0:91ad48ad5687 485 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
dflet 0:91ad48ad5687 486 #endif
dflet 0:91ad48ad5687 487
dflet 0:91ad48ad5687 488 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
dflet 0:91ad48ad5687 489 #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
dflet 0:91ad48ad5687 490 #endif
dflet 0:91ad48ad5687 491
dflet 0:91ad48ad5687 492 #ifndef traceQUEUE_DELETE
dflet 0:91ad48ad5687 493 #define traceQUEUE_DELETE( pxQueue )
dflet 0:91ad48ad5687 494 #endif
dflet 0:91ad48ad5687 495
dflet 0:91ad48ad5687 496 #ifndef traceTASK_CREATE
dflet 0:91ad48ad5687 497 #define traceTASK_CREATE( pxNewTCB )
dflet 0:91ad48ad5687 498 #endif
dflet 0:91ad48ad5687 499
dflet 0:91ad48ad5687 500 #ifndef traceTASK_CREATE_FAILED
dflet 0:91ad48ad5687 501 #define traceTASK_CREATE_FAILED()
dflet 0:91ad48ad5687 502 #endif
dflet 0:91ad48ad5687 503
dflet 0:91ad48ad5687 504 #ifndef traceTASK_DELETE
dflet 0:91ad48ad5687 505 #define traceTASK_DELETE( pxTaskToDelete )
dflet 0:91ad48ad5687 506 #endif
dflet 0:91ad48ad5687 507
dflet 0:91ad48ad5687 508 #ifndef traceTASK_DELAY_UNTIL
dflet 0:91ad48ad5687 509 #define traceTASK_DELAY_UNTIL()
dflet 0:91ad48ad5687 510 #endif
dflet 0:91ad48ad5687 511
dflet 0:91ad48ad5687 512 #ifndef traceTASK_DELAY
dflet 0:91ad48ad5687 513 #define traceTASK_DELAY()
dflet 0:91ad48ad5687 514 #endif
dflet 0:91ad48ad5687 515
dflet 0:91ad48ad5687 516 #ifndef traceTASK_PRIORITY_SET
dflet 0:91ad48ad5687 517 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
dflet 0:91ad48ad5687 518 #endif
dflet 0:91ad48ad5687 519
dflet 0:91ad48ad5687 520 #ifndef traceTASK_SUSPEND
dflet 0:91ad48ad5687 521 #define traceTASK_SUSPEND( pxTaskToSuspend )
dflet 0:91ad48ad5687 522 #endif
dflet 0:91ad48ad5687 523
dflet 0:91ad48ad5687 524 #ifndef traceTASK_RESUME
dflet 0:91ad48ad5687 525 #define traceTASK_RESUME( pxTaskToResume )
dflet 0:91ad48ad5687 526 #endif
dflet 0:91ad48ad5687 527
dflet 0:91ad48ad5687 528 #ifndef traceTASK_RESUME_FROM_ISR
dflet 0:91ad48ad5687 529 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
dflet 0:91ad48ad5687 530 #endif
dflet 0:91ad48ad5687 531
dflet 0:91ad48ad5687 532 #ifndef traceTASK_INCREMENT_TICK
dflet 0:91ad48ad5687 533 #define traceTASK_INCREMENT_TICK( xTickCount )
dflet 0:91ad48ad5687 534 #endif
dflet 0:91ad48ad5687 535
dflet 0:91ad48ad5687 536 #ifndef traceTIMER_CREATE
dflet 0:91ad48ad5687 537 #define traceTIMER_CREATE( pxNewTimer )
dflet 0:91ad48ad5687 538 #endif
dflet 0:91ad48ad5687 539
dflet 0:91ad48ad5687 540 #ifndef traceTIMER_CREATE_FAILED
dflet 0:91ad48ad5687 541 #define traceTIMER_CREATE_FAILED()
dflet 0:91ad48ad5687 542 #endif
dflet 0:91ad48ad5687 543
dflet 0:91ad48ad5687 544 #ifndef traceTIMER_COMMAND_SEND
dflet 0:91ad48ad5687 545 #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
dflet 0:91ad48ad5687 546 #endif
dflet 0:91ad48ad5687 547
dflet 0:91ad48ad5687 548 #ifndef traceTIMER_EXPIRED
dflet 0:91ad48ad5687 549 #define traceTIMER_EXPIRED( pxTimer )
dflet 0:91ad48ad5687 550 #endif
dflet 0:91ad48ad5687 551
dflet 0:91ad48ad5687 552 #ifndef traceTIMER_COMMAND_RECEIVED
dflet 0:91ad48ad5687 553 #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
dflet 0:91ad48ad5687 554 #endif
dflet 0:91ad48ad5687 555
dflet 0:91ad48ad5687 556 #ifndef traceMALLOC
dflet 0:91ad48ad5687 557 #define traceMALLOC( pvAddress, uiSize )
dflet 0:91ad48ad5687 558 #endif
dflet 0:91ad48ad5687 559
dflet 0:91ad48ad5687 560 #ifndef traceFREE
dflet 0:91ad48ad5687 561 #define traceFREE( pvAddress, uiSize )
dflet 0:91ad48ad5687 562 #endif
dflet 0:91ad48ad5687 563
dflet 0:91ad48ad5687 564 #ifndef traceEVENT_GROUP_CREATE
dflet 0:91ad48ad5687 565 #define traceEVENT_GROUP_CREATE( xEventGroup )
dflet 0:91ad48ad5687 566 #endif
dflet 0:91ad48ad5687 567
dflet 0:91ad48ad5687 568 #ifndef traceEVENT_GROUP_CREATE_FAILED
dflet 0:91ad48ad5687 569 #define traceEVENT_GROUP_CREATE_FAILED()
dflet 0:91ad48ad5687 570 #endif
dflet 0:91ad48ad5687 571
dflet 0:91ad48ad5687 572 #ifndef traceEVENT_GROUP_SYNC_BLOCK
dflet 0:91ad48ad5687 573 #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
dflet 0:91ad48ad5687 574 #endif
dflet 0:91ad48ad5687 575
dflet 0:91ad48ad5687 576 #ifndef traceEVENT_GROUP_SYNC_END
dflet 0:91ad48ad5687 577 #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
dflet 0:91ad48ad5687 578 #endif
dflet 0:91ad48ad5687 579
dflet 0:91ad48ad5687 580 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
dflet 0:91ad48ad5687 581 #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
dflet 0:91ad48ad5687 582 #endif
dflet 0:91ad48ad5687 583
dflet 0:91ad48ad5687 584 #ifndef traceEVENT_GROUP_WAIT_BITS_END
dflet 0:91ad48ad5687 585 #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
dflet 0:91ad48ad5687 586 #endif
dflet 0:91ad48ad5687 587
dflet 0:91ad48ad5687 588 #ifndef traceEVENT_GROUP_CLEAR_BITS
dflet 0:91ad48ad5687 589 #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
dflet 0:91ad48ad5687 590 #endif
dflet 0:91ad48ad5687 591
dflet 0:91ad48ad5687 592 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
dflet 0:91ad48ad5687 593 #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
dflet 0:91ad48ad5687 594 #endif
dflet 0:91ad48ad5687 595
dflet 0:91ad48ad5687 596 #ifndef traceEVENT_GROUP_SET_BITS
dflet 0:91ad48ad5687 597 #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
dflet 0:91ad48ad5687 598 #endif
dflet 0:91ad48ad5687 599
dflet 0:91ad48ad5687 600 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
dflet 0:91ad48ad5687 601 #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
dflet 0:91ad48ad5687 602 #endif
dflet 0:91ad48ad5687 603
dflet 0:91ad48ad5687 604 #ifndef traceEVENT_GROUP_DELETE
dflet 0:91ad48ad5687 605 #define traceEVENT_GROUP_DELETE( xEventGroup )
dflet 0:91ad48ad5687 606 #endif
dflet 0:91ad48ad5687 607
dflet 0:91ad48ad5687 608 #ifndef tracePEND_FUNC_CALL
dflet 0:91ad48ad5687 609 #define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret)
dflet 0:91ad48ad5687 610 #endif
dflet 0:91ad48ad5687 611
dflet 0:91ad48ad5687 612 #ifndef tracePEND_FUNC_CALL_FROM_ISR
dflet 0:91ad48ad5687 613 #define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret)
dflet 0:91ad48ad5687 614 #endif
dflet 0:91ad48ad5687 615
dflet 0:91ad48ad5687 616 #ifndef traceQUEUE_REGISTRY_ADD
dflet 0:91ad48ad5687 617 #define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)
dflet 0:91ad48ad5687 618 #endif
dflet 0:91ad48ad5687 619
dflet 0:91ad48ad5687 620 #ifndef configGENERATE_RUN_TIME_STATS
dflet 0:91ad48ad5687 621 #define configGENERATE_RUN_TIME_STATS 0
dflet 0:91ad48ad5687 622 #endif
dflet 0:91ad48ad5687 623
dflet 0:91ad48ad5687 624 #if ( configGENERATE_RUN_TIME_STATS == 1 )
dflet 0:91ad48ad5687 625
dflet 0:91ad48ad5687 626 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
dflet 0:91ad48ad5687 627 #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.
dflet 0:91ad48ad5687 628 #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
dflet 0:91ad48ad5687 629
dflet 0:91ad48ad5687 630 #ifndef portGET_RUN_TIME_COUNTER_VALUE
dflet 0:91ad48ad5687 631 #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
dflet 0:91ad48ad5687 632 #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.
dflet 0:91ad48ad5687 633 #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
dflet 0:91ad48ad5687 634 #endif /* portGET_RUN_TIME_COUNTER_VALUE */
dflet 0:91ad48ad5687 635
dflet 0:91ad48ad5687 636 #endif /* configGENERATE_RUN_TIME_STATS */
dflet 0:91ad48ad5687 637
dflet 0:91ad48ad5687 638 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
dflet 0:91ad48ad5687 639 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
dflet 0:91ad48ad5687 640 #endif
dflet 0:91ad48ad5687 641
dflet 0:91ad48ad5687 642 #ifndef configUSE_MALLOC_FAILED_HOOK
dflet 0:91ad48ad5687 643 #define configUSE_MALLOC_FAILED_HOOK 0
dflet 0:91ad48ad5687 644 #endif
dflet 0:91ad48ad5687 645
dflet 0:91ad48ad5687 646 #ifndef portPRIVILEGE_BIT
dflet 0:91ad48ad5687 647 #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
dflet 0:91ad48ad5687 648 #endif
dflet 0:91ad48ad5687 649
dflet 0:91ad48ad5687 650 #ifndef portYIELD_WITHIN_API
dflet 0:91ad48ad5687 651 #define portYIELD_WITHIN_API portYIELD
dflet 0:91ad48ad5687 652 #endif
dflet 0:91ad48ad5687 653
dflet 0:91ad48ad5687 654 #ifndef pvPortMallocAligned
dflet 0:91ad48ad5687 655 #define pvPortMallocAligned( x, puxStackBuffer ) ( ( ( puxStackBuffer ) == NULL ) ? ( pvPortMalloc( ( x ) ) ) : ( puxStackBuffer ) )
dflet 0:91ad48ad5687 656 #endif
dflet 0:91ad48ad5687 657
dflet 0:91ad48ad5687 658 #ifndef vPortFreeAligned
dflet 0:91ad48ad5687 659 #define vPortFreeAligned( pvBlockToFree ) vPortFree( pvBlockToFree )
dflet 0:91ad48ad5687 660 #endif
dflet 0:91ad48ad5687 661
dflet 0:91ad48ad5687 662 #ifndef portSUPPRESS_TICKS_AND_SLEEP
dflet 0:91ad48ad5687 663 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
dflet 0:91ad48ad5687 664 #endif
dflet 0:91ad48ad5687 665
dflet 0:91ad48ad5687 666 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
dflet 0:91ad48ad5687 667 #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
dflet 0:91ad48ad5687 668 #endif
dflet 0:91ad48ad5687 669
dflet 0:91ad48ad5687 670 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
dflet 0:91ad48ad5687 671 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
dflet 0:91ad48ad5687 672 #endif
dflet 0:91ad48ad5687 673
dflet 0:91ad48ad5687 674 #ifndef configUSE_TICKLESS_IDLE
dflet 0:91ad48ad5687 675 #define configUSE_TICKLESS_IDLE 0
dflet 0:91ad48ad5687 676 #endif
dflet 0:91ad48ad5687 677
dflet 0:91ad48ad5687 678 #ifndef configPRE_SLEEP_PROCESSING
dflet 0:91ad48ad5687 679 #define configPRE_SLEEP_PROCESSING( x )
dflet 0:91ad48ad5687 680 #endif
dflet 0:91ad48ad5687 681
dflet 0:91ad48ad5687 682 #ifndef configPOST_SLEEP_PROCESSING
dflet 0:91ad48ad5687 683 #define configPOST_SLEEP_PROCESSING( x )
dflet 0:91ad48ad5687 684 #endif
dflet 0:91ad48ad5687 685
dflet 0:91ad48ad5687 686 #ifndef configUSE_QUEUE_SETS
dflet 0:91ad48ad5687 687 #define configUSE_QUEUE_SETS 0
dflet 0:91ad48ad5687 688 #endif
dflet 0:91ad48ad5687 689
dflet 0:91ad48ad5687 690 #ifndef portTASK_USES_FLOATING_POINT
dflet 0:91ad48ad5687 691 #define portTASK_USES_FLOATING_POINT()
dflet 0:91ad48ad5687 692 #endif
dflet 0:91ad48ad5687 693
dflet 0:91ad48ad5687 694 #ifndef configUSE_TIME_SLICING
dflet 0:91ad48ad5687 695 #define configUSE_TIME_SLICING 1
dflet 0:91ad48ad5687 696 #endif
dflet 0:91ad48ad5687 697
dflet 0:91ad48ad5687 698 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
dflet 0:91ad48ad5687 699 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
dflet 0:91ad48ad5687 700 #endif
dflet 0:91ad48ad5687 701
dflet 0:91ad48ad5687 702 #ifndef configUSE_NEWLIB_REENTRANT
dflet 0:91ad48ad5687 703 #define configUSE_NEWLIB_REENTRANT 0
dflet 0:91ad48ad5687 704 #endif
dflet 0:91ad48ad5687 705
dflet 0:91ad48ad5687 706 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
dflet 0:91ad48ad5687 707 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
dflet 0:91ad48ad5687 708 #endif
dflet 0:91ad48ad5687 709
dflet 0:91ad48ad5687 710 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
dflet 0:91ad48ad5687 711 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
dflet 0:91ad48ad5687 712 #endif
dflet 0:91ad48ad5687 713
dflet 0:91ad48ad5687 714 #ifndef configUSE_TRACE_FACILITY
dflet 0:91ad48ad5687 715 #define configUSE_TRACE_FACILITY 0
dflet 0:91ad48ad5687 716 #endif
dflet 0:91ad48ad5687 717
dflet 0:91ad48ad5687 718 #ifndef mtCOVERAGE_TEST_MARKER
dflet 0:91ad48ad5687 719 #define mtCOVERAGE_TEST_MARKER()
dflet 0:91ad48ad5687 720 #endif
dflet 0:91ad48ad5687 721
dflet 0:91ad48ad5687 722 #ifndef mtCOVERAGE_TEST_DELAY
dflet 0:91ad48ad5687 723 #define mtCOVERAGE_TEST_DELAY()
dflet 0:91ad48ad5687 724 #endif
dflet 0:91ad48ad5687 725
dflet 0:91ad48ad5687 726 #ifndef portASSERT_IF_IN_ISR
dflet 0:91ad48ad5687 727 #define portASSERT_IF_IN_ISR()
dflet 0:91ad48ad5687 728 #endif
dflet 0:91ad48ad5687 729
dflet 0:91ad48ad5687 730 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
dflet 0:91ad48ad5687 731 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
dflet 0:91ad48ad5687 732 #endif
dflet 0:91ad48ad5687 733
dflet 0:91ad48ad5687 734 #ifndef configAPPLICATION_ALLOCATED_HEAP
dflet 0:91ad48ad5687 735 #define configAPPLICATION_ALLOCATED_HEAP 0
dflet 0:91ad48ad5687 736 #endif
dflet 0:91ad48ad5687 737
dflet 0:91ad48ad5687 738 #ifndef configUSE_TASK_NOTIFICATIONS
dflet 0:91ad48ad5687 739 #define configUSE_TASK_NOTIFICATIONS 1
dflet 0:91ad48ad5687 740 #endif
dflet 0:91ad48ad5687 741
dflet 0:91ad48ad5687 742 #ifndef portTICK_TYPE_IS_ATOMIC
dflet 0:91ad48ad5687 743 #define portTICK_TYPE_IS_ATOMIC 0
dflet 0:91ad48ad5687 744 #endif
dflet 0:91ad48ad5687 745
dflet 0:91ad48ad5687 746 #if( portTICK_TYPE_IS_ATOMIC == 0 )
dflet 0:91ad48ad5687 747 /* Either variables of tick type cannot be read atomically, or
dflet 0:91ad48ad5687 748 portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
dflet 0:91ad48ad5687 749 the tick count is returned to the standard critical section macros. */
dflet 0:91ad48ad5687 750 #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
dflet 0:91ad48ad5687 751 #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
dflet 0:91ad48ad5687 752 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
dflet 0:91ad48ad5687 753 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
dflet 0:91ad48ad5687 754 #else
dflet 0:91ad48ad5687 755 /* The tick type can be read atomically, so critical sections used when the
dflet 0:91ad48ad5687 756 tick count is returned can be defined away. */
dflet 0:91ad48ad5687 757 #define portTICK_TYPE_ENTER_CRITICAL()
dflet 0:91ad48ad5687 758 #define portTICK_TYPE_EXIT_CRITICAL()
dflet 0:91ad48ad5687 759 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
dflet 0:91ad48ad5687 760 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
dflet 0:91ad48ad5687 761 #endif
dflet 0:91ad48ad5687 762
dflet 0:91ad48ad5687 763 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
dflet 0:91ad48ad5687 764 V8 if desired. */
dflet 0:91ad48ad5687 765 #ifndef configENABLE_BACKWARD_COMPATIBILITY
dflet 0:91ad48ad5687 766 #define configENABLE_BACKWARD_COMPATIBILITY 1
dflet 0:91ad48ad5687 767 #endif
dflet 0:91ad48ad5687 768
dflet 0:91ad48ad5687 769 #if configENABLE_BACKWARD_COMPATIBILITY == 1
dflet 0:91ad48ad5687 770 #define eTaskStateGet eTaskGetState
dflet 0:91ad48ad5687 771 #define portTickType TickType_t
dflet 0:91ad48ad5687 772 #define xTaskHandle TaskHandle_t
dflet 0:91ad48ad5687 773 #define xQueueHandle QueueHandle_t
dflet 0:91ad48ad5687 774 #define xSemaphoreHandle SemaphoreHandle_t
dflet 0:91ad48ad5687 775 #define xQueueSetHandle QueueSetHandle_t
dflet 0:91ad48ad5687 776 #define xQueueSetMemberHandle QueueSetMemberHandle_t
dflet 0:91ad48ad5687 777 #define xTimeOutType TimeOut_t
dflet 0:91ad48ad5687 778 #define xMemoryRegion MemoryRegion_t
dflet 0:91ad48ad5687 779 #define xTaskParameters TaskParameters_t
dflet 0:91ad48ad5687 780 #define xTaskStatusType TaskStatus_t
dflet 0:91ad48ad5687 781 #define xTimerHandle TimerHandle_t
dflet 0:91ad48ad5687 782 #define xCoRoutineHandle CoRoutineHandle_t
dflet 0:91ad48ad5687 783 #define pdTASK_HOOK_CODE TaskHookFunction_t
dflet 0:91ad48ad5687 784 #define portTICK_RATE_MS portTICK_PERIOD_MS
dflet 0:91ad48ad5687 785
dflet 0:91ad48ad5687 786 /* Backward compatibility within the scheduler code only - these definitions
dflet 0:91ad48ad5687 787 are not really required but are included for completeness. */
dflet 0:91ad48ad5687 788 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
dflet 0:91ad48ad5687 789 #define pdTASK_CODE TaskFunction_t
dflet 0:91ad48ad5687 790 #define xListItem ListItem_t
dflet 0:91ad48ad5687 791 #define xList List_t
dflet 0:91ad48ad5687 792 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
dflet 0:91ad48ad5687 793
dflet 0:91ad48ad5687 794 #ifdef __cplusplus
dflet 0:91ad48ad5687 795 }
dflet 0:91ad48ad5687 796 #endif
dflet 0:91ad48ad5687 797
dflet 0:91ad48ad5687 798 #endif /* INC_FREERTOS_H */
dflet 0:91ad48ad5687 799
dflet 0:91ad48ad5687 800