]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Core/src/Ref_VersionControl.txt
corrected CMSIS versions
[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  - 35 for a Cortex-M35P
49  
50 This define is only available for Cortex-M class controllers.
51 <b>Code Example:</b>
52 \code
53 #if defined(__CORTEX_M) && (__CORTEX_M == 4)
54 #error Yes, we have an Cortex-M4 controller.
55 #else
56 #error We need a Cortex-M4 controller!
57 #endif
58 \endcode
59 */
60 #define __CORTEX_M
61
62 /**
63 \brief Contains the core version for a Cortex Secure Core controller.
64 \details This define can be used to differentiate between the various available Cortex Secure Core controllers.
65 Possible values are:
66  - 000 for a Cortex-SC000
67  - 300 for a Cortex-SC300
68  
69 This define is only available for Cortex Secure Core controllers.
70 <b>Code Example:</b>
71 \code
72 #if defined(__CORTEX_SC) && (__CORTEX_SC == 300U)
73 #error Yes, we have an Cortex SC300 controller.
74 #else
75 #error We need a Cortex SC300 controller!
76 #endif
77 \endcode
78 */
79 #define __CORTEX_SC
80
81 /**
82 \defgroup   version_control_depricated_gr    Version Control per Core (Depricated)
83 \brief      Version \#define symbols for CMSIS release specific C/C++ source code
84 \details
85 Prior CMSIS release 5.1.0 the version information was core specific.
86
87 <b>Code Example:</b>
88 \code
89 #if !defined(__CM_CMSIS_VERSION) && defined(__CORTEX_M)
90 #if ((__CORTEX_M == 0) && (__CM0_CMSIS_VERSION >= 0x00050000)) || \
91     ((__CORTEX_M == 3) && (__CM3_CMSIS_VERSION >= 0x00050000)) || \
92     ((__CORTEX_M == 4) && (__CM4_CMSIS_VERSION >= 0x00050000)) || \
93     ((__CORTEX_M == 7) && (__CM7_CMSIS_VERSION >= 0x00050000))
94 #error Yes, we have CMSIS 5!
95 #else
96 #error We need CMSIS 5!
97 #endif
98 #else
99 #error We need a Cortex-M controller!
100 #endif
101 \endcode
102 @{
103 */
104
105 /**
106 \brief Contains the CMSIS major version for core of type XXX, i.e. CM0 or SC300.
107 \details The CMSIS major version can be used to differentiate between CMSIS major releases.
108 \deprecated Only rely on this define for CMSIS 5.0 and before.
109 */
110 #define __XXX_CMSIS_VERSION_MAIN
111
112 /**
113 \brief Contains the CMSIS minor version for core of type XXX, i.e. CM0 or SC300.
114 \details The CMSIS minor version can be used to query a CMSIS release update level.
115 \deprecated Only rely on this define for CMSIS 5.0 and before.
116 */
117 #define __XXX_CMSIS_VERSION_SUB
118
119 /**
120 \brief Contains the CMSIS version for core of type XXX, i.e. CM0 or SC300.
121 \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).
122 \deprecated Only rely on this define for CMSIS 5.0 and before.
123 */
124 #define __XXX_CMSIS_VERSION
125
126 /**
127 @}
128 */
129
130 /**
131 @}
132 */