2 FreeRTOS.org V5.0.0 - 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
27 ***************************************************************************
\r
29 * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
\r
30 * and even write all or part of your application on your behalf. *
\r
31 * See http://www.OpenRTOS.com for details of the services we provide to *
\r
32 * expedite your project. *
\r
34 ***************************************************************************
\r
35 ***************************************************************************
\r
37 Please ensure to read the configuration and relevant port sections of the
\r
38 online documentation.
\r
40 http://www.FreeRTOS.org - Documentation, latest information, license and
\r
43 http://www.SafeRTOS.com - A version that is certified for use in safety
\r
46 http://www.OpenRTOS.com - Commercial support, development, porting,
\r
47 licensing and training services.
\r
50 #ifndef INC_FREERTOS_H
\r
51 #define INC_FREERTOS_H
\r
55 * Include the generic headers required for the FreeRTOS port being used.
\r
59 /* Basic FreeRTOS definitions. */
\r
60 #include "projdefs.h"
\r
62 /* Application specific configuration options. */
\r
63 #include "FreeRTOSConfig.h"
\r
65 /* Definitions specific to the port being used. */
\r
66 #include "portable.h"
\r
69 /* Defines the prototype to which the application task hook function must
\r
71 typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
\r
78 * Check all the required application specific macros have been defined.
\r
79 * These macros are application specific and (as downloaded) are defined
\r
80 * within FreeRTOSConfig.h.
\r
83 #ifndef configUSE_PREEMPTION
\r
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.
\r
87 #ifndef configUSE_IDLE_HOOK
\r
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.
\r
91 #ifndef configUSE_TICK_HOOK
\r
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.
\r
95 #ifndef configUSE_CO_ROUTINES
\r
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.
\r
99 #ifndef INCLUDE_vTaskPrioritySet
\r
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.
\r
103 #ifndef INCLUDE_uxTaskPriorityGet
\r
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.
\r
107 #ifndef INCLUDE_vTaskDelete
\r
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.
\r
111 #ifndef INCLUDE_vTaskCleanUpResources
\r
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.
\r
115 #ifndef INCLUDE_vTaskSuspend
\r
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.
\r
119 #ifndef INCLUDE_vTaskDelayUntil
\r
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.
\r
123 #ifndef INCLUDE_vTaskDelay
\r
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.
\r
127 #ifndef configUSE_16_BIT_TICKS
\r
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.
\r
131 #ifndef configUSE_APPLICATION_TASK_TAG
\r
132 #define configUSE_APPLICATION_TASK_TAG 0
\r
135 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
\r
136 #define INCLUDE_uxTaskGetStackHighWaterMark 0
\r
139 #ifndef configUSE_RECURSIVE_MUTEXES
\r
140 #define configUSE_RECURSIVE_MUTEXES 0
\r
143 #ifndef configUSE_MUTEXES
\r
144 #define configUSE_MUTEXES 0
\r
147 #ifndef configUSE_COUNTING_SEMAPHORES
\r
148 #define configUSE_COUNTING_SEMAPHORES 0
\r
151 #ifndef configUSE_ALTERNATIVE_API
\r
152 #define configUSE_ALTERNATIVE_API 0
\r
155 #ifndef portCRITICAL_NESTING_IN_TCB
\r
156 #define portCRITICAL_NESTING_IN_TCB 0
\r
159 #ifndef configMAX_TASK_NAME_LEN
\r
160 #define configMAX_TASK_NAME_LEN 16
\r
163 #ifndef configIDLE_SHOULD_YIELD
\r
164 #define configIDLE_SHOULD_YIELD 1
\r
167 #if configMAX_TASK_NAME_LEN < 1
\r
168 #undef configMAX_TASK_NAME_LEN
\r
169 #define configMAX_TASK_NAME_LEN 1
\r
172 #ifndef INCLUDE_xTaskResumeFromISR
\r
173 #define INCLUDE_xTaskResumeFromISR 1
\r
176 #ifndef INCLUDE_xTaskGetSchedulerState
\r
177 #define INCLUDE_xTaskGetSchedulerState 0
\r
180 #if ( configUSE_MUTEXES == 1 )
\r
181 /* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism
\r
182 within the mutex implementation so must be available if mutexes are used. */
\r
183 #undef INCLUDE_xTaskGetCurrentTaskHandle
\r
184 #define INCLUDE_xTaskGetCurrentTaskHandle 1
\r
186 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
\r
187 #define INCLUDE_xTaskGetCurrentTaskHandle 0
\r
192 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
\r
193 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
\r
196 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
\r
197 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
\r
201 /* Remove any unused trace macros. */
\r
203 /* Used to perform any necessary initialisation - for example, open a file
\r
204 into which trace is to be written. */
\r
205 #define traceSTART()
\r
209 /* Use to close a trace, for example close a file into which trace has been
\r
214 #ifndef traceTASK_SWITCHED_IN
\r
215 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
\r
216 to the task control block of the selected task. */
\r
217 #define traceTASK_SWITCHED_IN()
\r
220 #ifndef traceTASK_SWITCHED_OUT
\r
221 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
\r
222 to the task control block of the task being switched out. */
\r
223 #define traceTASK_SWITCHED_OUT()
\r
226 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
\r
227 /* Task is about to block because it cannot read from a
\r
228 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
229 upon which the read was attempted. pxCurrentTCB points to the TCB of the
\r
230 task that attempted the read. */
\r
231 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
\r
234 #ifndef traceBLOCKING_ON_QUEUE_SEND
\r
235 /* Task is about to block because it cannot write to a
\r
236 queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
237 upon which the write was attempted. pxCurrentTCB points to the TCB of the
\r
238 task that attempted the write. */
\r
239 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
\r
242 #ifndef configCHECK_FOR_STACK_OVERFLOW
\r
243 #define configCHECK_FOR_STACK_OVERFLOW 0
\r
246 /* The following event macros are embedded in the kernel API calls. */
\r
248 #ifndef traceQUEUE_CREATE
\r
249 #define traceQUEUE_CREATE( pxNewQueue )
\r
252 #ifndef traceQUEUE_CREATE_FAILED
\r
253 #define traceQUEUE_CREATE_FAILED()
\r
256 #ifndef traceCREATE_MUTEX
\r
257 #define traceCREATE_MUTEX( pxNewQueue )
\r
260 #ifndef traceCREATE_MUTEX_FAILED
\r
261 #define traceCREATE_MUTEX_FAILED()
\r
264 #ifndef traceGIVE_MUTEX_RECURSIVE
\r
265 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
\r
268 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
\r
269 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
\r
272 #ifndef traceTAKE_MUTEX_RECURSIVE
\r
273 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
\r
276 #ifndef traceCREATE_COUNTING_SEMAPHORE
\r
277 #define traceCREATE_COUNTING_SEMAPHORE()
\r
280 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
\r
281 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
\r
284 #ifndef traceQUEUE_SEND
\r
285 #define traceQUEUE_SEND( pxQueue )
\r
288 #ifndef traceQUEUE_SEND_FAILED
\r
289 #define traceQUEUE_SEND_FAILED( pxQueue )
\r
292 #ifndef traceQUEUE_RECEIVE
\r
293 #define traceQUEUE_RECEIVE( pxQueue )
\r
296 #ifndef traceQUEUE_PEEK
\r
297 #define traceQUEUE_PEEK( pxQueue )
\r
300 #ifndef traceQUEUE_RECEIVE_FAILED
\r
301 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
\r
304 #ifndef traceQUEUE_SEND_FROM_ISR
\r
305 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
\r
308 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
\r
309 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
\r
312 #ifndef traceQUEUE_RECEIVE_FROM_ISR
\r
313 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
\r
316 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
\r
317 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
\r
320 #ifndef traceQUEUE_DELETE
\r
321 #define traceQUEUE_DELETE( pxQueue )
\r
324 #ifndef traceTASK_CREATE
\r
325 #define traceTASK_CREATE( pxNewTCB )
\r
328 #ifndef traceTASK_CREATE_FAILED
\r
329 #define traceTASK_CREATE_FAILED( pxNewTCB )
\r
332 #ifndef traceTASK_DELETE
\r
333 #define traceTASK_DELETE( pxTaskToDelete )
\r
336 #ifndef traceTASK_DELAY_UNTIL
\r
337 #define traceTASK_DELAY_UNTIL()
\r
340 #ifndef traceTASK_DELAY
\r
341 #define traceTASK_DELAY()
\r
344 #ifndef traceTASK_PRIORITY_SET
\r
345 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
\r
348 #ifndef traceTASK_SUSPEND
\r
349 #define traceTASK_SUSPEND( pxTaskToSuspend )
\r
352 #ifndef traceTASK_RESUME
\r
353 #define traceTASK_RESUME( pxTaskToResume )
\r
356 #ifndef traceTASK_RESUME_FROM_ISR
\r
357 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
\r
360 #ifndef traceTASK_INCREMENT_TICK
\r
361 #define traceTASK_INCREMENT_TICK( xTickCount )
\r
364 #endif /* INC_FREERTOS_H */
\r