ChibiOS/RT
2.6.0
ch.h
Go to the documentation of this file.
00001 /*
00002     ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
00003                  2011,2012,2013 Giovanni Di Sirio.
00004 
00005     This file is part of ChibiOS/RT.
00006 
00007     ChibiOS/RT is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     ChibiOS/RT is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 
00020                                       ---
00021 
00022     A special exception to the GPL can be applied should you wish to distribute
00023     a combined work that includes ChibiOS/RT, without being obliged to provide
00024     the source code for any proprietary components. See the file exception.txt
00025     for full details of how and when the exception can be applied.
00026 */
00027 
00028 /**
00029  * @file    ch.h
00030  * @brief   ChibiOS/RT main include file.
00031  * @details This header includes all the required kernel headers so it is the
00032  *          only kernel header you usually want to include in your application.
00033  *
00034  * @addtogroup kernel_info
00035  * @details Kernel related info.
00036  * @{
00037  */
00038 
00039 #ifndef _CH_H_
00040 #define _CH_H_
00041 
00042 /**
00043  * @brief   ChibiOS/RT identification macro.
00044  */
00045 #define _CHIBIOS_RT_
00046 
00047 /**
00048  * @brief   Kernel version string.
00049  */
00050 #define CH_KERNEL_VERSION       "2.6.0"
00051 
00052 /**
00053  * @name    Kernel version
00054  * @{
00055  */
00056 /**
00057  * @brief   Kernel version major number.
00058  */
00059 #define CH_KERNEL_MAJOR         2
00060 
00061 /**
00062  * @brief   Kernel version minor number.
00063  */
00064 #define CH_KERNEL_MINOR         6
00065 
00066 /**
00067  * @brief   Kernel version patch number.
00068  */
00069 #define CH_KERNEL_PATCH         0
00070 /** @} */
00071 
00072 /**
00073  * @name    Common constants
00074  */
00075 /**
00076  * @brief   Generic 'false' boolean constant.
00077  */
00078 #if !defined(FALSE) || defined(__DOXYGEN__)
00079 #define FALSE                   0
00080 #endif
00081 
00082 /**
00083  * @brief   Generic 'true' boolean constant.
00084  */
00085 #if !defined(TRUE) || defined(__DOXYGEN__)
00086 #define TRUE                    (!FALSE)
00087 #endif
00088 
00089 /**
00090  * @brief   Generic success constant.
00091  * @details This constant is functionally equivalent to @p FALSE but more
00092  *          readable, it can be used as return value of all those functions
00093  *          returning a @p bool_t as a status indicator.
00094  */
00095 #if !defined(CH_SUCCESS) || defined(__DOXYGEN__)
00096 #define CH_SUCCESS              FALSE
00097 #endif
00098 
00099 /**
00100  * @brief   Generic failure constant.
00101  * @details This constant is functionally equivalent to @p TRUE but more
00102  *          readable, it can be used as return value of all those functions
00103  *          returning a @p bool_t as a status indicator.
00104  */
00105 #if !defined(CH_FAILED) || defined(__DOXYGEN__)
00106 #define CH_FAILED               TRUE
00107 #endif
00108 /** @} */
00109 
00110 #include "chconf.h"
00111 #include "chtypes.h"
00112 #include "chlists.h"
00113 #include "chcore.h"
00114 #include "chsys.h"
00115 #include "chvt.h"
00116 #include "chschd.h"
00117 #include "chsem.h"
00118 #include "chbsem.h"
00119 #include "chmtx.h"
00120 #include "chcond.h"
00121 #include "chevents.h"
00122 #include "chmsg.h"
00123 #include "chmboxes.h"
00124 #include "chmemcore.h"
00125 #include "chheap.h"
00126 #include "chmempools.h"
00127 #include "chthreads.h"
00128 #include "chdynamic.h"
00129 #include "chregistry.h"
00130 #include "chinline.h"
00131 #include "chqueues.h"
00132 #include "chstreams.h"
00133 #include "chfiles.h"
00134 #include "chdebug.h"
00135 
00136 #if !defined(__DOXYGEN__)
00137 extern WORKING_AREA(_idle_thread_wa, PORT_IDLE_THREAD_STACK_SIZE);
00138 #endif
00139 
00140 #ifdef __cplusplus
00141 extern "C" {
00142 #endif
00143   void _idle_thread(void *p);
00144 #ifdef __cplusplus
00145 }
00146 #endif
00147 
00148 #endif /* _CH_H_ */
00149 
00150 /** @} */