Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
chconf.h
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
28 #ifndef _CHCONF_H_
29 #define _CHCONF_H_
30 
31 /*===========================================================================*/
36 /*===========================================================================*/
37 
42 #define CH_CFG_ST_RESOLUTION 32
43 
49 #define CH_CFG_ST_FREQUENCY 10000
50 
59 #define CH_CFG_ST_TIMEDELTA 0
60 
63 /*===========================================================================*/
68 /*===========================================================================*/
69 
82 #define CH_CFG_TIME_QUANTUM 10
83 
95 #define CH_CFG_MEMCORE_SIZE 0
96 
104 #define CH_CFG_NO_IDLE_THREAD FALSE
105 
108 /*===========================================================================*/
113 /*===========================================================================*/
114 
123 #define CH_CFG_OPTIMIZE_SPEED TRUE
124 
127 /*===========================================================================*/
132 /*===========================================================================*/
133 
141 #define CH_CFG_USE_TM TRUE
142 
149 #define CH_CFG_USE_REGISTRY TRUE
150 
158 #define CH_CFG_USE_WAITEXIT TRUE
159 
166 #define CH_CFG_USE_SEMAPHORES TRUE
167 
177 #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
178 
185 #define CH_CFG_USE_MUTEXES TRUE
186 
195 #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
196 
205 #define CH_CFG_USE_CONDVARS TRUE
206 
215 #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
216 
223 #define CH_CFG_USE_EVENTS TRUE
224 
233 #define CH_CFG_USE_EVENTS_TIMEOUT TRUE
234 
242 #define CH_CFG_USE_MESSAGES TRUE
243 
253 #define CH_CFG_USE_MESSAGES_PRIORITY FALSE
254 
263 #define CH_CFG_USE_MAILBOXES TRUE
264 
271 #define CH_CFG_USE_QUEUES TRUE
272 
280 #define CH_CFG_USE_MEMCORE TRUE
281 
292 #define CH_CFG_USE_HEAP TRUE
293 
301 #define CH_CFG_USE_MEMPOOLS TRUE
302 
312 #define CH_CFG_USE_DYNAMIC TRUE
313 
316 /*===========================================================================*/
321 /*===========================================================================*/
322 
328 #if !defined(CH_DBG_STATISTICS)
329 #define CH_DBG_STATISTICS FALSE
330 #endif
331 
339 #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
340 #define CH_DBG_SYSTEM_STATE_CHECK FALSE
341 #endif
342 
350 #if !defined(CH_DBG_ENABLE_CHECKS)
351 #define CH_DBG_ENABLE_CHECKS FALSE
352 #endif
353 
362 #if !defined(CH_DBG_ENABLE_ASSERTS)
363 #define CH_DBG_ENABLE_ASSERTS FALSE
364 #endif
365 
373 #if !defined(CH_DBG_ENABLE_TRACE)
374 #define CH_DBG_ENABLE_TRACE FALSE
375 #endif
376 
387 #if !defined(CH_DBG_ENABLE_STACK_CHECK)
388 #define CH_DBG_ENABLE_STACK_CHECK FALSE
389 #endif
390 
399 #if !defined(CH_DBG_FILL_THREADS)
400 #define CH_DBG_FILL_THREADS FALSE
401 #endif
402 
412 #if !defined(CH_DBG_THREADS_PROFILING)
413 #define CH_DBG_THREADS_PROFILING FALSE
414 #endif
415 
418 /*===========================================================================*/
423 /*===========================================================================*/
424 
429 #define CH_CFG_THREAD_EXTRA_FIELDS \
430  /* Add threads custom fields here.*/
431 
439 #define CH_CFG_THREAD_INIT_HOOK(tp) { \
440  /* Add threads initialization code here.*/ \
441 }
442 
451 #define CH_CFG_THREAD_EXIT_HOOK(tp) { \
452  /* Add threads finalization code here.*/ \
453 }
454 
459 #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
460  /* Context switch code here.*/ \
461 }
462 
469 #define CH_CFG_IDLE_ENTER_HOOK() { \
470 }
471 
478 #define CH_CFG_IDLE_LEAVE_HOOK() { \
479 }
480 
485 #define CH_CFG_IDLE_LOOP_HOOK() { \
486  /* Idle loop code here.*/ \
487 }
488 
494 #define CH_CFG_SYSTEM_TICK_HOOK() { \
495  /* System tick event code here.*/ \
496 }
497 
503 #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
504  /* System halt code here.*/ \
505 }
506 
509 /*===========================================================================*/
510 /* Port-specific settings (override port settings defaulted in chcore.h). */
511 /*===========================================================================*/
512 
513 #endif /* _CHCONF_H_ */
514