Ref_VersionControl.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /**************************************************************************************************/
  2. /**
  3. \defgroup version_control_gr Version Control
  4. \brief Version \#define symbols for CMSIS release specific C/C++ source code
  5. \details
  6. The header file <b>cmsis_version.h</b> is included by each core header so that these definitions are available.
  7. <b>Code Example:</b>
  8. \code
  9. #if defined(__CM_CMSIS_VERSION) && \
  10. (__CM_CMSIS_VERSION >= 0x00050001)
  11. #error Yes, we have CMSIS 5.1 or later
  12. #else
  13. #error We need CMSIS 5.1 or later!
  14. #endif
  15. \endcode
  16. @{
  17. */
  18. /**
  19. \brief Contains the CMSIS major version
  20. \details The CMSIS major version can be used to differentiate between CMSIS major releases.
  21. */
  22. #define __CM_CMSIS_VERSION_MAIN
  23. /**
  24. \brief Contains the CMSIS minor version
  25. \details The CMSIS minor version can be used to query a CMSIS release update level.
  26. */
  27. #define __CM_CMSIS_VERSION_SUB
  28. /**
  29. \brief Contains the CMSIS version
  30. \details The CMSIS version is a combination of the \ref __CM_CMSIS_VERSION_MAIN (bits 31..15) and \ref __CM_CMSIS_VERSION_SUB (bits 14..0).
  31. */
  32. #define __CM_CMSIS_VERSION
  33. /**
  34. \brief Contains the core version for a Cortex-M class controller.
  35. \details This define can be used to differentiate between the various available Cortex-M controllers.
  36. Possible values are:
  37. - 0 for a Cortex-M0 or Cortex-M0+
  38. - 3 for a Cortex-M3
  39. - 4 for a Cortex-M4
  40. - 7 for a Cortex-M7
  41. - 23 for a Cortex-M23
  42. - 33 for a Cortex-M33
  43. This define is only available for Cortex-M class controllers.
  44. <b>Code Example:</b>
  45. \code
  46. #if defined(__CORTEX_M) && (__CORTEX_M == 4)
  47. #error Yes, we have an Cortex-M4 controller.
  48. #else
  49. #error We need a Cortex-M4 controller!
  50. #endif
  51. \endcode
  52. */
  53. #define __CORTEX_M
  54. /**
  55. \brief Contains the core version for a Cortex Secure Core controller.
  56. \details This define can be used to differentiate between the various available Cortex Secure Core controllers.
  57. Possible values are:
  58. - 000 for a Cortex-SC000
  59. - 300 for a Cortex-SC300
  60. This define is only available for Cortex Secure Core controllers.
  61. <b>Code Example:</b>
  62. \code
  63. #if defined(__CORTEX_SC) && (__CORTEX_SC == 300U)
  64. #error Yes, we have an Cortex SC300 controller.
  65. #else
  66. #error We need a Cortex SC300 controller!
  67. #endif
  68. \endcode
  69. */
  70. #define __CORTEX_SC
  71. /**
  72. \defgroup version_control_depricated_gr Version Control per Core (Depricated)
  73. \brief Version \#define symbols for CMSIS release specific C/C++ source code
  74. \details
  75. Prior CMSIS release 5.1.0 the version information was core specific.
  76. <b>Code Example:</b>
  77. \code
  78. #if !defined(__CM_CMSIS_VERSION) && defined(__CORTEX_M)
  79. #if ((__CORTEX_M == 0) && (__CM0_CMSIS_VERSION >= 0x00050000)) || \
  80. ((__CORTEX_M == 3) && (__CM3_CMSIS_VERSION >= 0x00050000)) || \
  81. ((__CORTEX_M == 4) && (__CM4_CMSIS_VERSION >= 0x00050000)) || \
  82. ((__CORTEX_M == 7) && (__CM7_CMSIS_VERSION >= 0x00050000))
  83. #error Yes, we have CMSIS 5!
  84. #else
  85. #error We need CMSIS 5!
  86. #endif
  87. #else
  88. #error We need a Cortex-M controller!
  89. #endif
  90. \endcode
  91. @{
  92. */
  93. /**
  94. \brief Contains the CMSIS major version for core of type XXX, i.e. CM0 or SC300.
  95. \details The CMSIS major version can be used to differentiate between CMSIS major releases.
  96. \deprecated Only rely on this define for CMSIS 5.0 and before.
  97. */
  98. #define __XXX_CMSIS_VERSION_MAIN
  99. /**
  100. \brief Contains the CMSIS minor version for core of type XXX, i.e. CM0 or SC300.
  101. \details The CMSIS minor version can be used to query a CMSIS release update level.
  102. \deprecated Only rely on this define for CMSIS 5.0 and before.
  103. */
  104. #define __XXX_CMSIS_VERSION_SUB
  105. /**
  106. \brief Contains the CMSIS version for core of type XXX, i.e. CM0 or SC300.
  107. \details The CMSIS version is a combination of the \ref __CM_CMSIS_VERSION_MAIN (bits 31..15) and \ref __CM_CMSIS_VERSION_SUB (bits 14..0).
  108. \deprecated Only rely on this define for CMSIS 5.0 and before.
  109. */
  110. #define __XXX_CMSIS_VERSION
  111. /**
  112. @}
  113. */
  114. /**
  115. @}
  116. */