1 /*
2  * FreeRTOS Kernel V10.2.0
3  * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of
6  * this software and associated documentation files (the "Software"), to deal in
7  * the Software without restriction, including without limitation the rights to
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9  * the Software, and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all
13  * copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  *
22  * http://www.FreeRTOS.org
23  * http://aws.amazon.com/freertos
24  *
25  * 1 tab == 4 spaces!
26  */
27 
28 #ifndef INC_FREERTOS_H
29 #define INC_FREERTOS_H
30 
31 /*
32  * Include the generic headers required for the FreeRTOS port being used.
33  */
34 #include <stddef.h>
35 
36 /*
37  * If stdint.h cannot be located then:
38  *   + If using GCC ensure the -nostdint options is *not* being used.
39  *   + Ensure the project's include path includes the directory in which your
40  *     compiler stores stdint.h.
41  *   + Set any compiler options necessary for it to support C99, as technically
42  *     stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
43  *     other way).
44  *   + The FreeRTOS download includes a simple stdint.h definition that can be
45  *     used in cases where none is provided by the compiler.  The files only
46  *     contains the typedefs required to build FreeRTOS.  Read the instructions
47  *     in FreeRTOS/source/stdint.readme for more information.
48  */
49 #include <stdint.h> /* READ COMMENT ABOVE. */
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 /* Application specific configuration options. */
56 #include "FreeRTOSConfig.h"
57 
58 /* Basic FreeRTOS definitions. */
59 #include "projdefs.h"
60 
61 /* Definitions specific to the port being used. */
62 #include "portable.h"
63 
64 /*
65  * Check all the required application specific macros have been defined.
66  * These macros are application specific and (as downloaded) are defined
67  * within FreeRTOSConfig.h.
68  */
69 
70 #ifndef configMINIMAL_STACK_SIZE
71 	#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.
72 #endif
73 
74 #ifndef configMAX_PRIORITIES
75 	#error Missing definition:  configMAX_PRIORITIES must be defined in FreeRTOSConfig.h.  See the Configuration section of the FreeRTOS API documentation for details.
76 #endif
77 
78 #ifndef configUSE_PREEMPTION
79 	#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.
80 #endif
81 
82 #ifndef configUSE_IDLE_HOOK
83 	#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.
84 #endif
85 
86 #ifndef configUSE_TICK_HOOK
87 	#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.
88 #endif
89 
90 #ifndef configUSE_CO_ROUTINES
91 	#error  Missing definition:  configUSE_CO_ROUTINES must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.
92 #endif
93 
94 #ifndef INCLUDE_vTaskPrioritySet
95 	#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.
96 #endif
97 
98 #ifndef INCLUDE_uxTaskPriorityGet
99 	#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.
100 #endif
101 
102 #ifndef INCLUDE_vTaskDelete
103 	#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.
104 #endif
105 
106 #ifndef INCLUDE_vTaskSuspend
107 	#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.
108 #endif
109 
110 #ifndef INCLUDE_vTaskDelayUntil
111 	#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.
112 #endif
113 
114 #ifndef INCLUDE_vTaskDelay
115 	#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.
116 #endif
117 
118 #ifndef configUSE_16_BIT_TICKS
119 	#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.
120 #endif
121 
122 #if configUSE_CO_ROUTINES != 0
123 	#ifndef configMAX_CO_ROUTINE_PRIORITIES
124 		#error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
125 	#endif
126 #endif
127 
128 #ifndef configMAX_PRIORITIES
129 	#error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
130 #endif
131 
132 #ifndef INCLUDE_xTaskGetIdleTaskHandle
133 	#define INCLUDE_xTaskGetIdleTaskHandle 0
134 #endif
135 
136 #ifndef INCLUDE_xTimerGetTimerDaemonTaskHandle
137 	#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
138 #endif
139 
140 #ifndef INCLUDE_xQueueGetMutexHolder
141 	#define INCLUDE_xQueueGetMutexHolder 0
142 #endif
143 
144 #ifndef INCLUDE_xSemaphoreGetMutexHolder
145 	#define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
146 #endif
147 
148 #ifndef INCLUDE_pcTaskGetTaskName
149 	#define INCLUDE_pcTaskGetTaskName 0
150 #endif
151 
152 #ifndef configUSE_APPLICATION_TASK_TAG
153 	#define configUSE_APPLICATION_TASK_TAG 0
154 #endif
155 
156 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
157 	#define INCLUDE_uxTaskGetStackHighWaterMark 1
158 #endif
159 
160 #ifndef INCLUDE_eTaskGetState
161 	#define INCLUDE_eTaskGetState 0
162 #endif
163 
164 #ifndef configUSE_RECURSIVE_MUTEXES
165 	#define configUSE_RECURSIVE_MUTEXES 0
166 #endif
167 
168 #ifndef configUSE_MUTEXES
169 	#define configUSE_MUTEXES 0
170 #endif
171 
172 #ifndef configUSE_TIMERS
173 	#define configUSE_TIMERS 0
174 #endif
175 
176 #ifndef configUSE_COUNTING_SEMAPHORES
177 	#define configUSE_COUNTING_SEMAPHORES 0
178 #endif
179 
180 #ifndef configUSE_ALTERNATIVE_API
181 	#define configUSE_ALTERNATIVE_API 0
182 #endif
183 
184 #ifndef portCRITICAL_NESTING_IN_TCB
185 	#define portCRITICAL_NESTING_IN_TCB 0
186 #endif
187 
188 #ifndef configMAX_TASK_NAME_LEN
189 	#define configMAX_TASK_NAME_LEN 16
190 #endif
191 
192 #ifndef configIDLE_SHOULD_YIELD
193 	#define configIDLE_SHOULD_YIELD		1
194 #endif
195 
196 #if configMAX_TASK_NAME_LEN < 1
197 	#error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
198 #endif
199 
200 #ifndef INCLUDE_xTaskResumeFromISR
201 	#define INCLUDE_xTaskResumeFromISR 1
202 #endif
203 
204 #ifndef INCLUDE_xEventGroupSetBitFromISR
205 	#define INCLUDE_xEventGroupSetBitFromISR 0
206 #endif
207 
208 #ifndef INCLUDE_xTimerPendFunctionCall
209 	#define INCLUDE_xTimerPendFunctionCall 0
210 #endif
211 
212 #ifndef configASSERT
213 	#define configASSERT( x )
214 	#define configASSERT_DEFINED 0
215 #else
216 	#define configASSERT_DEFINED 1
217 #endif
218 
219 /* The timers module relies on xTaskGetSchedulerState(). */
220 #if configUSE_TIMERS == 1
221 
222 	#ifndef configTIMER_TASK_PRIORITY
223 		#error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
224 	#endif /* configTIMER_TASK_PRIORITY */
225 
226 	#ifndef configTIMER_QUEUE_LENGTH
227 		#error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
228 	#endif /* configTIMER_QUEUE_LENGTH */
229 
230 	#ifndef configTIMER_TASK_STACK_DEPTH
231 		#error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
232 	#endif /* configTIMER_TASK_STACK_DEPTH */
233 
234 #endif /* configUSE_TIMERS */
235 
236 #ifndef INCLUDE_xTaskGetSchedulerState
237 	#define INCLUDE_xTaskGetSchedulerState 0
238 #endif
239 
240 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
241 	#define INCLUDE_xTaskGetCurrentTaskHandle 0
242 #endif
243 
244 
245 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
246 	#define portSET_INTERRUPT_MASK_FROM_ISR() 0
247 #endif
248 
249 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
250 	#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
251 #endif
252 
253 #ifndef portCLEAN_UP_TCB
254 	#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
255 #endif
256 
257 #ifndef portPRE_TASK_DELETE_HOOK
258 	#define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
259 #endif
260 
261 #ifndef portSETUP_TCB
262 	#define portSETUP_TCB( pxTCB ) ( void ) pxTCB
263 #endif
264 
265 #ifndef configQUEUE_REGISTRY_SIZE
266 	#define configQUEUE_REGISTRY_SIZE 0U
267 #endif
268 
269 #if ( configQUEUE_REGISTRY_SIZE < 1 )
270 	#define vQueueAddToRegistry( xQueue, pcName )
271 	#define vQueueUnregisterQueue( xQueue )
272 #endif
273 
274 #ifndef portPOINTER_SIZE_TYPE
275 	#define portPOINTER_SIZE_TYPE uint32_t
276 #endif
277 
278 /* Remove any unused trace macros. */
279 #ifndef traceSTART
280 	/* Used to perform any necessary initialisation - for example, open a file
281 	into which trace is to be written. */
282 	#define traceSTART()
283 #endif
284 
285 #ifndef traceEND
286 	/* Use to close a trace, for example close a file into which trace has been
287 	written. */
288 	#define traceEND()
289 #endif
290 
291 #ifndef traceTASK_SWITCHED_IN
292 	/* Called after a task has been selected to run.  pxCurrentTCB holds a pointer
293 	to the task control block of the selected task. */
294 	#define traceTASK_SWITCHED_IN()
295 #endif
296 
297 #ifndef traceINCREASE_TICK_COUNT
298 	/* Called before stepping the tick count after waking from tickless idle
299 	sleep. */
300 	#define traceINCREASE_TICK_COUNT( x )
301 #endif
302 
303 #ifndef traceLOW_POWER_IDLE_BEGIN
304 	/* Called immediately before entering tickless idle. */
305 	#define traceLOW_POWER_IDLE_BEGIN()
306 #endif
307 
308 #ifndef	traceLOW_POWER_IDLE_END
309 	/* Called when returning to the Idle task after a tickless idle. */
310 	#define traceLOW_POWER_IDLE_END()
311 #endif
312 
313 #ifndef traceTASK_SWITCHED_OUT
314 	/* Called before a task has been selected to run.  pxCurrentTCB holds a pointer
315 	to the task control block of the task being switched out. */
316 	#define traceTASK_SWITCHED_OUT()
317 #endif
318 
319 #ifndef traceTASK_PRIORITY_INHERIT
320 	/* Called when a task attempts to take a mutex that is already held by a
321 	lower priority task.  pxTCBOfMutexHolder is a pointer to the TCB of the task
322 	that holds the mutex.  uxInheritedPriority is the priority the mutex holder
323 	will inherit (the priority of the task that is attempting to obtain the
324 	muted. */
325 	#define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
326 #endif
327 
328 #ifndef traceTASK_PRIORITY_DISINHERIT
329 	/* Called when a task releases a mutex, the holding of which had resulted in
330 	the task inheriting the priority of a higher priority task.
331 	pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
332 	mutex.  uxOriginalPriority is the task's configured (base) priority. */
333 	#define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
334 #endif
335 
336 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
337 	/* Task is about to block because it cannot read from a
338 	queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore
339 	upon which the read was attempted.  pxCurrentTCB points to the TCB of the
340 	task that attempted the read. */
341 	#define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
342 #endif
343 
344 #ifndef traceBLOCKING_ON_QUEUE_SEND
345 	/* Task is about to block because it cannot write to a
346 	queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore
347 	upon which the write was attempted.  pxCurrentTCB points to the TCB of the
348 	task that attempted the write. */
349 	#define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
350 #endif
351 
352 #ifndef configCHECK_FOR_STACK_OVERFLOW
353 	#define configCHECK_FOR_STACK_OVERFLOW 0
354 #endif
355 
356 /* The following event macros are embedded in the kernel API calls. */
357 
358 #ifndef traceMOVED_TASK_TO_READY_STATE
359 	#define traceMOVED_TASK_TO_READY_STATE( pxTCB )
360 #endif
361 
362 #ifndef traceQUEUE_CREATE
363 	#define traceQUEUE_CREATE( pxNewQueue )
364 #endif
365 
366 #ifndef traceQUEUE_CREATE_FAILED
367 	#define traceQUEUE_CREATE_FAILED( ucQueueType )
368 #endif
369 
370 #ifndef traceCREATE_MUTEX
371 	#define traceCREATE_MUTEX( pxNewQueue )
372 #endif
373 
374 #ifndef traceCREATE_MUTEX_FAILED
375 	#define traceCREATE_MUTEX_FAILED()
376 #endif
377 
378 #ifndef traceGIVE_MUTEX_RECURSIVE
379 	#define traceGIVE_MUTEX_RECURSIVE( pxMutex )
380 #endif
381 
382 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
383 	#define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
384 #endif
385 
386 #ifndef traceTAKE_MUTEX_RECURSIVE
387 	#define traceTAKE_MUTEX_RECURSIVE( pxMutex )
388 #endif
389 
390 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
391 	#define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
392 #endif
393 
394 #ifndef traceCREATE_COUNTING_SEMAPHORE
395 	#define traceCREATE_COUNTING_SEMAPHORE()
396 #endif
397 
398 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
399 	#define traceCREATE_COUNTING_SEMAPHORE_FAILED()
400 #endif
401 
402 #ifndef traceQUEUE_SEND
403 	#define traceQUEUE_SEND( pxQueue )
404 #endif
405 
406 #ifndef traceQUEUE_SEND_FAILED
407 	#define traceQUEUE_SEND_FAILED( pxQueue )
408 #endif
409 
410 #ifndef traceQUEUE_RECEIVE
411 	#define traceQUEUE_RECEIVE( pxQueue )
412 #endif
413 
414 #ifndef traceQUEUE_PEEK
415 	#define traceQUEUE_PEEK( pxQueue )
416 #endif
417 
418 #ifndef traceQUEUE_PEEK_FROM_ISR
419 	#define traceQUEUE_PEEK_FROM_ISR( pxQueue )
420 #endif
421 
422 #ifndef traceQUEUE_RECEIVE_FAILED
423 	#define traceQUEUE_RECEIVE_FAILED( pxQueue )
424 #endif
425 
426 #ifndef traceQUEUE_SEND_FROM_ISR
427 	#define traceQUEUE_SEND_FROM_ISR( pxQueue )
428 #endif
429 
430 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
431 	#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
432 #endif
433 
434 #ifndef traceQUEUE_RECEIVE_FROM_ISR
435 	#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
436 #endif
437 
438 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
439 	#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
440 #endif
441 
442 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
443 	#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
444 #endif
445 
446 #ifndef traceQUEUE_DELETE
447 	#define traceQUEUE_DELETE( pxQueue )
448 #endif
449 
450 #ifndef traceTASK_CREATE
451 	#define traceTASK_CREATE( pxNewTCB )
452 #endif
453 
454 #ifndef traceTASK_CREATE_FAILED
455 	#define traceTASK_CREATE_FAILED()
456 #endif
457 
458 #ifndef traceTASK_DELETE
459 	#define traceTASK_DELETE( pxTaskToDelete )
460 #endif
461 
462 #ifndef traceTASK_DELAY_UNTIL
463 	#define traceTASK_DELAY_UNTIL()
464 #endif
465 
466 #ifndef traceTASK_DELAY
467 	#define traceTASK_DELAY()
468 #endif
469 
470 #ifndef traceTASK_PRIORITY_SET
471 	#define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
472 #endif
473 
474 #ifndef traceTASK_SUSPEND
475 	#define traceTASK_SUSPEND( pxTaskToSuspend )
476 #endif
477 
478 #ifndef traceTASK_RESUME
479 	#define traceTASK_RESUME( pxTaskToResume )
480 #endif
481 
482 #ifndef traceTASK_RESUME_FROM_ISR
483 	#define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
484 #endif
485 
486 #ifndef traceTASK_INCREMENT_TICK
487 	#define traceTASK_INCREMENT_TICK( xTickCount )
488 #endif
489 
490 #ifndef traceTIMER_CREATE
491 	#define traceTIMER_CREATE( pxNewTimer )
492 #endif
493 
494 #ifndef traceTIMER_CREATE_FAILED
495 	#define traceTIMER_CREATE_FAILED()
496 #endif
497 
498 #ifndef traceTIMER_COMMAND_SEND
499 	#define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
500 #endif
501 
502 #ifndef traceTIMER_EXPIRED
503 	#define traceTIMER_EXPIRED( pxTimer )
504 #endif
505 
506 #ifndef traceTIMER_COMMAND_RECEIVED
507 	#define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
508 #endif
509 
510 #ifndef traceMALLOC
511     #define traceMALLOC( pvAddress, uiSize )
512 #endif
513 
514 #ifndef traceFREE
515     #define traceFREE( pvAddress, uiSize )
516 #endif
517 
518 #ifndef traceEVENT_GROUP_CREATE
519 	#define traceEVENT_GROUP_CREATE( xEventGroup )
520 #endif
521 
522 #ifndef traceEVENT_GROUP_CREATE_FAILED
523 	#define traceEVENT_GROUP_CREATE_FAILED()
524 #endif
525 
526 #ifndef traceEVENT_GROUP_SYNC_BLOCK
527 	#define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
528 #endif
529 
530 #ifndef traceEVENT_GROUP_SYNC_END
531 	#define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
532 #endif
533 
534 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
535 	#define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
536 #endif
537 
538 #ifndef traceEVENT_GROUP_WAIT_BITS_END
539 	#define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
540 #endif
541 
542 #ifndef traceEVENT_GROUP_CLEAR_BITS
543 	#define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
544 #endif
545 
546 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
547 	#define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
548 #endif
549 
550 #ifndef traceEVENT_GROUP_SET_BITS
551 	#define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
552 #endif
553 
554 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
555 	#define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
556 #endif
557 
558 #ifndef traceEVENT_GROUP_DELETE
559 	#define traceEVENT_GROUP_DELETE( xEventGroup )
560 #endif
561 
562 #ifndef tracePEND_FUNC_CALL
563 	#define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret)
564 #endif
565 
566 #ifndef tracePEND_FUNC_CALL_FROM_ISR
567 	#define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret)
568 #endif
569 
570 #ifndef traceQUEUE_REGISTRY_ADD
571 	#define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)
572 #endif
573 
574 #ifndef configGENERATE_RUN_TIME_STATS
575 	#define configGENERATE_RUN_TIME_STATS 0
576 #endif
577 
578 #if ( configGENERATE_RUN_TIME_STATS == 1 )
579 
580 	#ifndef configUSE_STATS_FORMATTING_FUNCTIONS
581 		#define configUSE_STATS_FORMATTING_FUNCTIONS 1
582 	#endif
583 
584 	#ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
585 		#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.
586 	#endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
587 
588 	#ifndef portGET_RUN_TIME_COUNTER_VALUE
589 		#ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
590 			#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.
591 		#endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
592 	#endif /* portGET_RUN_TIME_COUNTER_VALUE */
593 
594 #endif /* configGENERATE_RUN_TIME_STATS */
595 
596 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
597 	#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
598 #endif
599 
600 #ifndef configUSE_MALLOC_FAILED_HOOK
601 	#define configUSE_MALLOC_FAILED_HOOK 0
602 #endif
603 
604 #ifndef portPRIVILEGE_BIT
605 	#define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
606 #endif
607 
608 #ifndef portYIELD_WITHIN_API
609 	#define portYIELD_WITHIN_API portYIELD
610 #endif
611 
612 #ifndef pvPortMallocAligned
613 	#define pvPortMallocAligned( x, puxStackBuffer ) ( ( ( puxStackBuffer ) == NULL ) ? ( pvPortMalloc( ( x ) ) ) : ( puxStackBuffer ) )
614 #endif
615 
616 #ifndef vPortFreeAligned
617 	#define vPortFreeAligned( pvBlockToFree ) vPortFree( pvBlockToFree )
618 #endif
619 
620 #ifndef portSUPPRESS_TICKS_AND_SLEEP
621 	#define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
622 #endif
623 
624 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
625 	#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
626 #endif
627 
628 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
629 	#error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
630 #endif
631 
632 #ifndef configUSE_TICKLESS_IDLE
633 	#define configUSE_TICKLESS_IDLE 0
634 #endif
635 
636 #ifndef configPRE_SLEEP_PROCESSING
637 	#define configPRE_SLEEP_PROCESSING( x )
638 #endif
639 
640 #ifndef configPOST_SLEEP_PROCESSING
641 	#define configPOST_SLEEP_PROCESSING( x )
642 #endif
643 
644 #ifndef configUSE_QUEUE_SETS
645 	#define configUSE_QUEUE_SETS 0
646 #endif
647 
648 #ifndef portTASK_USES_FLOATING_POINT
649 	#define portTASK_USES_FLOATING_POINT()
650 #endif
651 
652 #ifndef configUSE_TIME_SLICING
653 	#define configUSE_TIME_SLICING 1
654 #endif
655 
656 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
657 	#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
658 #endif
659 
660 #ifndef configUSE_NEWLIB_REENTRANT
661 	#define configUSE_NEWLIB_REENTRANT 0
662 #endif
663 
664 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
665 	#define configUSE_STATS_FORMATTING_FUNCTIONS 0
666 #endif
667 
668 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
669 	#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
670 #endif
671 
672 #ifndef configUSE_TRACE_FACILITY
673 	#define configUSE_TRACE_FACILITY 0
674 #endif
675 
676 #ifndef mtCOVERAGE_TEST_MARKER
677 	#define mtCOVERAGE_TEST_MARKER()
678 #endif
679 
680 #ifndef portASSERT_IF_IN_ISR
681 	#define portASSERT_IF_IN_ISR()
682 #endif
683 
684 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
685 	#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
686 #endif
687 
688 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
689 V8 if desired. */
690 #ifndef configENABLE_BACKWARD_COMPATIBILITY
691 	#define configENABLE_BACKWARD_COMPATIBILITY 1
692 #endif
693 
694 #if configENABLE_BACKWARD_COMPATIBILITY == 1
695 	#define eTaskStateGet eTaskGetState
696 	#define portTickType TickType_t
697 	#define xTaskHandle TaskHandle_t
698 	#define xQueueHandle QueueHandle_t
699 	//#define xSemaphoreHandle SemaphoreHandle_t
700 	#define xQueueSetHandle QueueSetHandle_t
701 	#define xQueueSetMemberHandle QueueSetMemberHandle_t
702 	#define xTimeOutType TimeOut_t
703 	#define xMemoryRegion MemoryRegion_t
704 	#define xTaskParameters TaskParameters_t
705 	#define xTaskStatusType	TaskStatus_t
706 	#define xTimerHandle TimerHandle_t
707 	#define xCoRoutineHandle CoRoutineHandle_t
708 	#define pdTASK_HOOK_CODE TaskHookFunction_t
709 	#define portTICK_RATE_MS portTICK_PERIOD_MS
710 
711 	/* Backward compatibility within the scheduler code only - these definitions
712 	are not really required but are included for completeness. */
713 	#define tmrTIMER_CALLBACK TimerCallbackFunction_t
714 	#define pdTASK_CODE TaskFunction_t
715 	#define xListItem ListItem_t
716 	#define xList List_t
717 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
718 
719 #ifdef __cplusplus
720 }
721 #endif
722 
723 #endif /* INC_FREERTOS_H */
724 
725