4
4
* @author MCD Application Team
5
5
* @version V2.2.0
6
6
* @date 17-March-2017
7
- * @brief CMSIS STM32F2xx Device Peripheral Access Layer Header File.
7
+ * @brief CMSIS STM32F2xx Device Peripheral Access Layer Header File.
8
8
*
9
9
* The file is the unique include file that the application programmer
10
10
* is using in the C source code, usually in main.c. This file contains:
11
11
* - Configuration section that allows to select:
12
12
* - The STM32F2xx device used in the target application
13
- * - To use or not the peripheral’s drivers in application code(i.e.
14
- * code will be based on direct access to peripheral’s registers
15
- * rather than drivers API), this option is controlled by
13
+ * - To use or not the peripheral’s drivers in application code(i.e.
14
+ * code will be based on direct access to peripheral’s registers
15
+ * rather than drivers API), this option is controlled by
16
16
* "#define USE_HAL_DRIVER"
17
- *
17
+ *
18
18
******************************************************************************
19
19
* @attention
20
20
*
52
52
/** @addtogroup stm32f2xx
53
53
* @{
54
54
*/
55
-
55
+
56
56
#ifndef __STM32F2xx_H
57
57
#define __STM32F2xx_H
58
58
59
59
#ifdef __cplusplus
60
- extern "C" {
60
+ extern "C" {
61
61
#endif /* __cplusplus */
62
-
62
+
63
63
/** @addtogroup Library_configuration_section
64
64
* @{
65
65
*/
@@ -70,32 +70,32 @@ extern "C" {
70
70
#if !defined (STM32F2 )
71
71
#define STM32F2
72
72
#endif /* STM32F2 */
73
-
73
+
74
74
/* Uncomment the line below according to the target STM32 device used in your
75
- application
75
+ application
76
76
*/
77
77
#if !defined (STM32F205xx ) && !defined (STM32F215xx ) && !defined (STM32F207xx ) && !defined (STM32F217xx )
78
78
79
- /* #define STM32F205xx */ /*!< STM32F205RG, STM32F205VG, STM32F205ZG, STM32F205RF, STM32F205VF, STM32F205ZF,
80
- STM32F205RE, STM32F205VE, STM32F205ZE, STM32F205RC, STM32F205VC, STM32F205ZC,
81
- STM32F205RB and STM32F205VB Devices */
82
- /* #define STM32F215xx */ /*!< STM32F215RG, STM32F215VG, STM32F215ZG, STM32F215RE, STM32F215VE and STM32F215ZE Devices */
83
- #define STM32F207xx /*!< STM32F207VG, STM32F207ZG, STM32F207IG, STM32F207VF, STM32F207ZF, STM32F207IF,
79
+ /* #define STM32F205xx */ /*!< STM32F205RG, STM32F205VG, STM32F205ZG, STM32F205RF, STM32F205VF, STM32F205ZF,
80
+ STM32F205RE, STM32F205VE, STM32F205ZE, STM32F205RC, STM32F205VC, STM32F205ZC,
81
+ STM32F205RB and STM32F205VB Devices */
82
+ /* #define STM32F215xx */ /*!< STM32F215RG, STM32F215VG, STM32F215ZG, STM32F215RE, STM32F215VE and STM32F215ZE Devices */
83
+ /* #define STM32F207xx */ /*!< STM32F207VG, STM32F207ZG, STM32F207IG, STM32F207VF, STM32F207ZF, STM32F207IF,
84
84
STM32F207VE, STM32F207ZE, STM32F207IE, STM32F207VC, STM32F207ZC and STM32F207IC Devices */
85
- /* #define STM32F217xx */ /*!< STM32F217VG, STM32F217ZG, STM32F217IG, STM32F217VE, STM32F217ZE and STM32F217IE Devices */
86
-
85
+ /* #define STM32F217xx */ /*!< STM32F217VG, STM32F217ZG, STM32F217IG, STM32F217VE, STM32F217ZE and STM32F217IE Devices */
86
+
87
87
#endif
88
-
88
+
89
89
/* Tip: To avoid modifying this file each time you need to switch between these
90
90
devices, you can define the device in your toolchain compiler preprocessor.
91
91
*/
92
92
#if !defined (USE_HAL_DRIVER )
93
93
/**
94
94
* @brief Comment the line below if you will not use the peripherals drivers.
95
- In this case, these drivers will not be included and the application code will
96
- be based on direct access to peripherals registers
95
+ In this case, these drivers will not be included and the application code will
96
+ be based on direct access to peripherals registers
97
97
*/
98
- #define USE_HAL_DRIVER
98
+ /* #define USE_HAL_DRIVER */
99
99
#endif /* USE_HAL_DRIVER */
100
100
101
101
/**
@@ -119,15 +119,15 @@ extern "C" {
119
119
*/
120
120
121
121
#if defined(STM32F205xx )
122
- #include "stm32f205xx.h"
122
+ #include "stm32f205xx.h"
123
123
#elif defined(STM32F215xx )
124
- #include "stm32f215xx.h"
124
+ #include "stm32f215xx.h"
125
125
#elif defined(STM32F207xx )
126
- #include "stm32f207xx.h"
126
+ #include "stm32f207xx.h"
127
127
#elif defined(STM32F217xx )
128
- #include "stm32f217xx.h"
128
+ #include "stm32f217xx.h"
129
129
#else
130
- #error "Please select first the target STM32F2xx device used in your application (in stm32f2xx.h file)"
130
+ #error "Please select first the target STM32F2xx device used in your application (in stm32f2xx.h file)"
131
131
#endif
132
132
133
133
/**
@@ -136,21 +136,24 @@ extern "C" {
136
136
137
137
/** @addtogroup Exported_types
138
138
* @{
139
- */
140
- typedef enum {
141
- RESET = 0 ,
142
- SET = !RESET
139
+ */
140
+ typedef enum
141
+ {
142
+ RESET = 0 ,
143
+ SET = !RESET
143
144
} FlagStatus , ITStatus ;
144
145
145
- typedef enum {
146
- DISABLE = 0 ,
147
- ENABLE = !DISABLE
146
+ typedef enum
147
+ {
148
+ DISABLE = 0 ,
149
+ ENABLE = !DISABLE
148
150
} FunctionalState ;
149
151
#define IS_FUNCTIONAL_STATE (STATE ) (((STATE) == DISABLE) || ((STATE) == ENABLE))
150
152
151
- typedef enum {
152
- ERROR = 0 ,
153
- SUCCESS = !ERROR
153
+ typedef enum
154
+ {
155
+ ERROR = 0 ,
156
+ SUCCESS = !ERROR
154
157
} ErrorStatus ;
155
158
156
159
/**
@@ -175,15 +178,15 @@ typedef enum {
175
178
176
179
#define MODIFY_REG (REG , CLEARMASK , SETMASK ) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
177
180
178
- #define POSITION_VAL (VAL ) (__CLZ(__RBIT(VAL)))
181
+ #define POSITION_VAL (VAL ) (__CLZ(__RBIT(VAL)))
179
182
180
183
181
184
/**
182
185
* @}
183
186
*/
184
-
187
+
185
188
#if defined (USE_HAL_DRIVER )
186
- #include "stm32f2xx_hal.h"
189
+ #include "stm32f2xx_hal.h"
187
190
#endif /* USE_HAL_DRIVER */
188
191
189
192
#ifdef __cplusplus
@@ -199,7 +202,7 @@ typedef enum {
199
202
/**
200
203
* @}
201
204
*/
202
-
205
+
203
206
204
207
205
208
0 commit comments