SAKURA Internet / mbed-dev

Fork of mbed-dev by mbed official

Committer:
Kojto
Date:
Tue Feb 14 14:44:10 2017 +0000
Revision:
158:b23ee177fd68
Parent:
targets/TARGET_STM/TARGET_STM32F7/TARGET_F746_F756/TARGET_NUCLEO_F756ZG/device/stm32f7xx.h@157:ff67d9f36b67
Child:
161:2cc1468da177
This updates the lib to the mbed lib v136

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 149:156823d33999 1 /**
<> 149:156823d33999 2 ******************************************************************************
<> 149:156823d33999 3 * @file stm32f7xx.h
<> 149:156823d33999 4 * @author MCD Application Team
<> 157:ff67d9f36b67 5 * @version V1.1.2
<> 157:ff67d9f36b67 6 * @date 23-September-2016
<> 149:156823d33999 7 * @brief CMSIS STM32F7xx Device Peripheral Access Layer Header File.
<> 149:156823d33999 8 *
<> 149:156823d33999 9 * The file is the unique include file that the application programmer
<> 149:156823d33999 10 * is using in the C source code, usually in main.c. This file contains:
<> 149:156823d33999 11 * - Configuration section that allows to select:
<> 149:156823d33999 12 * - The STM32F7xx device used in the target application
<> 149:156823d33999 13 * - To use or not the peripheral’s drivers in application code(i.e.
<> 149:156823d33999 14 * code will be based on direct access to peripheral’s registers
<> 149:156823d33999 15 * rather than drivers API), this option is controlled by
<> 149:156823d33999 16 * "#define USE_HAL_DRIVER"
<> 149:156823d33999 17 *
<> 149:156823d33999 18 ******************************************************************************
<> 149:156823d33999 19 * @attention
<> 149:156823d33999 20 *
<> 149:156823d33999 21 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 149:156823d33999 22 *
<> 149:156823d33999 23 * Redistribution and use in source and binary forms, with or without modification,
<> 149:156823d33999 24 * are permitted provided that the following conditions are met:
<> 149:156823d33999 25 * 1. Redistributions of source code must retain the above copyright notice,
<> 149:156823d33999 26 * this list of conditions and the following disclaimer.
<> 149:156823d33999 27 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 149:156823d33999 28 * this list of conditions and the following disclaimer in the documentation
<> 149:156823d33999 29 * and/or other materials provided with the distribution.
<> 149:156823d33999 30 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 149:156823d33999 31 * may be used to endorse or promote products derived from this software
<> 149:156823d33999 32 * without specific prior written permission.
<> 149:156823d33999 33 *
<> 149:156823d33999 34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 149:156823d33999 35 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 149:156823d33999 36 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 149:156823d33999 37 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 149:156823d33999 38 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 149:156823d33999 39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 149:156823d33999 40 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 149:156823d33999 41 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 149:156823d33999 42 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 149:156823d33999 43 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 149:156823d33999 44 *
<> 149:156823d33999 45 ******************************************************************************
<> 149:156823d33999 46 */
<> 149:156823d33999 47
<> 149:156823d33999 48 /** @addtogroup CMSIS
<> 149:156823d33999 49 * @{
<> 149:156823d33999 50 */
<> 149:156823d33999 51
<> 149:156823d33999 52 /** @addtogroup stm32f7xx
<> 149:156823d33999 53 * @{
<> 149:156823d33999 54 */
<> 149:156823d33999 55
<> 149:156823d33999 56 #ifndef __STM32F7xx_H
<> 149:156823d33999 57 #define __STM32F7xx_H
<> 149:156823d33999 58
<> 149:156823d33999 59 #ifdef __cplusplus
<> 149:156823d33999 60 extern "C" {
<> 149:156823d33999 61 #endif /* __cplusplus */
<> 149:156823d33999 62
<> 149:156823d33999 63 /** @addtogroup Library_configuration_section
<> 149:156823d33999 64 * @{
<> 149:156823d33999 65 */
<> 149:156823d33999 66
<> 149:156823d33999 67 /**
<> 149:156823d33999 68 * @brief STM32 Family
<> 149:156823d33999 69 */
<> 149:156823d33999 70 #if !defined (STM32F7)
<> 149:156823d33999 71 #define STM32F7
<> 149:156823d33999 72 #endif /* STM32F7 */
<> 149:156823d33999 73
<> 149:156823d33999 74 /* Uncomment the line below according to the target STM32 device used in your
<> 149:156823d33999 75 application
<> 149:156823d33999 76 */
<> 149:156823d33999 77 #if !defined (STM32F756xx) && !defined (STM32F746xx) && !defined (STM32F745xx) && !defined (STM32F767xx) && \
<> 157:ff67d9f36b67 78 !defined (STM32F769xx) && !defined (STM32F777xx) && !defined (STM32F779xx) && !defined (STM32F722xx) && \
<> 157:ff67d9f36b67 79 !defined (STM32F723xx) && !defined (STM32F732xx) && !defined (STM32F733xx)
<> 157:ff67d9f36b67 80 #define STM32F756xx /*!< STM32F756VG, STM32F756ZG, STM32F756ZG, STM32F756IG, STM32F756BG,
<> 149:156823d33999 81 STM32F756NG Devices */
<> 149:156823d33999 82 /* #define STM32F746xx */ /*!< STM32F746VE, STM32F746VG, STM32F746ZE, STM32F746ZG, STM32F746IE, STM32F746IG,
<> 149:156823d33999 83 STM32F746BE, STM32F746BG, STM32F746NE, STM32F746NG Devices */
<> 149:156823d33999 84 /* #define STM32F745xx */ /*!< STM32F745VE, STM32F745VG, STM32F745ZG, STM32F745ZE, STM32F745IE, STM32F745IG Devices */
<> 149:156823d33999 85 /* #define STM32F765xx */ /*!< STM32F765BI, STM32F765BG, STM32F765NI, STM32F765NG, STM32F765II, STM32F765IG,
<> 149:156823d33999 86 STM32F765ZI, STM32F765ZG, STM32F765VI, STM32F765VG Devices */
<> 149:156823d33999 87 /* #define STM32F767xx */ /*!< STM32F767BG, STM32F767BI, STM32F767IG, STM32F767II, STM32F767NG, STM32F767NI,
<> 157:ff67d9f36b67 88 STM32F767VG, STM32F767VI, STM32F767ZG, STM32F767ZI Devices */
<> 149:156823d33999 89 /* #define STM32F769xx */ /*!< STM32F769AG, STM32F769AI, STM32F769BG, STM32F769BI, STM32F769IG, STM32F769II,
<> 157:ff67d9f36b67 90 STM32F769NG, STM32F769NI, STM32F768AI Devices */
<> 157:ff67d9f36b67 91 /* #define STM32F777xx */ /*!< STM32F777VI, STM32F777ZI, STM32F777II, STM32F777BI, STM32F777NI Devices */
<> 157:ff67d9f36b67 92 /* #define STM32F779xx */ /*!< STM32F779II, STM32F779BI, STM32F779NI, STM32F779AI, STM32F778AI Devices */
<> 157:ff67d9f36b67 93 /* #define STM32F722xx */ /*!< STM32F722IE, STM32F722ZE, STM32F722VE, STM32F722RE, STM32F722IC, STM32F722ZC,
<> 157:ff67d9f36b67 94 STM32F722VC, STM32F722RC Devices */
<> 157:ff67d9f36b67 95 /* #define STM32F723xx */ /*!< STM32F723IE, STM32F723ZE, STM32F723VE, STM32F723IC, STM32F723ZC, STM32F723VC Devices */
<> 157:ff67d9f36b67 96 /* #define STM32F732xx */ /*!< STM32F732IE, STM32F732ZE, STM32F732VE, STM32F732RE Devices */
<> 157:ff67d9f36b67 97 /* #define STM32F733xx */ /*!< STM32F733IE, STM32F733ZE, STM32F733VE Devices */
<> 149:156823d33999 98 #endif
<> 149:156823d33999 99
<> 149:156823d33999 100 /* Tip: To avoid modifying this file each time you need to switch between these
<> 149:156823d33999 101 devices, you can define the device in your toolchain compiler preprocessor.
<> 149:156823d33999 102 */
<> 149:156823d33999 103
<> 149:156823d33999 104 #if !defined (USE_HAL_DRIVER)
<> 149:156823d33999 105 /**
<> 149:156823d33999 106 * @brief Comment the line below if you will not use the peripherals drivers.
<> 149:156823d33999 107 In this case, these drivers will not be included and the application code will
<> 149:156823d33999 108 be based on direct access to peripherals registers
<> 149:156823d33999 109 */
<> 149:156823d33999 110 #define USE_HAL_DRIVER
<> 149:156823d33999 111 #endif /* USE_HAL_DRIVER */
<> 149:156823d33999 112
<> 149:156823d33999 113 /**
<> 157:ff67d9f36b67 114 * @brief CMSIS Device version number V1.1.2
<> 149:156823d33999 115 */
<> 149:156823d33999 116 #define __STM32F7_CMSIS_VERSION_MAIN (0x01) /*!< [31:24] main version */
<> 149:156823d33999 117 #define __STM32F7_CMSIS_VERSION_SUB1 (0x01) /*!< [23:16] sub1 version */
<> 157:ff67d9f36b67 118 #define __STM32F7_CMSIS_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
<> 149:156823d33999 119 #define __STM32F7_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
<> 149:156823d33999 120 #define __STM32F7_CMSIS_VERSION ((__STM32F7_CMSIS_VERSION_MAIN << 24)\
<> 149:156823d33999 121 |(__STM32F7_CMSIS_VERSION_SUB1 << 16)\
<> 149:156823d33999 122 |(__STM32F7_CMSIS_VERSION_SUB2 << 8 )\
<> 149:156823d33999 123 |(__STM32F7_CMSIS_VERSION))
<> 149:156823d33999 124 /**
<> 149:156823d33999 125 * @}
<> 149:156823d33999 126 */
<> 149:156823d33999 127
<> 149:156823d33999 128 /** @addtogroup Device_Included
<> 149:156823d33999 129 * @{
<> 149:156823d33999 130 */
<> 157:ff67d9f36b67 131 #if defined(STM32F722xx)
<> 157:ff67d9f36b67 132 #include "stm32f722xx.h"
<> 157:ff67d9f36b67 133 #elif defined(STM32F723xx)
<> 157:ff67d9f36b67 134 #include "stm32f723xx.h"
<> 157:ff67d9f36b67 135 #elif defined(STM32F732xx)
<> 157:ff67d9f36b67 136 #include "stm32f732xx.h"
<> 157:ff67d9f36b67 137 #elif defined(STM32F733xx)
<> 157:ff67d9f36b67 138 #include "stm32f733xx.h"
<> 157:ff67d9f36b67 139 #elif defined(STM32F756xx)
<> 149:156823d33999 140 #include "stm32f756xx.h"
<> 149:156823d33999 141 #elif defined(STM32F746xx)
<> 149:156823d33999 142 #include "stm32f746xx.h"
<> 149:156823d33999 143 #elif defined(STM32F745xx)
<> 149:156823d33999 144 #include "stm32f745xx.h"
<> 149:156823d33999 145 #elif defined(STM32F765xx)
<> 149:156823d33999 146 #include "stm32f765xx.h"
<> 149:156823d33999 147 #elif defined(STM32F767xx)
<> 149:156823d33999 148 #include "stm32f767xx.h"
<> 149:156823d33999 149 #elif defined(STM32F769xx)
<> 149:156823d33999 150 #include "stm32f769xx.h"
<> 149:156823d33999 151 #elif defined(STM32F777xx)
<> 149:156823d33999 152 #include "stm32f777xx.h"
<> 149:156823d33999 153 #elif defined(STM32F779xx)
<> 149:156823d33999 154 #include "stm32f779xx.h"
<> 149:156823d33999 155 #else
<> 149:156823d33999 156 #error "Please select first the target STM32F7xx device used in your application (in stm32f7xx.h file)"
<> 149:156823d33999 157 #endif
<> 149:156823d33999 158
<> 149:156823d33999 159 /**
<> 149:156823d33999 160 * @}
<> 149:156823d33999 161 */
<> 149:156823d33999 162
<> 149:156823d33999 163 /** @addtogroup Exported_types
<> 149:156823d33999 164 * @{
<> 149:156823d33999 165 */
<> 149:156823d33999 166 typedef enum
<> 149:156823d33999 167 {
<> 149:156823d33999 168 RESET = 0,
<> 149:156823d33999 169 SET = !RESET
<> 149:156823d33999 170 } FlagStatus, ITStatus;
<> 149:156823d33999 171
<> 149:156823d33999 172 typedef enum
<> 149:156823d33999 173 {
<> 149:156823d33999 174 DISABLE = 0,
<> 149:156823d33999 175 ENABLE = !DISABLE
<> 149:156823d33999 176 } FunctionalState;
<> 149:156823d33999 177 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
<> 149:156823d33999 178
<> 149:156823d33999 179 typedef enum
<> 149:156823d33999 180 {
<> 149:156823d33999 181 ERROR = 0,
<> 149:156823d33999 182 SUCCESS = !ERROR
<> 149:156823d33999 183 } ErrorStatus;
<> 149:156823d33999 184
<> 149:156823d33999 185 /**
<> 149:156823d33999 186 * @}
<> 149:156823d33999 187 */
<> 149:156823d33999 188
<> 149:156823d33999 189 /** @addtogroup Exported_macro
<> 149:156823d33999 190 * @{
<> 149:156823d33999 191 */
<> 149:156823d33999 192 #define SET_BIT(REG, BIT) ((REG) |= (BIT))
<> 149:156823d33999 193
<> 149:156823d33999 194 #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
<> 149:156823d33999 195
<> 149:156823d33999 196 #define READ_BIT(REG, BIT) ((REG) & (BIT))
<> 149:156823d33999 197
<> 149:156823d33999 198 #define CLEAR_REG(REG) ((REG) = (0x0))
<> 149:156823d33999 199
<> 149:156823d33999 200 #define WRITE_REG(REG, VAL) ((REG) = (VAL))
<> 149:156823d33999 201
<> 149:156823d33999 202 #define READ_REG(REG) ((REG))
<> 149:156823d33999 203
<> 149:156823d33999 204 #define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
<> 149:156823d33999 205
<> 149:156823d33999 206 #define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
<> 149:156823d33999 207
<> 149:156823d33999 208 /**
<> 149:156823d33999 209 * @}
<> 149:156823d33999 210 */
<> 149:156823d33999 211
<> 149:156823d33999 212 #ifdef USE_HAL_DRIVER
<> 149:156823d33999 213 #include "stm32f7xx_hal_conf.h"
<> 149:156823d33999 214 #endif /* USE_HAL_DRIVER */
<> 149:156823d33999 215
<> 149:156823d33999 216 #ifdef __cplusplus
<> 149:156823d33999 217 }
<> 149:156823d33999 218 #endif /* __cplusplus */
<> 149:156823d33999 219
<> 149:156823d33999 220 #endif /* __STM32F7xx_H */
<> 149:156823d33999 221
<> 149:156823d33999 222 /**
<> 149:156823d33999 223 * @}
<> 149:156823d33999 224 */
<> 149:156823d33999 225
<> 149:156823d33999 226 /**
<> 149:156823d33999 227 * @}
<> 149:156823d33999 228 */
<> 149:156823d33999 229
<> 149:156823d33999 230 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/