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