1 |
/* |
---|
2 |
FreeRTOS.org V5.0.4 - Copyright (C) 2003-2008 Richard Barry. |
---|
3 |
|
---|
4 |
This file is part of the FreeRTOS.org distribution. |
---|
5 |
|
---|
6 |
FreeRTOS.org is free software; you can redistribute it and/or modify |
---|
7 |
it under the terms of the GNU General Public License as published by |
---|
8 |
the Free Software Foundation; either version 2 of the License, or |
---|
9 |
(at your option) any later version. |
---|
10 |
|
---|
11 |
FreeRTOS.org is distributed in the hope that it will be useful, |
---|
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 |
GNU General Public License for more details. |
---|
15 |
|
---|
16 |
You should have received a copy of the GNU General Public License |
---|
17 |
along with FreeRTOS.org; if not, write to the Free Software |
---|
18 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
19 |
|
---|
20 |
A special exception to the GPL can be applied should you wish to distribute |
---|
21 |
a combined work that includes FreeRTOS.org, without being obliged to provide |
---|
22 |
the source code for any proprietary components. See the licensing section |
---|
23 |
of http://www.FreeRTOS.org for full details of how and when the exception |
---|
24 |
can be applied. |
---|
25 |
|
---|
26 |
*************************************************************************** |
---|
27 |
*************************************************************************** |
---|
28 |
* * |
---|
29 |
* SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, * |
---|
30 |
* and even write all or part of your application on your behalf. * |
---|
31 |
* See http://www.OpenRTOS.com for details of the services we provide to * |
---|
32 |
* expedite your project. * |
---|
33 |
* * |
---|
34 |
*************************************************************************** |
---|
35 |
*************************************************************************** |
---|
36 |
|
---|
37 |
Please ensure to read the configuration and relevant port sections of the |
---|
38 |
online documentation. |
---|
39 |
|
---|
40 |
http://www.FreeRTOS.org - Documentation, latest information, license and |
---|
41 |
contact details. |
---|
42 |
|
---|
43 |
http://www.SafeRTOS.com - A version that is certified for use in safety |
---|
44 |
critical systems. |
---|
45 |
|
---|
46 |
http://www.OpenRTOS.com - Commercial support, development, porting, |
---|
47 |
licensing and training services. |
---|
48 |
*/ |
---|
49 |
|
---|
50 |
#ifndef INC_FREERTOS_H |
---|
51 |
#define INC_FREERTOS_H |
---|
52 |
|
---|
53 |
|
---|
54 |
/* |
---|
55 |
* Include the generic headers required for the FreeRTOS port being used. |
---|
56 |
*/ |
---|
57 |
#include <stddef.h> |
---|
58 |
|
---|
59 |
/* Basic FreeRTOS definitions. */ |
---|
60 |
#include "projdefs.h" |
---|
61 |
|
---|
62 |
/* Application specific configuration options. */ |
---|
63 |
#include "FreeRTOSConfig.h" |
---|
64 |
|
---|
65 |
/* Definitions specific to the port being used. */ |
---|
66 |
#include "portable.h" |
---|
67 |
|
---|
68 |
|
---|
69 |
/* Defines the prototype to which the application task hook function must |
---|
70 |
conform. */ |
---|
71 |
typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); |
---|
72 |
|
---|
73 |
|
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|
77 |
/* |
---|
78 |
* Check all the required application specific macros have been defined. |
---|
79 |
* These macros are application specific and (as downloaded) are defined |
---|
80 |
* within FreeRTOSConfig.h. |
---|
81 |
*/ |
---|
82 |
|
---|
83 |
#ifndef configUSE_PREEMPTION |
---|
84 |
#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. |
---|
85 |
#endif |
---|
86 |
|
---|
87 |
#ifndef configUSE_IDLE_HOOK |
---|
88 |
#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. |
---|
89 |
#endif |
---|
90 |
|
---|
91 |
#ifndef configUSE_TICK_HOOK |
---|
92 |
#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. |
---|
93 |
#endif |
---|
94 |
|
---|
95 |
#ifndef configUSE_CO_ROUTINES |
---|
96 |
#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. |
---|
97 |
#endif |
---|
98 |
|
---|
99 |
#ifndef INCLUDE_vTaskPrioritySet |
---|
100 |
#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. |
---|
101 |
#endif |
---|
102 |
|
---|
103 |
#ifndef INCLUDE_uxTaskPriorityGet |
---|
104 |
#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. |
---|
105 |
#endif |
---|
106 |
|
---|
107 |
#ifndef INCLUDE_vTaskDelete |
---|
108 |
#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. |
---|
109 |
#endif |
---|
110 |
|
---|
111 |
#ifndef INCLUDE_vTaskCleanUpResources |
---|
112 |
#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. |
---|
113 |
#endif |
---|
114 |
|
---|
115 |
#ifndef INCLUDE_vTaskSuspend |
---|
116 |
#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. |
---|
117 |
#endif |
---|
118 |
|
---|
119 |
#ifndef INCLUDE_vTaskDelayUntil |
---|
120 |
#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. |
---|
121 |
#endif |
---|
122 |
|
---|
123 |
#ifndef INCLUDE_vTaskDelay |
---|
124 |
#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. |
---|
125 |
#endif |
---|
126 |
|
---|
127 |
#ifndef configUSE_16_BIT_TICKS |
---|
128 |
#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. |
---|
129 |
#endif |
---|
130 |
|
---|
131 |
#ifndef configUSE_APPLICATION_TASK_TAG |
---|
132 |
#define configUSE_APPLICATION_TASK_TAG 0 |
---|
133 |
#endif |
---|
134 |
|
---|
135 |
#ifndef INCLUDE_uxTaskGetStackHighWaterMark |
---|
136 |
#define INCLUDE_uxTaskGetStackHighWaterMark 0 |
---|
137 |
#endif |
---|
138 |
|
---|
139 |
#ifndef configUSE_RECURSIVE_MUTEXES |
---|
140 |
#define configUSE_RECURSIVE_MUTEXES 0 |
---|
141 |
#endif |
---|
142 |
|
---|
143 |
#ifndef configUSE_MUTEXES |
---|
144 |
#define configUSE_MUTEXES 0 |
---|
145 |
#endif |
---|
146 |
|
---|
147 |
#ifndef configUSE_COUNTING_SEMAPHORES |
---|
148 |
#define configUSE_COUNTING_SEMAPHORES 0 |
---|
149 |
#endif |
---|
150 |
|
---|
151 |
#ifndef configUSE_ALTERNATIVE_API |
---|
152 |
#define configUSE_ALTERNATIVE_API 0 |
---|
153 |
#endif |
---|
154 |
|
---|
155 |
#ifndef portCRITICAL_NESTING_IN_TCB |
---|
156 |
#define portCRITICAL_NESTING_IN_TCB 0 |
---|
157 |
#endif |
---|
158 |
|
---|
159 |
#ifndef configMAX_TASK_NAME_LEN |
---|
160 |
#define configMAX_TASK_NAME_LEN 16 |
---|
161 |
#endif |
---|
162 |
|
---|
163 |
#ifndef configIDLE_SHOULD_YIELD |
---|
164 |
#define configIDLE_SHOULD_YIELD 1 |
---|
165 |
#endif |
---|
166 |
|
---|
167 |
#if configMAX_TASK_NAME_LEN < 1 |
---|
168 |
#undef configMAX_TASK_NAME_LEN |
---|
169 |
#define configMAX_TASK_NAME_LEN 1 |
---|
170 |
#endif |
---|
171 |
|
---|
172 |
#ifndef INCLUDE_xTaskResumeFromISR |
---|
173 |
#define INCLUDE_xTaskResumeFromISR 1 |
---|
174 |
#endif |
---|
175 |
|
---|
176 |
#ifndef INCLUDE_xTaskGetSchedulerState |
---|
177 |
#define INCLUDE_xTaskGetSchedulerState 0 |
---|
178 |
#endif |
---|
179 |
|
---|
180 |
#if ( configUSE_MUTEXES == 1 ) |
---|
181 |
/* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism |
---|
182 |
within the mutex implementation so must be available if mutexes are used. */ |
---|
183 |
#undef INCLUDE_xTaskGetCurrentTaskHandle |
---|
184 |
#define INCLUDE_xTaskGetCurrentTaskHandle 1 |
---|
185 |
#else |
---|
186 |
#ifndef INCLUDE_xTaskGetCurrentTaskHandle |
---|
187 |
#define INCLUDE_xTaskGetCurrentTaskHandle 0 |
---|
188 |
#endif |
---|
189 |
#endif |
---|
190 |
|
---|
191 |
|
---|
192 |
#ifndef portSET_INTERRUPT_MASK_FROM_ISR |
---|
193 |
#define portSET_INTERRUPT_MASK_FROM_ISR() 0 |
---|
194 |
#endif |
---|
195 |
|
---|
196 |
#ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR |
---|
197 |
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue |
---|
198 |
#endif |
---|
199 |
|
---|
200 |
|
---|
201 |
#ifndef configQUEUE_REGISTRY_SIZE |
---|
202 |
#define configQUEUE_REGISTRY_SIZE 0 |
---|
203 |
#endif |
---|
204 |
|
---|
205 |
#if configQUEUE_REGISTRY_SIZE < 1 |
---|
206 |
#define configQUEUE_REGISTRY_SIZE 0 |
---|
207 |
#define vQueueAddToRegistry( xQueue, pcName ) |
---|
208 |
#define vQueueUnregisterQueue( xQueue ) |
---|
209 |
#endif |
---|
210 |
|
---|
211 |
|
---|
212 |
/* Remove any unused trace macros. */ |
---|
213 |
#ifndef traceSTART |
---|
214 |
/* Used to perform any necessary initialisation - for example, open a file |
---|
215 |
into which trace is to be written. */ |
---|
216 |
#define traceSTART() |
---|
217 |
#endif |
---|
218 |
|
---|
219 |
#ifndef traceEND |
---|
220 |
/* Use to close a trace, for example close a file into which trace has been |
---|
221 |
written. */ |
---|
222 |
#define traceEND() |
---|
223 |
#endif |
---|
224 |
|
---|
225 |
#ifndef traceTASK_SWITCHED_IN |
---|
226 |
/* Called after a task has been selected to run. pxCurrentTCB holds a pointer |
---|
227 |
to the task control block of the selected task. */ |
---|
228 |
#define traceTASK_SWITCHED_IN() |
---|
229 |
#endif |
---|
230 |
|
---|
231 |
#ifndef traceTASK_SWITCHED_OUT |
---|
232 |
/* Called before a task has been selected to run. pxCurrentTCB holds a pointer |
---|
233 |
to the task control block of the task being switched out. */ |
---|
234 |
#define traceTASK_SWITCHED_OUT() |
---|
235 |
#endif |
---|
236 |
|
---|
237 |
#ifndef traceBLOCKING_ON_QUEUE_RECEIVE |
---|
238 |
/* Task is about to block because it cannot read from a |
---|
239 |
queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore |
---|
240 |
upon which the read was attempted. pxCurrentTCB points to the TCB of the |
---|
241 |
task that attempted the read. */ |
---|
242 |
#define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ) |
---|
243 |
#endif |
---|
244 |
|
---|
245 |
#ifndef traceBLOCKING_ON_QUEUE_SEND |
---|
246 |
/* Task is about to block because it cannot write to a |
---|
247 |
queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore |
---|
248 |
upon which the write was attempted. pxCurrentTCB points to the TCB of the |
---|
249 |
task that attempted the write. */ |
---|
250 |
#define traceBLOCKING_ON_QUEUE_SEND( pxQueue ) |
---|
251 |
#endif |
---|
252 |
|
---|
253 |
#ifndef configCHECK_FOR_STACK_OVERFLOW |
---|
254 |
#define configCHECK_FOR_STACK_OVERFLOW 0 |
---|
255 |
#endif |
---|
256 |
|
---|
257 |
/* The following event macros are embedded in the kernel API calls. */ |
---|
258 |
|
---|
259 |
#ifndef traceQUEUE_CREATE |
---|
260 |
#define traceQUEUE_CREATE( pxNewQueue ) |
---|
261 |
#endif |
---|
262 |
|
---|
263 |
#ifndef traceQUEUE_CREATE_FAILED |
---|
264 |
#define traceQUEUE_CREATE_FAILED() |
---|
265 |
#endif |
---|
266 |
|
---|
267 |
#ifndef traceCREATE_MUTEX |
---|
268 |
#define traceCREATE_MUTEX( pxNewQueue ) |
---|
269 |
#endif |
---|
270 |
|
---|
271 |
#ifndef traceCREATE_MUTEX_FAILED |
---|
272 |
#define traceCREATE_MUTEX_FAILED() |
---|
273 |
#endif |
---|
274 |
|
---|
275 |
#ifndef traceGIVE_MUTEX_RECURSIVE |
---|
276 |
#define traceGIVE_MUTEX_RECURSIVE( pxMutex ) |
---|
277 |
#endif |
---|
278 |
|
---|
279 |
#ifndef traceGIVE_MUTEX_RECURSIVE_FAILED |
---|
280 |
#define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex ) |
---|
281 |
#endif |
---|
282 |
|
---|
283 |
#ifndef traceTAKE_MUTEX_RECURSIVE |
---|
284 |
#define traceTAKE_MUTEX_RECURSIVE( pxMutex ) |
---|
285 |
#endif |
---|
286 |
|
---|
287 |
#ifndef traceCREATE_COUNTING_SEMAPHORE |
---|
288 |
#define traceCREATE_COUNTING_SEMAPHORE() |
---|
289 |
#endif |
---|
290 |
|
---|
291 |
#ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED |
---|
292 |
#define traceCREATE_COUNTING_SEMAPHORE_FAILED() |
---|
293 |
#endif |
---|
294 |
|
---|
295 |
#ifndef traceQUEUE_SEND |
---|
296 |
#define traceQUEUE_SEND( pxQueue ) |
---|
297 |
#endif |
---|
298 |
|
---|
299 |
#ifndef traceQUEUE_SEND_FAILED |
---|
300 |
#define traceQUEUE_SEND_FAILED( pxQueue ) |
---|
301 |
#endif |
---|
302 |
|
---|
303 |
#ifndef traceQUEUE_RECEIVE |
---|
304 |
#define traceQUEUE_RECEIVE( pxQueue ) |
---|
305 |
#endif |
---|
306 |
|
---|
307 |
#ifndef traceQUEUE_PEEK |
---|
308 |
#define traceQUEUE_PEEK( pxQueue ) |
---|
309 |
#endif |
---|
310 |
|
---|
311 |
#ifndef traceQUEUE_RECEIVE_FAILED |
---|
312 |
#define traceQUEUE_RECEIVE_FAILED( pxQueue ) |
---|
313 |
#endif |
---|
314 |
|
---|
315 |
#ifndef traceQUEUE_SEND_FROM_ISR |
---|
316 |
#define traceQUEUE_SEND_FROM_ISR( pxQueue ) |
---|
317 |
#endif |
---|
318 |
|
---|
319 |
#ifndef traceQUEUE_SEND_FROM_ISR_FAILED |
---|
320 |
#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) |
---|
321 |
#endif |
---|
322 |
|
---|
323 |
#ifndef traceQUEUE_RECEIVE_FROM_ISR |
---|
324 |
#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) |
---|
325 |
#endif |
---|
326 |
|
---|
327 |
#ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED |
---|
328 |
#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) |
---|
329 |
#endif |
---|
330 |
|
---|
331 |
#ifndef traceQUEUE_DELETE |
---|
332 |
#define traceQUEUE_DELETE( pxQueue ) |
---|
333 |
#endif |
---|
334 |
|
---|
335 |
#ifndef traceTASK_CREATE |
---|
336 |
#define traceTASK_CREATE( pxNewTCB ) |
---|
337 |
#endif |
---|
338 |
|
---|
339 |
#ifndef traceTASK_CREATE_FAILED |
---|
340 |
#define traceTASK_CREATE_FAILED( pxNewTCB ) |
---|
341 |
#endif |
---|
342 |
|
---|
343 |
#ifndef traceTASK_DELETE |
---|
344 |
#define traceTASK_DELETE( pxTaskToDelete ) |
---|
345 |
#endif |
---|
346 |
|
---|
347 |
#ifndef traceTASK_DELAY_UNTIL |
---|
348 |
#define traceTASK_DELAY_UNTIL() |
---|
349 |
#endif |
---|
350 |
|
---|
351 |
#ifndef traceTASK_DELAY |
---|
352 |
#define traceTASK_DELAY() |
---|
353 |
#endif |
---|
354 |
|
---|
355 |
#ifndef traceTASK_PRIORITY_SET |
---|
356 |
#define traceTASK_PRIORITY_SET( pxTask, uxNewPriority ) |
---|
357 |
#endif |
---|
358 |
|
---|
359 |
#ifndef traceTASK_SUSPEND |
---|
360 |
#define traceTASK_SUSPEND( pxTaskToSuspend ) |
---|
361 |
#endif |
---|
362 |
|
---|
363 |
#ifndef traceTASK_RESUME |
---|
364 |
#define traceTASK_RESUME( pxTaskToResume ) |
---|
365 |
#endif |
---|
366 |
|
---|
367 |
#ifndef traceTASK_RESUME_FROM_ISR |
---|
368 |
#define traceTASK_RESUME_FROM_ISR( pxTaskToResume ) |
---|
369 |
#endif |
---|
370 |
|
---|
371 |
#ifndef traceTASK_INCREMENT_TICK |
---|
372 |
#define traceTASK_INCREMENT_TICK( xTickCount ) |
---|
373 |
#endif |
---|
374 |
|
---|
375 |
#endif /* INC_FREERTOS_H */ |
---|
376 |
|
---|