Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 9 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /** |
1 | /** |
2 | ****************************************************************************** |
2 | ****************************************************************************** |
3 | * @file stm32f1xx.h |
3 | * @file stm32f1xx.h |
4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
5 | * @version V4.2.0 |
- | |
6 | * @date 31-March-2017 |
- | |
7 | * @brief CMSIS STM32F1xx Device Peripheral Access Layer Header File. |
5 | * @brief CMSIS STM32F1xx Device Peripheral Access Layer Header File. |
8 | * |
6 | * |
9 | * The file is the unique include file that the application programmer |
7 | * The file is the unique include file that the application programmer |
10 | * is using in the C source code, usually in main.c. This file contains: |
8 | * is using in the C source code, usually in main.c. This file contains: |
11 | * - Configuration section that allows to select: |
9 | * - Configuration section that allows to select: |
Line 16... | Line 14... | ||
16 | * "#define USE_HAL_DRIVER" |
14 | * "#define USE_HAL_DRIVER" |
17 | * |
15 | * |
18 | ****************************************************************************** |
16 | ****************************************************************************** |
19 | * @attention |
17 | * @attention |
20 | * |
18 | * |
21 | * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
19 | * <h2><center>© Copyright (c) 2017 STMicroelectronics. |
- | 20 | * All rights reserved.</center></h2> |
|
22 | * |
21 | * |
23 | * Redistribution and use in source and binary forms, with or without modification, |
22 | * This software component is licensed by ST under BSD 3-Clause license, |
24 | * are permitted provided that the following conditions are met: |
23 | * the "License"; You may not use this file except in compliance with the |
25 | * 1. Redistributions of source code must retain the above copyright notice, |
- | |
26 | * this list of conditions and the following disclaimer. |
- | |
27 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
- | |
28 | * this list of conditions and the following disclaimer in the documentation |
- | |
29 | * and/or other materials provided with the distribution. |
24 | * License. You may obtain a copy of the License at: |
30 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
- | |
31 | * may be used to endorse or promote products derived from this software |
25 | * opensource.org/licenses/BSD-3-Clause |
32 | * without specific prior written permission. |
- | |
33 | * |
- | |
34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
- | |
35 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
- | |
36 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
- | |
37 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
- | |
38 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
- | |
39 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
- | |
40 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
- | |
41 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
- | |
42 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
- | |
43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
- | |
44 | * |
26 | * |
45 | ****************************************************************************** |
27 | ****************************************************************************** |
46 | */ |
28 | */ |
47 | 29 | ||
48 | /** @addtogroup CMSIS |
30 | /** @addtogroup CMSIS |
Line 106... | Line 88... | ||
106 | */ |
88 | */ |
107 | /*#define USE_HAL_DRIVER */ |
89 | /*#define USE_HAL_DRIVER */ |
108 | #endif /* USE_HAL_DRIVER */ |
90 | #endif /* USE_HAL_DRIVER */ |
109 | 91 | ||
110 | /** |
92 | /** |
111 | * @brief CMSIS Device version number V4.2.0 |
93 | * @brief CMSIS Device version number V4.3.2 |
112 | */ |
94 | */ |
113 | #define __STM32F1_CMSIS_VERSION_MAIN (0x04) /*!< [31:24] main version */ |
95 | #define __STM32F1_CMSIS_VERSION_MAIN (0x04) /*!< [31:24] main version */ |
114 | #define __STM32F1_CMSIS_VERSION_SUB1 (0x02) /*!< [23:16] sub1 version */ |
96 | #define __STM32F1_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */ |
115 | #define __STM32F1_CMSIS_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */ |
97 | #define __STM32F1_CMSIS_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */ |
116 | #define __STM32F1_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */ |
98 | #define __STM32F1_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */ |
117 | #define __STM32F1_CMSIS_VERSION ((__STM32F1_CMSIS_VERSION_MAIN << 24)\ |
99 | #define __STM32F1_CMSIS_VERSION ((__STM32F1_CMSIS_VERSION_MAIN << 24)\ |
118 | |(__STM32F1_CMSIS_VERSION_SUB1 << 16)\ |
100 | |(__STM32F1_CMSIS_VERSION_SUB1 << 16)\ |
119 | |(__STM32F1_CMSIS_VERSION_SUB2 << 8 )\ |
101 | |(__STM32F1_CMSIS_VERSION_SUB2 << 8 )\ |
120 | |(__STM32F1_CMSIS_VERSION_RC)) |
102 | |(__STM32F1_CMSIS_VERSION_RC)) |
Line 177... | Line 159... | ||
177 | DISABLE = 0, |
159 | DISABLE = 0, |
178 | ENABLE = !DISABLE |
160 | ENABLE = !DISABLE |
179 | } FunctionalState; |
161 | } FunctionalState; |
180 | #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE)) |
162 | #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE)) |
181 | 163 | ||
182 | typedef enum |
164 | typedef enum |
183 | { |
165 | { |
184 | ERROR = 0, |
166 | SUCCESS = 0U, |
185 | SUCCESS = !ERROR |
167 | ERROR = !SUCCESS |
186 | } ErrorStatus; |
168 | } ErrorStatus; |
187 | 169 | ||
188 | /** |
170 | /** |
189 | * @} |
171 | * @} |
190 | */ |
172 | */ |