]> git.sur5r.net Git - freertos/blob - Source/include/FreeRTOS.h
Update version numbers to V4.8.0
[freertos] / Source / include / FreeRTOS.h
1 /*\r
2         FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.\r
3 \r
4         This file is part of the FreeRTOS.org distribution.\r
5 \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
10 \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
15 \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
19 \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
24         can be applied.\r
25 \r
26         ***************************************************************************\r
27         ***************************************************************************\r
28         *                                                                                                                                                 *\r
29         * SAVE TIME AND MONEY!  Why not get us to quote to get FreeRTOS.org               *\r
30         * running on your hardware - or even write all or part of your application*\r
31         * for you?  See http://www.OpenRTOS.com for details.                                      *\r
32         *                                                                                                                                                 *\r
33         ***************************************************************************\r
34         ***************************************************************************\r
35 \r
36         Please ensure to read the configuration and relevant port sections of the\r
37         online documentation.\r
38 \r
39         http://www.FreeRTOS.org - Documentation, latest information, license and \r
40         contact details.\r
41 \r
42         http://www.SafeRTOS.com - A version that is certified for use in safety \r
43         critical systems.\r
44 \r
45         http://www.OpenRTOS.com - Commercial support, development, porting, \r
46         licensing and training services.\r
47 */\r
48 \r
49 #ifndef INC_FREERTOS_H\r
50 #define INC_FREERTOS_H\r
51 \r
52 \r
53 /*\r
54  * Include the generic headers required for the FreeRTOS port being used.\r
55  */\r
56 #include <stddef.h>\r
57 \r
58 /* Basic FreeRTOS definitions. */\r
59 #include "projdefs.h"\r
60 \r
61 /* Application specific configuration options. */\r
62 #include "FreeRTOSConfig.h"\r
63 \r
64 /* Definitions specific to the port being used. */\r
65 #include "portable.h"\r
66 \r
67 \r
68 \r
69 \r
70 \r
71 \r
72 \r
73 /*\r
74  * Check all the required application specific macros have been defined.\r
75  * These macros are application specific and (as downloaded) are defined\r
76  * within FreeRTOSConfig.h.\r
77  */\r
78 \r
79 #ifndef configUSE_PREEMPTION\r
80         #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
81 #endif\r
82 \r
83 #ifndef configUSE_IDLE_HOOK\r
84         #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
85 #endif\r
86 \r
87 #ifndef configUSE_TICK_HOOK\r
88         #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
89 #endif\r
90 \r
91 #ifndef configUSE_CO_ROUTINES\r
92         #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
93 #endif\r
94 \r
95 #ifndef INCLUDE_vTaskPrioritySet\r
96         #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
97 #endif\r
98 \r
99 #ifndef INCLUDE_uxTaskPriorityGet\r
100         #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
101 #endif\r
102 \r
103 #ifndef INCLUDE_vTaskDelete             \r
104         #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
105 #endif\r
106 \r
107 #ifndef INCLUDE_vTaskCleanUpResources\r
108         #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
109 #endif\r
110 \r
111 #ifndef INCLUDE_vTaskSuspend    \r
112         #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
113 #endif\r
114 \r
115 #ifndef INCLUDE_vTaskDelayUntil\r
116         #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
117 #endif\r
118 \r
119 #ifndef INCLUDE_vTaskDelay\r
120         #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
121 #endif\r
122 \r
123 #ifndef configUSE_16_BIT_TICKS\r
124         #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
125 #endif\r
126 \r
127 #ifndef INCLUDE_uxTaskGetStackHighWaterMark\r
128         #define INCLUDE_uxTaskGetStackHighWaterMark 0\r
129 #endif\r
130 \r
131 #ifndef configUSE_RECURSIVE_MUTEXES\r
132         #define configUSE_RECURSIVE_MUTEXES 0\r
133 #endif\r
134 \r
135 #ifndef configUSE_MUTEXES\r
136         #define configUSE_MUTEXES 0\r
137 #endif\r
138 \r
139 #ifndef configUSE_COUNTING_SEMAPHORES\r
140         #define configUSE_COUNTING_SEMAPHORES 0\r
141 #endif\r
142 \r
143 #ifndef configUSE_ALTERNATIVE_API\r
144         #define configUSE_ALTERNATIVE_API 0\r
145 #endif\r
146 \r
147 #ifndef portCRITICAL_NESTING_IN_TCB\r
148         #define portCRITICAL_NESTING_IN_TCB 0\r
149 #endif\r
150 \r
151 #if ( configUSE_MUTEXES == 1 )\r
152         /* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism\r
153         within the mutex implementation so must be available if mutexes are used. */\r
154         #undef INCLUDE_xTaskGetCurrentTaskHandle\r
155         #define INCLUDE_xTaskGetCurrentTaskHandle 1\r
156 #else\r
157         #ifndef INCLUDE_xTaskGetCurrentTaskHandle\r
158                 #define INCLUDE_xTaskGetCurrentTaskHandle 0\r
159         #endif\r
160 #endif\r
161 \r
162 \r
163 /* Remove any unused trace macros. */\r
164 #ifndef traceSTART\r
165         /* Used to perform any necessary initialisation - for example, open a file\r
166         into which trace is to be written. */\r
167         #define traceSTART()\r
168 #endif\r
169 \r
170 #ifndef traceEND\r
171         /* Use to close a trace, for example close a file into which trace has been\r
172         written. */\r
173         #define traceEND()\r
174 #endif\r
175 \r
176 #ifndef traceTASK_SWITCHED_IN\r
177         /* Called after a task has been selected to run.  pxCurrentTCB holds a pointer\r
178         to the task control block of the selected task. */\r
179         #define traceTASK_SWITCHED_IN()\r
180 #endif\r
181 \r
182 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE\r
183         /* Task is about to block because it cannot read from a \r
184         queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore\r
185         upon which the read was attempted.  pxCurrentTCB points to the TCB of the \r
186         task that attempted the read. */\r
187         #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )\r
188 #endif\r
189 \r
190 #ifndef traceBLOCKING_ON_QUEUE_SEND\r
191         /* Task is about to block because it cannot write to a \r
192         queue/mutex/semaphore.  pxQueue is a pointer to the queue/mutex/semaphore\r
193         upon which the write was attempted.  pxCurrentTCB points to the TCB of the \r
194         task that attempted the write. */\r
195         #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )\r
196 #endif\r
197 \r
198 #ifndef configCHECK_FOR_STACK_OVERFLOW\r
199         #define configCHECK_FOR_STACK_OVERFLOW 0\r
200 #endif\r
201 \r
202 /* The following event macros are embedded in the kernel API calls. */\r
203 \r
204 #ifndef traceQUEUE_CREATE       \r
205         #define traceQUEUE_CREATE( pxNewQueue )\r
206 #endif\r
207 \r
208 #ifndef traceQUEUE_CREATE_FAILED\r
209         #define traceQUEUE_CREATE_FAILED()\r
210 #endif\r
211 \r
212 #ifndef traceCREATE_MUTEX\r
213         #define traceCREATE_MUTEX( pxNewQueue )\r
214 #endif\r
215 \r
216 #ifndef traceCREATE_MUTEX_FAILED\r
217         #define traceCREATE_MUTEX_FAILED()\r
218 #endif\r
219 \r
220 #ifndef traceGIVE_MUTEX_RECURSIVE\r
221         #define traceGIVE_MUTEX_RECURSIVE( pxMutex )\r
222 #endif\r
223 \r
224 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED\r
225         #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )\r
226 #endif\r
227 \r
228 #ifndef traceTAKE_MUTEX_RECURSIVE\r
229         #define traceTAKE_MUTEX_RECURSIVE( pxMutex )\r
230 #endif\r
231 \r
232 #ifndef traceCREATE_COUNTING_SEMAPHORE\r
233         #define traceCREATE_COUNTING_SEMAPHORE()\r
234 #endif\r
235 \r
236 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED\r
237         #define traceCREATE_COUNTING_SEMAPHORE_FAILED()\r
238 #endif\r
239 \r
240 #ifndef traceQUEUE_SEND\r
241         #define traceQUEUE_SEND( pxQueue )\r
242 #endif\r
243 \r
244 #ifndef traceQUEUE_SEND_FAILED\r
245         #define traceQUEUE_SEND_FAILED( pxQueue )\r
246 #endif\r
247 \r
248 #ifndef traceQUEUE_RECEIVE\r
249         #define traceQUEUE_RECEIVE( pxQueue )\r
250 #endif\r
251 \r
252 #ifndef traceQUEUE_PEEK\r
253         #define traceQUEUE_PEEK( pxQueue )\r
254 #endif\r
255 \r
256 #ifndef traceQUEUE_RECEIVE_FAILED\r
257         #define traceQUEUE_RECEIVE_FAILED( pxQueue )\r
258 #endif\r
259 \r
260 #ifndef traceQUEUE_SEND_FROM_ISR\r
261         #define traceQUEUE_SEND_FROM_ISR( pxQueue )\r
262 #endif\r
263 \r
264 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED\r
265         #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )\r
266 #endif\r
267 \r
268 #ifndef traceQUEUE_RECEIVE_FROM_ISR\r
269         #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )\r
270 #endif\r
271 \r
272 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED\r
273         #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )\r
274 #endif\r
275 \r
276 #ifndef traceQUEUE_DELETE\r
277         #define traceQUEUE_DELETE( pxQueue )\r
278 #endif\r
279 \r
280 #ifndef traceTASK_CREATE\r
281         #define traceTASK_CREATE( pxNewTCB )\r
282 #endif\r
283 \r
284 #ifndef traceTASK_CREATE_FAILED\r
285         #define traceTASK_CREATE_FAILED( pxNewTCB )\r
286 #endif\r
287 \r
288 #ifndef traceTASK_DELETE\r
289         #define traceTASK_DELETE( pxTaskToDelete )\r
290 #endif\r
291 \r
292 #ifndef traceTASK_DELAY_UNTIL\r
293         #define traceTASK_DELAY_UNTIL()\r
294 #endif\r
295 \r
296 #ifndef traceTASK_DELAY\r
297         #define traceTASK_DELAY()\r
298 #endif\r
299 \r
300 #ifndef traceTASK_PRIORITY_SET\r
301         #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )\r
302 #endif\r
303 \r
304 #ifndef traceTASK_SUSPEND\r
305         #define traceTASK_SUSPEND( pxTaskToSuspend )\r
306 #endif\r
307 \r
308 #ifndef traceTASK_RESUME\r
309         #define traceTASK_RESUME( pxTaskToResume )\r
310 #endif\r
311 \r
312 #ifndef traceTASK_RESUME_FROM_ISR\r
313         #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )\r
314 #endif\r
315 \r
316 #ifndef traceTASK_INCREMENT_TICK\r
317         #define traceTASK_INCREMENT_TICK( xTickCount )\r
318 #endif\r
319 \r
320 #endif /* INC_FREERTOS_H */\r
321 \r