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