mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
AnnaBridge
Date:
Wed Feb 20 22:31:08 2019 +0000
Revision:
189:f392fc9709a3
Parent:
182:a56a73fd2a6f
mbed library release version 165

Who changed what in which revision?

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