Rev 49 | Rev 61 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 49 | Rev 50 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /** |
1 | /** |
| 2 | ****************************************************************************** |
2 | ****************************************************************************** |
| 3 | * @file stm32l1xx.h |
3 | * @file stm32l1xx.h |
| 4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
| 5 | * @version V2.2.0 |
- | |
| 6 | * @date 01-July-2016 |
- | |
| 7 | * @brief CMSIS STM32L1xx Device Peripheral Access Layer Header File. |
5 | * @brief CMSIS STM32L1xx 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) 2016 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 116... | Line 98... | ||
| 116 | */ |
98 | */ |
| 117 | /*#define USE_HAL_DRIVER */ |
99 | /*#define USE_HAL_DRIVER */ |
| 118 | #endif /* USE_HAL_DRIVER */ |
100 | #endif /* USE_HAL_DRIVER */ |
| 119 | 101 | ||
| 120 | /** |
102 | /** |
| 121 | * @brief CMSIS Device version number |
103 | * @brief CMSIS Device version number V2.3.1 |
| 122 | */ |
104 | */ |
| 123 | #define __STM32L1xx_CMSIS_VERSION_MAIN (0x02) /*!< [31:24] main version */ |
105 | #define __STM32L1xx_CMSIS_VERSION_MAIN (0x02) /*!< [31:24] main version */ |
| 124 | #define __STM32L1xx_CMSIS_VERSION_SUB1 (0x02) /*!< [23:16] sub1 version */ |
106 | #define __STM32L1xx_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */ |
| 125 | #define __STM32L1xx_CMSIS_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */ |
107 | #define __STM32L1xx_CMSIS_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */ |
| 126 | #define __STM32L1xx_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */ |
108 | #define __STM32L1xx_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */ |
| 127 | #define __STM32L1xx_CMSIS_VERSION ((__STM32L1xx_CMSIS_VERSION_MAIN << 24)\ |
109 | #define __STM32L1xx_CMSIS_VERSION ((__STM32L1xx_CMSIS_VERSION_MAIN << 24)\ |
| 128 | |(__STM32L1xx_CMSIS_VERSION_SUB1 << 16)\ |
110 | |(__STM32L1xx_CMSIS_VERSION_SUB1 << 16)\ |
| 129 | |(__STM32L1xx_CMSIS_VERSION_SUB2 << 8 )\ |
111 | |(__STM32L1xx_CMSIS_VERSION_SUB2 << 8 )\ |
| 130 | |(__STM32L1xx_CMSIS_VERSION_RC)) |
112 | |(__STM32L1xx_CMSIS_VERSION_RC)) |
| Line 205... | Line 187... | ||
| 205 | } FunctionalState; |
187 | } FunctionalState; |
| 206 | #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE)) |
188 | #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE)) |
| 207 | 189 | ||
| 208 | typedef enum |
190 | typedef enum |
| 209 | { |
191 | { |
| 210 | ERROR = 0, |
192 | SUCCESS = 0, |
| 211 | SUCCESS = !ERROR |
193 | ERROR = !SUCCESS |
| 212 | } ErrorStatus; |
194 | } ErrorStatus; |
| 213 | 195 | ||
| 214 | /** |
196 | /** |
| 215 | * @} |
197 | * @} |
| 216 | */ |
198 | */ |