Robobo
FreeRTOS.h
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 #ifndef configUSE_CO_ROUTINES
165  #define configUSE_CO_ROUTINES 0
166 #endif
167 
168 #if configUSE_CO_ROUTINES != 0
169  #ifndef configMAX_CO_ROUTINE_PRIORITIES
170  #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
171  #endif
172 #endif
173 
174 #ifndef INCLUDE_xTaskGetIdleTaskHandle
175  #define INCLUDE_xTaskGetIdleTaskHandle 0
176 #endif
177 
178 #ifndef INCLUDE_xTimerGetTimerDaemonTaskHandle
179  #define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
180 #endif
181 
182 #ifndef INCLUDE_xQueueGetMutexHolder
183  #define INCLUDE_xQueueGetMutexHolder 0
184 #endif
185 
186 #ifndef INCLUDE_xSemaphoreGetMutexHolder
187  #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
188 #endif
189 
190 #ifndef INCLUDE_pcTaskGetTaskName
191  #define INCLUDE_pcTaskGetTaskName 0
192 #endif
193 
194 #ifndef configUSE_APPLICATION_TASK_TAG
195  #define configUSE_APPLICATION_TASK_TAG 0
196 #endif
197 
198 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
199  #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
200 #endif
201 
202 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
203  #define INCLUDE_uxTaskGetStackHighWaterMark 0
204 #endif
205 
206 #ifndef INCLUDE_eTaskGetState
207  #define INCLUDE_eTaskGetState 0
208 #endif
209 
210 #ifndef configUSE_RECURSIVE_MUTEXES
211  #define configUSE_RECURSIVE_MUTEXES 0
212 #endif
213 
214 #ifndef configUSE_MUTEXES
215  #define configUSE_MUTEXES 0
216 #endif
217 
218 #ifndef configUSE_TIMERS
219  #define configUSE_TIMERS 0
220 #endif
221 
222 #ifndef configUSE_COUNTING_SEMAPHORES
223  #define configUSE_COUNTING_SEMAPHORES 0
224 #endif
225 
226 #ifndef configUSE_ALTERNATIVE_API
227  #define configUSE_ALTERNATIVE_API 0
228 #endif
229 
230 #ifndef portCRITICAL_NESTING_IN_TCB
231  #define portCRITICAL_NESTING_IN_TCB 0
232 #endif
233 
234 #ifndef configMAX_TASK_NAME_LEN
235  #define configMAX_TASK_NAME_LEN 16
236 #endif
237 
238 #ifndef configIDLE_SHOULD_YIELD
239  #define configIDLE_SHOULD_YIELD 1
240 #endif
241 
242 #if configMAX_TASK_NAME_LEN < 1
243  #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
244 #endif
245 
246 #ifndef INCLUDE_xTaskResumeFromISR
247  #define INCLUDE_xTaskResumeFromISR 1
248 #endif
249 
250 #ifndef INCLUDE_xEventGroupSetBitFromISR
251  #define INCLUDE_xEventGroupSetBitFromISR 0
252 #endif
253 
254 #ifndef INCLUDE_xTimerPendFunctionCall
255  #define INCLUDE_xTimerPendFunctionCall 0
256 #endif
257 
258 #ifndef configASSERT
259  #define configASSERT( x )
260  #define configASSERT_DEFINED 0
261 #else
262  #define configASSERT_DEFINED 1
263 #endif
264 
265 /* The timers module relies on xTaskGetSchedulerState(). */
266 #if configUSE_TIMERS == 1
267 
268  #ifndef configTIMER_TASK_PRIORITY
269  #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
270  #endif /* configTIMER_TASK_PRIORITY */
271 
272  #ifndef configTIMER_QUEUE_LENGTH
273  #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
274  #endif /* configTIMER_QUEUE_LENGTH */
275 
276  #ifndef configTIMER_TASK_STACK_DEPTH
277  #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
278  #endif /* configTIMER_TASK_STACK_DEPTH */
279 
280 #endif /* configUSE_TIMERS */
281 
282 #ifndef INCLUDE_xTaskGetSchedulerState
283  #define INCLUDE_xTaskGetSchedulerState 0
284 #endif
285 
286 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
287  #define INCLUDE_xTaskGetCurrentTaskHandle 0
288 #endif
289 
290 
291 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
292  #define portSET_INTERRUPT_MASK_FROM_ISR() 0
293 #endif
294 
295 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
296  #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
297 #endif
298 
299 #ifndef portCLEAN_UP_TCB
300  #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
301 #endif
302 
303 #ifndef portPRE_TASK_DELETE_HOOK
304  #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
305 #endif
306 
307 #ifndef portSETUP_TCB
308  #define portSETUP_TCB( pxTCB ) ( void ) pxTCB
309 #endif
310 
311 #ifndef configQUEUE_REGISTRY_SIZE
312  #define configQUEUE_REGISTRY_SIZE 0U
313 #endif
314 
315 #if ( configQUEUE_REGISTRY_SIZE < 1 )
316  #define vQueueAddToRegistry( xQueue, pcName )
317  #define vQueueUnregisterQueue( xQueue )
318 #endif
319 
320 #ifndef portPOINTER_SIZE_TYPE
321  #define portPOINTER_SIZE_TYPE uint32_t
322 #endif
323 
324 /* Remove any unused trace macros. */
325 #ifndef traceSTART
326  /* Used to perform any necessary initialisation - for example, open a file
327  into which trace is to be written. */
328  #define traceSTART()
329 #endif
330 
331 #ifndef traceEND
332  /* Use to close a trace, for example close a file into which trace has been
333  written. */
334  #define traceEND()
335 #endif
336 
337 #ifndef traceTASK_SWITCHED_IN
338  /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
339  to the task control block of the selected task. */
340  #define traceTASK_SWITCHED_IN()
341 #endif
342 
343 #ifndef traceINCREASE_TICK_COUNT
344  /* Called before stepping the tick count after waking from tickless idle
345  sleep. */
346  #define traceINCREASE_TICK_COUNT( x )
347 #endif
348 
349 #ifndef traceLOW_POWER_IDLE_BEGIN
350  /* Called immediately before entering tickless idle. */
351  #define traceLOW_POWER_IDLE_BEGIN()
352 #endif
353 
354 #ifndef traceLOW_POWER_IDLE_END
355  /* Called when returning to the Idle task after a tickless idle. */
356  #define traceLOW_POWER_IDLE_END()
357 #endif
358 
359 #ifndef traceTASK_SWITCHED_OUT
360  /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
361  to the task control block of the task being switched out. */
362  #define traceTASK_SWITCHED_OUT()
363 #endif
364 
365 #ifndef traceTASK_PRIORITY_INHERIT
366  /* Called when a task attempts to take a mutex that is already held by a
367  lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
368  that holds the mutex. uxInheritedPriority is the priority the mutex holder
369  will inherit (the priority of the task that is attempting to obtain the
370  muted. */
371  #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
372 #endif
373 
374 #ifndef traceTASK_PRIORITY_DISINHERIT
375  /* Called when a task releases a mutex, the holding of which had resulted in
376  the task inheriting the priority of a higher priority task.
377  pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
378  mutex. uxOriginalPriority is the task's configured (base) priority. */
379  #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
380 #endif
381 
382 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
383  /* Task is about to block because it cannot read from a
384  queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
385  upon which the read was attempted. pxCurrentTCB points to the TCB of the
386  task that attempted the read. */
387  #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
388 #endif
389 
390 #ifndef traceBLOCKING_ON_QUEUE_SEND
391  /* Task is about to block because it cannot write to a
392  queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
393  upon which the write was attempted. pxCurrentTCB points to the TCB of the
394  task that attempted the write. */
395  #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
396 #endif
397 
398 #ifndef configCHECK_FOR_STACK_OVERFLOW
399  #define configCHECK_FOR_STACK_OVERFLOW 0
400 #endif
401 
402 /* The following event macros are embedded in the kernel API calls. */
403 
404 #ifndef traceMOVED_TASK_TO_READY_STATE
405  #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
406 #endif
407 
408 #ifndef traceQUEUE_CREATE
409  #define traceQUEUE_CREATE( pxNewQueue )
410 #endif
411 
412 #ifndef traceQUEUE_CREATE_FAILED
413  #define traceQUEUE_CREATE_FAILED( ucQueueType )
414 #endif
415 
416 #ifndef traceCREATE_MUTEX
417  #define traceCREATE_MUTEX( pxNewQueue )
418 #endif
419 
420 #ifndef traceCREATE_MUTEX_FAILED
421  #define traceCREATE_MUTEX_FAILED()
422 #endif
423 
424 #ifndef traceGIVE_MUTEX_RECURSIVE
425  #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
426 #endif
427 
428 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
429  #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
430 #endif
431 
432 #ifndef traceTAKE_MUTEX_RECURSIVE
433  #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
434 #endif
435 
436 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
437  #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
438 #endif
439 
440 #ifndef traceCREATE_COUNTING_SEMAPHORE
441  #define traceCREATE_COUNTING_SEMAPHORE()
442 #endif
443 
444 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
445  #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
446 #endif
447 
448 #ifndef traceQUEUE_SEND
449  #define traceQUEUE_SEND( pxQueue )
450 #endif
451 
452 #ifndef traceQUEUE_SEND_FAILED
453  #define traceQUEUE_SEND_FAILED( pxQueue )
454 #endif
455 
456 #ifndef traceQUEUE_RECEIVE
457  #define traceQUEUE_RECEIVE( pxQueue )
458 #endif
459 
460 #ifndef traceQUEUE_PEEK
461  #define traceQUEUE_PEEK( pxQueue )
462 #endif
463 
464 #ifndef traceQUEUE_PEEK_FROM_ISR
465  #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
466 #endif
467 
468 #ifndef traceQUEUE_RECEIVE_FAILED
469  #define traceQUEUE_RECEIVE_FAILED( pxQueue )
470 #endif
471 
472 #ifndef traceQUEUE_SEND_FROM_ISR
473  #define traceQUEUE_SEND_FROM_ISR( pxQueue )
474 #endif
475 
476 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
477  #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
478 #endif
479 
480 #ifndef traceQUEUE_RECEIVE_FROM_ISR
481  #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
482 #endif
483 
484 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
485  #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
486 #endif
487 
488 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
489  #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
490 #endif
491 
492 #ifndef traceQUEUE_DELETE
493  #define traceQUEUE_DELETE( pxQueue )
494 #endif
495 
496 #ifndef traceTASK_CREATE
497  #define traceTASK_CREATE( pxNewTCB )
498 #endif
499 
500 #ifndef traceTASK_CREATE_FAILED
501  #define traceTASK_CREATE_FAILED()
502 #endif
503 
504 #ifndef traceTASK_DELETE
505  #define traceTASK_DELETE( pxTaskToDelete )
506 #endif
507 
508 #ifndef traceTASK_DELAY_UNTIL
509  #define traceTASK_DELAY_UNTIL()
510 #endif
511 
512 #ifndef traceTASK_DELAY
513  #define traceTASK_DELAY()
514 #endif
515 
516 #ifndef traceTASK_PRIORITY_SET
517  #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
518 #endif
519 
520 #ifndef traceTASK_SUSPEND
521  #define traceTASK_SUSPEND( pxTaskToSuspend )
522 #endif
523 
524 #ifndef traceTASK_RESUME
525  #define traceTASK_RESUME( pxTaskToResume )
526 #endif
527 
528 #ifndef traceTASK_RESUME_FROM_ISR
529  #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
530 #endif
531 
532 #ifndef traceTASK_INCREMENT_TICK
533  #define traceTASK_INCREMENT_TICK( xTickCount )
534 #endif
535 
536 #ifndef traceTIMER_CREATE
537  #define traceTIMER_CREATE( pxNewTimer )
538 #endif
539 
540 #ifndef traceTIMER_CREATE_FAILED
541  #define traceTIMER_CREATE_FAILED()
542 #endif
543 
544 #ifndef traceTIMER_COMMAND_SEND
545  #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
546 #endif
547 
548 #ifndef traceTIMER_EXPIRED
549  #define traceTIMER_EXPIRED( pxTimer )
550 #endif
551 
552 #ifndef traceTIMER_COMMAND_RECEIVED
553  #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
554 #endif
555 
556 #ifndef traceMALLOC
557  #define traceMALLOC( pvAddress, uiSize )
558 #endif
559 
560 #ifndef traceFREE
561  #define traceFREE( pvAddress, uiSize )
562 #endif
563 
564 #ifndef traceEVENT_GROUP_CREATE
565  #define traceEVENT_GROUP_CREATE( xEventGroup )
566 #endif
567 
568 #ifndef traceEVENT_GROUP_CREATE_FAILED
569  #define traceEVENT_GROUP_CREATE_FAILED()
570 #endif
571 
572 #ifndef traceEVENT_GROUP_SYNC_BLOCK
573  #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
574 #endif
575 
576 #ifndef traceEVENT_GROUP_SYNC_END
577  #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
578 #endif
579 
580 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
581  #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
582 #endif
583 
584 #ifndef traceEVENT_GROUP_WAIT_BITS_END
585  #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
586 #endif
587 
588 #ifndef traceEVENT_GROUP_CLEAR_BITS
589  #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
590 #endif
591 
592 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
593  #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
594 #endif
595 
596 #ifndef traceEVENT_GROUP_SET_BITS
597  #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
598 #endif
599 
600 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
601  #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
602 #endif
603 
604 #ifndef traceEVENT_GROUP_DELETE
605  #define traceEVENT_GROUP_DELETE( xEventGroup )
606 #endif
607 
608 #ifndef tracePEND_FUNC_CALL
609  #define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret)
610 #endif
611 
612 #ifndef tracePEND_FUNC_CALL_FROM_ISR
613  #define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret)
614 #endif
615 
616 #ifndef traceQUEUE_REGISTRY_ADD
617  #define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)
618 #endif
619 
620 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
621  #define traceTASK_NOTIFY_TAKE_BLOCK()
622 #endif
623 
624 #ifndef traceTASK_NOTIFY_TAKE
625  #define traceTASK_NOTIFY_TAKE()
626 #endif
627 
628 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
629  #define traceTASK_NOTIFY_WAIT_BLOCK()
630 #endif
631 
632 #ifndef traceTASK_NOTIFY_WAIT
633  #define traceTASK_NOTIFY_WAIT()
634 #endif
635 
636 #ifndef traceTASK_NOTIFY
637  #define traceTASK_NOTIFY()
638 #endif
639 
640 #ifndef traceTASK_NOTIFY_FROM_ISR
641  #define traceTASK_NOTIFY_FROM_ISR()
642 #endif
643 
644 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
645  #define traceTASK_NOTIFY_GIVE_FROM_ISR()
646 #endif
647 
648 #ifndef configGENERATE_RUN_TIME_STATS
649  #define configGENERATE_RUN_TIME_STATS 0
650 #endif
651 
652 #if ( configGENERATE_RUN_TIME_STATS == 1 )
653 
654  #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
655  #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.
656  #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
657 
658  #ifndef portGET_RUN_TIME_COUNTER_VALUE
659  #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
660  #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.
661  #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
662  #endif /* portGET_RUN_TIME_COUNTER_VALUE */
663 
664 #endif /* configGENERATE_RUN_TIME_STATS */
665 
666 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
667  #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
668 #endif
669 
670 #ifndef configUSE_MALLOC_FAILED_HOOK
671  #define configUSE_MALLOC_FAILED_HOOK 0
672 #endif
673 
674 #ifndef portPRIVILEGE_BIT
675  #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
676 #endif
677 
678 #ifndef portYIELD_WITHIN_API
679  #define portYIELD_WITHIN_API portYIELD
680 #endif
681 
682 #ifndef pvPortMallocAligned
683  #define pvPortMallocAligned( x, puxStackBuffer ) ( ( ( puxStackBuffer ) == NULL ) ? ( pvPortMalloc( ( x ) ) ) : ( puxStackBuffer ) )
684 #endif
685 
686 #ifndef vPortFreeAligned
687  #define vPortFreeAligned( pvBlockToFree ) vPortFree( pvBlockToFree )
688 #endif
689 
690 #ifndef portSUPPRESS_TICKS_AND_SLEEP
691  #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
692 #endif
693 
694 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
695  #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
696 #endif
697 
698 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
699  #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
700 #endif
701 
702 #ifndef configUSE_TICKLESS_IDLE
703  #define configUSE_TICKLESS_IDLE 0
704 #endif
705 
706 #ifndef configPRE_SLEEP_PROCESSING
707  #define configPRE_SLEEP_PROCESSING( x )
708 #endif
709 
710 #ifndef configPOST_SLEEP_PROCESSING
711  #define configPOST_SLEEP_PROCESSING( x )
712 #endif
713 
714 #ifndef configUSE_QUEUE_SETS
715  #define configUSE_QUEUE_SETS 0
716 #endif
717 
718 #ifndef portTASK_USES_FLOATING_POINT
719  #define portTASK_USES_FLOATING_POINT()
720 #endif
721 
722 #ifndef configUSE_TIME_SLICING
723  #define configUSE_TIME_SLICING 1
724 #endif
725 
726 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
727  #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
728 #endif
729 
730 #ifndef configUSE_NEWLIB_REENTRANT
731  #define configUSE_NEWLIB_REENTRANT 0
732 #endif
733 
734 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
735  #define configUSE_STATS_FORMATTING_FUNCTIONS 0
736 #endif
737 
738 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
739  #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
740 #endif
741 
742 #ifndef configUSE_TRACE_FACILITY
743  #define configUSE_TRACE_FACILITY 0
744 #endif
745 
746 #ifndef mtCOVERAGE_TEST_MARKER
747  #define mtCOVERAGE_TEST_MARKER()
748 #endif
749 
750 #ifndef mtCOVERAGE_TEST_DELAY
751  #define mtCOVERAGE_TEST_DELAY()
752 #endif
753 
754 #ifndef portASSERT_IF_IN_ISR
755  #define portASSERT_IF_IN_ISR()
756 #endif
757 
758 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
759  #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
760 #endif
761 
762 #ifndef configAPPLICATION_ALLOCATED_HEAP
763  #define configAPPLICATION_ALLOCATED_HEAP 0
764 #endif
765 
766 #ifndef configUSE_TASK_NOTIFICATIONS
767  #define configUSE_TASK_NOTIFICATIONS 1
768 #endif
769 
770 #ifndef portTICK_TYPE_IS_ATOMIC
771  #define portTICK_TYPE_IS_ATOMIC 0
772 #endif
773 
774 #if( portTICK_TYPE_IS_ATOMIC == 0 )
775  /* Either variables of tick type cannot be read atomically, or
776  portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
777  the tick count is returned to the standard critical section macros. */
778  #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
779  #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
780  #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
781  #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
782 #else
783  /* The tick type can be read atomically, so critical sections used when the
784  tick count is returned can be defined away. */
785  #define portTICK_TYPE_ENTER_CRITICAL()
786  #define portTICK_TYPE_EXIT_CRITICAL()
787  #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
788  #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
789 #endif
790 
791 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
792 V8 if desired. */
793 #ifndef configENABLE_BACKWARD_COMPATIBILITY
794  #define configENABLE_BACKWARD_COMPATIBILITY 1
795 #endif
796 
797 #if configENABLE_BACKWARD_COMPATIBILITY == 1
798  #define eTaskStateGet eTaskGetState
799  #define portTickType TickType_t
800  #define xTaskHandle TaskHandle_t
801  #define xQueueHandle QueueHandle_t
802  #define xSemaphoreHandle SemaphoreHandle_t
803  #define xQueueSetHandle QueueSetHandle_t
804  #define xQueueSetMemberHandle QueueSetMemberHandle_t
805  #define xTimeOutType TimeOut_t
806  #define xMemoryRegion MemoryRegion_t
807  #define xTaskParameters TaskParameters_t
808  #define xTaskStatusType TaskStatus_t
809  #define xTimerHandle TimerHandle_t
810  #define xCoRoutineHandle CoRoutineHandle_t
811  #define pdTASK_HOOK_CODE TaskHookFunction_t
812  #define portTICK_RATE_MS portTICK_PERIOD_MS
813 
814  /* Backward compatibility within the scheduler code only - these definitions
815  are not really required but are included for completeness. */
816  #define tmrTIMER_CALLBACK TimerCallbackFunction_t
817  #define pdTASK_CODE TaskFunction_t
818  #define xListItem ListItem_t
819  #define xList List_t
820 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
821 
822 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
823 if floating point hardware is otherwise supported by the FreeRTOS port in use.
824 This constant is not supported by all FreeRTOS ports that include floating
825 point support. */
826 #ifndef configUSE_TASK_FPU_SUPPORT
827  #define configUSE_TASK_FPU_SUPPORT 1
828 #endif
829 
830 #ifdef __cplusplus
831 }
832 #endif
833 
834 #endif /* INC_FREERTOS_H */
835