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