2 FreeRTOS.org V4.7.2 - Copyright (C) 2003-2008 Richard Barry.
\r
4 This file is part of the FreeRTOS.org distribution.
\r
6 FreeRTOS.org is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; either version 2 of the License, or
\r
9 (at your option) any later version.
\r
11 FreeRTOS.org is distributed in the hope that it will be useful,
\r
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 GNU General Public License for more details.
\r
16 You should have received a copy of the GNU General Public License
\r
17 along with FreeRTOS.org; if not, write to the Free Software
\r
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
20 A special exception to the GPL can be applied should you wish to distribute
\r
21 a combined work that includes FreeRTOS.org, without being obliged to provide
\r
22 the source code for any proprietary components. See the licensing section
\r
23 of http://www.FreeRTOS.org for full details of how and when the exception
\r
26 ***************************************************************************
\r
28 Please ensure to read the configuration and relevant port sections of the
\r
29 online documentation.
\r
31 +++ http://www.FreeRTOS.org +++
\r
32 Documentation, latest information, license and contact details.
\r
34 +++ http://www.SafeRTOS.com +++
\r
35 A version that is certified for use in safety critical systems.
\r
37 +++ http://www.OpenRTOS.com +++
\r
38 Commercial support, development, porting, licensing and training services.
\r
40 ***************************************************************************
\r
43 #ifndef INC_FREERTOS_H
\r
44 #define INC_FREERTOS_H
\r
48 * Include the generic headers required for the FreeRTOS port being used.
\r
52 /* Basic FreeRTOS definitions. */
\r
53 #include "projdefs.h"
\r
55 /* Application specific configuration options. */
\r
56 #include "FreeRTOSConfig.h"
\r
58 /* Definitions specific to the port being used. */
\r
59 #include "portable.h"
\r
68 * Check all the required application specific macros have been defined.
\r
69 * These macros are application specific and (as downloaded) are defined
\r
70 * within FreeRTOSConfig.h.
\r
73 #ifndef configUSE_PREEMPTION
\r
74 #error Missing definition: configUSE_PREEMPTION should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
77 #ifndef configUSE_IDLE_HOOK
\r
78 #error Missing definition: configUSE_IDLE_HOOK should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
81 #ifndef configUSE_TICK_HOOK
\r
82 #error Missing definition: configUSE_TICK_HOOK should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
85 #ifndef configUSE_CO_ROUTINES
\r
86 #error Missing definition: configUSE_CO_ROUTINES should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
89 #ifndef INCLUDE_vTaskPrioritySet
\r
90 #error Missing definition: INCLUDE_vTaskPrioritySet should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
93 #ifndef INCLUDE_uxTaskPriorityGet
\r
94 #error Missing definition: INCLUDE_uxTaskPriorityGet should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
97 #ifndef INCLUDE_vTaskDelete
\r
98 #error Missing definition: INCLUDE_vTaskDelete should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
101 #ifndef INCLUDE_vTaskCleanUpResources
\r
102 #error Missing definition: INCLUDE_vTaskCleanUpResources should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
105 #ifndef INCLUDE_vTaskSuspend
\r
106 #error Missing definition: INCLUDE_vTaskSuspend should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
109 #ifndef INCLUDE_vTaskDelayUntil
\r
110 #error Missing definition: INCLUDE_vTaskDelayUntil should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
113 #ifndef INCLUDE_vTaskDelay
\r
114 #error Missing definition: INCLUDE_vTaskDelay should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
117 #ifndef configUSE_16_BIT_TICKS
\r
118 #error Missing definition: configUSE_16_BIT_TICKS should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
121 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
\r
122 #define INCLUDE_uxTaskGetStackHighWaterMark 0
\r
125 #ifndef configUSE_RECURSIVE_MUTEXES
\r
126 #define configUSE_RECURSIVE_MUTEXES 0
\r
129 #ifndef configUSE_MUTEXES
\r
130 #define configUSE_MUTEXES 0
\r
133 #ifndef configUSE_COUNTING_SEMAPHORES
\r
134 #define configUSE_COUNTING_SEMAPHORES 0
\r
137 #ifndef configUSE_ALTERNATIVE_API
\r
138 #define configUSE_ALTERNATIVE_API 0
\r
141 #ifndef portCRITICAL_NESTING_IN_TCB
\r
142 #define portCRITICAL_NESTING_IN_TCB 0
\r
145 #if ( configUSE_MUTEXES == 1 )
\r
146 /* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism
\r
147 within the mutex implementation so must be available if mutexes are used. */
\r
148 #undef INCLUDE_xTaskGetCurrentTaskHandle
\r
149 #define INCLUDE_xTaskGetCurrentTaskHandle 1
\r
151 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
\r
152 #define INCLUDE_xTaskGetCurrentTaskHandle 0
\r
157 /* Remove any unused trace macros. */
\r
159 /* Used to perform any necessary initialisation - for example, open a file
\r
160 into which trace is to be written. */
\r
161 #define traceSTART()
\r
165 /* Use to close a trace, for example close a file into which trace has been
\r
170 #ifndef traceTASK_SWITCHED_IN
\r
171 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
\r
172 to the task control block of the selected task. */
\r
173 #define traceTASK_SWITCHED_IN()
\r
176 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
\r
177 /* Task is about to block because it cannot read from a
\r
178 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
179 upon which the read was attempted. pxCurrentTCB points to the TCB of the
\r
180 task that attempted the read. */
\r
181 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
\r
184 #ifndef traceBLOCKING_ON_QUEUE_SEND
\r
185 /* Task is about to block because it cannot write to a
\r
186 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
187 upon which the write was attempted. pxCurrentTCB points to the TCB of the
\r
188 task that attempted the write. */
\r
189 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
\r
192 #ifndef configCHECK_FOR_STACK_OVERFLOW
\r
193 #define configCHECK_FOR_STACK_OVERFLOW 0
\r
196 /* The following event macros are embedded in the kernel API calls. */
\r
198 #ifndef traceQUEUE_CREATE
\r
199 #define traceQUEUE_CREATE( pxNewQueue )
\r
202 #ifndef traceQUEUE_CREATE_FAILED
\r
203 #define traceQUEUE_CREATE_FAILED()
\r
206 #ifndef traceCREATE_MUTEX
\r
207 #define traceCREATE_MUTEX( pxNewQueue )
\r
210 #ifndef traceCREATE_MUTEX_FAILED
\r
211 #define traceCREATE_MUTEX_FAILED()
\r
214 #ifndef traceGIVE_MUTEX_RECURSIVE
\r
215 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
\r
218 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
\r
219 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
\r
222 #ifndef traceTAKE_MUTEX_RECURSIVE
\r
223 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
\r
226 #ifndef traceCREATE_COUNTING_SEMAPHORE
\r
227 #define traceCREATE_COUNTING_SEMAPHORE()
\r
230 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
\r
231 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
\r
234 #ifndef traceQUEUE_SEND
\r
235 #define traceQUEUE_SEND( pxQueue )
\r
238 #ifndef traceQUEUE_SEND_FAILED
\r
239 #define traceQUEUE_SEND_FAILED( pxQueue )
\r
242 #ifndef traceQUEUE_RECEIVE
\r
243 #define traceQUEUE_RECEIVE( pxQueue )
\r
246 #ifndef traceQUEUE_PEEK
\r
247 #define traceQUEUE_PEEK( pxQueue )
\r
250 #ifndef traceQUEUE_RECEIVE_FAILED
\r
251 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
\r
254 #ifndef traceQUEUE_SEND_FROM_ISR
\r
255 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
\r
258 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
\r
259 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
\r
262 #ifndef traceQUEUE_RECEIVE_FROM_ISR
\r
263 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
\r
266 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
\r
267 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
\r
270 #ifndef traceQUEUE_DELETE
\r
271 #define traceQUEUE_DELETE( pxQueue )
\r
274 #ifndef traceTASK_CREATE
\r
275 #define traceTASK_CREATE( pxNewTCB )
\r
278 #ifndef traceTASK_CREATE_FAILED
\r
279 #define traceTASK_CREATE_FAILED( pxNewTCB )
\r
282 #ifndef traceTASK_DELETE
\r
283 #define traceTASK_DELETE( pxTaskToDelete )
\r
286 #ifndef traceTASK_DELAY_UNTIL
\r
287 #define traceTASK_DELAY_UNTIL()
\r
290 #ifndef traceTASK_DELAY
\r
291 #define traceTASK_DELAY()
\r
294 #ifndef traceTASK_PRIORITY_SET
\r
295 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
\r
298 #ifndef traceTASK_SUSPEND
\r
299 #define traceTASK_SUSPEND( pxTaskToSuspend )
\r
302 #ifndef traceTASK_RESUME
\r
303 #define traceTASK_RESUME( pxTaskToResume )
\r
306 #ifndef traceTASK_RESUME_FROM_ISR
\r
307 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
\r
310 #ifndef traceTASK_INCREMENT_TICK
\r
311 #define traceTASK_INCREMENT_TICK( xTickCount )
\r
314 #endif /* INC_FREERTOS_H */
\r