ch.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
  3. This file is part of ChibiOS.
  4. ChibiOS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. ChibiOS is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. /**
  16. * @file rt/include/ch.h
  17. * @brief ChibiOS/RT main include file.
  18. *
  19. * @addtogroup kernel_info
  20. * @details This header includes all the required kernel headers so it is the
  21. * only kernel header you usually want to include in your application.
  22. * @details Kernel related info.
  23. * @{
  24. */
  25. #ifndef CH_H
  26. #define CH_H
  27. /**
  28. * @brief ChibiOS/RT identification macro.
  29. */
  30. #define _CHIBIOS_RT_
  31. /**
  32. * @brief Stable release flag.
  33. */
  34. #define CH_KERNEL_STABLE 1
  35. /**
  36. * @name ChibiOS/RT version identification
  37. * @{
  38. */
  39. /**
  40. * @brief Kernel version string.
  41. */
  42. #define CH_KERNEL_VERSION "6.0.0"
  43. /**
  44. * @brief Kernel version major number.
  45. */
  46. #define CH_KERNEL_MAJOR 6
  47. /**
  48. * @brief Kernel version minor number.
  49. */
  50. #define CH_KERNEL_MINOR 0
  51. /**
  52. * @brief Kernel version patch number.
  53. */
  54. #define CH_KERNEL_PATCH 0
  55. /** @} */
  56. /**
  57. * @name Constants for configuration options
  58. */
  59. /**
  60. * @brief Generic 'false' preprocessor boolean constant.
  61. * @note It is meant to be used in configuration files as switch.
  62. */
  63. #if !defined(FALSE) || defined(__DOXYGEN__)
  64. #define FALSE 0
  65. #endif
  66. /**
  67. * @brief Generic 'true' preprocessor boolean constant.
  68. * @note It is meant to be used in configuration files as switch.
  69. */
  70. #if !defined(TRUE) || defined(__DOXYGEN__)
  71. #define TRUE 1
  72. #endif
  73. /** @} */
  74. /* Configuration headers, checks and licensing restrictions.*/
  75. #include "chconf.h"
  76. #include "chchecks.h"
  77. #include "chlicense.h"
  78. #include "chrestrictions.h"
  79. /* Early function prototype required by the following headers.*/
  80. #ifdef __cplusplus
  81. extern "C" {
  82. #endif
  83. void chSysHalt(const char *reason);
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. /* Base kernel headers.*/
  88. #include "chtypes.h" /* TODO: Rename and rework.*/
  89. #include "chsystypes.h"
  90. #include "chdebug.h"
  91. #include "chtime.h"
  92. #include "chalign.h"
  93. #include "chcore.h"
  94. #include "chtrace.h"
  95. #include "chtm.h"
  96. #include "chstats.h"
  97. #include "chschd.h"
  98. #include "chsys.h"
  99. #include "chvt.h"
  100. #include "chthreads.h"
  101. /* Optional subsystems headers.*/
  102. #include "chregistry.h"
  103. #include "chsem.h"
  104. #include "chmtx.h"
  105. #include "chcond.h"
  106. #include "chevents.h"
  107. #include "chmsg.h"
  108. /* OSLIB.*/
  109. #include "chlib.h"
  110. /* Headers dependent on the OSLIB.*/
  111. #include "chdynamic.h"
  112. #endif /* CH_H */
  113. /** @} */