chlib.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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 chlib.h
  17. * @brief ChibiOS/LIB main include file.
  18. * @details This header includes all the required library headers. This file
  19. * is meant do be included by @p ch.h not directly by user.
  20. *
  21. * @addtogroup oslib_info
  22. * @details OS Library related info.
  23. * @{
  24. */
  25. #ifndef CHLIB_H
  26. #define CHLIB_H
  27. /*===========================================================================*/
  28. /* Module constants. */
  29. /*===========================================================================*/
  30. /**
  31. * @brief ChibiOS/LIB identification macro.
  32. */
  33. #define _CHIBIOS_OSLIB_
  34. /**
  35. * @brief Stable release flag.
  36. */
  37. #define CH_OSLIB_STABLE 1
  38. /**
  39. * @name ChibiOS/LIB version identification
  40. * @{
  41. */
  42. /**
  43. * @brief OS Library version string.
  44. */
  45. #define CH_OSLIB_VERSION "1.1.0"
  46. /**
  47. * @brief OS Library version major number.
  48. */
  49. #define CH_OSLIB_MAJOR 1
  50. /**
  51. * @brief OS Library version minor number.
  52. */
  53. #define CH_OSLIB_MINOR 1
  54. /**
  55. * @brief OS Library version patch number.
  56. */
  57. #define CH_OSLIB_PATCH 0
  58. /** @} */
  59. /*===========================================================================*/
  60. /* Module pre-compile time settings. */
  61. /*===========================================================================*/
  62. /*===========================================================================*/
  63. /* Derived constants and error checks. */
  64. /*===========================================================================*/
  65. /* Host OS checks.*/
  66. #if !defined(_CHIBIOS_RT_) && !defined(_CHIBIOS_NIL_)
  67. #error "OS check failed, must be included after ch.h"
  68. #endif
  69. /* Configuration file checks.*/
  70. #if !defined(CH_CFG_USE_MAILBOXES)
  71. #error "CH_CFG_USE_MAILBOXES not defined in chconf.h"
  72. #endif
  73. #if !defined(CH_CFG_USE_MEMCORE)
  74. #error "CH_CFG_USE_MEMCORE not defined in chconf.h"
  75. #endif
  76. #if !defined(CH_CFG_USE_HEAP)
  77. #error "CH_CFG_USE_HEAP not defined in chconf.h"
  78. #endif
  79. #if !defined(CH_CFG_USE_MEMPOOLS)
  80. #error "CH_CFG_USE_MEMPOOLS not defined in chconf.h"
  81. #endif
  82. #if !defined(CH_CFG_USE_OBJ_FIFOS)
  83. #error "CH_CFG_USE_OBJ_FIFOS not defined in chconf.h"
  84. #endif
  85. #if !defined(CH_CFG_USE_PIPES)
  86. #error "CH_CFG_USE_PIPES not defined in chconf.h"
  87. #endif
  88. /* Objects factory options checks.*/
  89. #if !defined(CH_CFG_USE_FACTORY)
  90. #error "CH_CFG_USE_FACTORY not defined in chconf.h"
  91. #endif
  92. #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
  93. #error "CH_CFG_FACTORY_MAX_NAMES_LENGTH not defined in chconf.h"
  94. #endif
  95. #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
  96. #error "CH_CFG_FACTORY_OBJECTS_REGISTRY not defined in chconf.h"
  97. #endif
  98. #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
  99. #error "CH_CFG_FACTORY_GENERIC_BUFFERS not defined in chconf.h"
  100. #endif
  101. #if !defined(CH_CFG_FACTORY_SEMAPHORES)
  102. #error "CH_CFG_FACTORY_SEMAPHORES not defined in chconf.h"
  103. #endif
  104. #if !defined(CH_CFG_FACTORY_MAILBOXES)
  105. #error "CH_CFG_FACTORY_MAILBOXES not defined in chconf.h"
  106. #endif
  107. #if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
  108. #error "CH_CFG_FACTORY_OBJ_FIFOS not defined in chconf.h"
  109. #endif
  110. /* License checks.*/
  111. #if !defined(CH_CUSTOMER_LIC_OSLIB) || !defined(CH_LICENSE_FEATURES)
  112. #error "malformed chlicense.h"
  113. #endif
  114. #if CH_CUSTOMER_LIC_OSLIB== FALSE
  115. #error "ChibiOS/LIB not licensed"
  116. #endif
  117. #if (CH_LICENSE_FEATURES != CH_FEATURES_FULL) && \
  118. (CH_LICENSE_FEATURES != CH_FEATURES_INTERMEDIATE) && \
  119. (CH_LICENSE_FEATURES != CH_FEATURES_BASIC)
  120. #error "invalid CH_LICENSE_FEATURES setting"
  121. #endif
  122. /* Restrictions in basic and intermediate modes.*/
  123. #if (CH_CUSTOMER_LIC_OSLIB == FALSE) || \
  124. (CH_LICENSE_FEATURES == CH_FEATURES_INTERMEDIATE) || \
  125. (CH_LICENSE_FEATURES == CH_FEATURES_BASIC)
  126. /* Restricted subsystems.*/
  127. #undef CH_CFG_USE_FACTORY
  128. #define CH_CFG_USE_FACTORY FALSE
  129. #endif /* (CH_CUSTOMER_LIC_OSLIB == FALSE) ||
  130. (CH_LICENSE_FEATURES == CH_FEATURES_INTERMEDIATE) ||
  131. (CH_LICENSE_FEATURES == CH_FEATURES_BASIC) */
  132. /* Restrictions in basic mode.*/
  133. #if (CH_CUSTOMER_LIC_OSLIB == FALSE) || \
  134. (CH_LICENSE_FEATURES == CH_FEATURES_BASIC)
  135. /* Restricted subsystems.*/
  136. #undef CH_CFG_USE_MEMCORE
  137. #undef CH_CFG_USE_HEAP
  138. #undef CH_CFG_USE_MEMPOOLS
  139. #undef CH_CFG_USE_OBJ_FIFOS
  140. #undef CH_CFG_USE_PIPES
  141. #define CH_CFG_USE_MEMCORE FALSE
  142. #define CH_CFG_USE_HEAP FALSE
  143. #define CH_CFG_USE_MEMPOOLS FALSE
  144. #define CH_CFG_USE_OBJ_FIFOS FALSE
  145. #define CH_CFG_USE_PIPES FALSE
  146. #endif /* (CH_CUSTOMER_LIC_OSLIB == FALSE) ||
  147. (CH_LICENSE_FEATURES == CH_FEATURES_BASIC) */
  148. /*===========================================================================*/
  149. /* Module data structures and types. */
  150. /*===========================================================================*/
  151. /*===========================================================================*/
  152. /* Module macros. */
  153. /*===========================================================================*/
  154. /*===========================================================================*/
  155. /* External declarations. */
  156. /*===========================================================================*/
  157. /*===========================================================================*/
  158. /* Late inclusions. */
  159. /*===========================================================================*/
  160. /* OS Library headers.*/
  161. #include "chbsem.h"
  162. #include "chmboxes.h"
  163. #include "chmemcore.h"
  164. #include "chmemheaps.h"
  165. #include "chmempools.h"
  166. #include "chobjfifos.h"
  167. #include "chpipes.h"
  168. #include "chfactory.h"
  169. #endif /* CHLIB_H */
  170. /** @} */