Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_NUCLEO_F746ZG/stm32f7xx.h@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 116:c0f6e94411f5
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 115:87f2f5183dfb | 1 | /** |
Kojto | 115:87f2f5183dfb | 2 | ****************************************************************************** |
Kojto | 115:87f2f5183dfb | 3 | * @file stm32f7xx.h |
Kojto | 115:87f2f5183dfb | 4 | * @author MCD Application Team |
Kojto | 116:c0f6e94411f5 | 5 | * @version V1.0.2 |
Kojto | 116:c0f6e94411f5 | 6 | * @date 21-September-2015 |
Kojto | 115:87f2f5183dfb | 7 | * @brief CMSIS STM32F7xx Device Peripheral Access Layer Header File. |
Kojto | 115:87f2f5183dfb | 8 | * |
Kojto | 115:87f2f5183dfb | 9 | * The file is the unique include file that the application programmer |
Kojto | 115:87f2f5183dfb | 10 | * is using in the C source code, usually in main.c. This file contains: |
Kojto | 115:87f2f5183dfb | 11 | * - Configuration section that allows to select: |
Kojto | 115:87f2f5183dfb | 12 | * - The STM32F7xx device used in the target application |
Kojto | 115:87f2f5183dfb | 13 | * - To use or not the peripherals drivers in application code(i.e. |
Kojto | 115:87f2f5183dfb | 14 | * code will be based on direct access to peripherals registers |
Kojto | 115:87f2f5183dfb | 15 | * rather than drivers API), this option is controlled by |
Kojto | 115:87f2f5183dfb | 16 | * "#define USE_HAL_DRIVER" |
Kojto | 115:87f2f5183dfb | 17 | * |
Kojto | 115:87f2f5183dfb | 18 | ****************************************************************************** |
Kojto | 115:87f2f5183dfb | 19 | * @attention |
Kojto | 115:87f2f5183dfb | 20 | * |
Kojto | 116:c0f6e94411f5 | 21 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
Kojto | 115:87f2f5183dfb | 22 | * |
Kojto | 115:87f2f5183dfb | 23 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 115:87f2f5183dfb | 24 | * are permitted provided that the following conditions are met: |
Kojto | 115:87f2f5183dfb | 25 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 115:87f2f5183dfb | 26 | * this list of conditions and the following disclaimer. |
Kojto | 115:87f2f5183dfb | 27 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 115:87f2f5183dfb | 28 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 115:87f2f5183dfb | 29 | * and/or other materials provided with the distribution. |
Kojto | 115:87f2f5183dfb | 30 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 115:87f2f5183dfb | 31 | * may be used to endorse or promote products derived from this software |
Kojto | 115:87f2f5183dfb | 32 | * without specific prior written permission. |
Kojto | 115:87f2f5183dfb | 33 | * |
Kojto | 115:87f2f5183dfb | 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 115:87f2f5183dfb | 35 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 115:87f2f5183dfb | 36 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 115:87f2f5183dfb | 37 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 115:87f2f5183dfb | 38 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 115:87f2f5183dfb | 39 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 115:87f2f5183dfb | 40 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 115:87f2f5183dfb | 41 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 115:87f2f5183dfb | 42 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 115:87f2f5183dfb | 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 115:87f2f5183dfb | 44 | * |
Kojto | 115:87f2f5183dfb | 45 | ****************************************************************************** |
Kojto | 115:87f2f5183dfb | 46 | */ |
Kojto | 115:87f2f5183dfb | 47 | |
Kojto | 115:87f2f5183dfb | 48 | /** @addtogroup CMSIS |
Kojto | 115:87f2f5183dfb | 49 | * @{ |
Kojto | 115:87f2f5183dfb | 50 | */ |
Kojto | 115:87f2f5183dfb | 51 | |
Kojto | 115:87f2f5183dfb | 52 | /** @addtogroup stm32f7xx |
Kojto | 115:87f2f5183dfb | 53 | * @{ |
Kojto | 115:87f2f5183dfb | 54 | */ |
Kojto | 115:87f2f5183dfb | 55 | |
Kojto | 115:87f2f5183dfb | 56 | #ifndef __STM32F7xx_H |
Kojto | 115:87f2f5183dfb | 57 | #define __STM32F7xx_H |
Kojto | 115:87f2f5183dfb | 58 | |
Kojto | 115:87f2f5183dfb | 59 | #ifdef __cplusplus |
Kojto | 115:87f2f5183dfb | 60 | extern "C" { |
Kojto | 115:87f2f5183dfb | 61 | #endif /* __cplusplus */ |
Kojto | 115:87f2f5183dfb | 62 | |
Kojto | 115:87f2f5183dfb | 63 | /** @addtogroup Library_configuration_section |
Kojto | 115:87f2f5183dfb | 64 | * @{ |
Kojto | 115:87f2f5183dfb | 65 | */ |
Kojto | 115:87f2f5183dfb | 66 | |
Kojto | 115:87f2f5183dfb | 67 | /** |
Kojto | 115:87f2f5183dfb | 68 | * @brief STM32 Family |
Kojto | 115:87f2f5183dfb | 69 | */ |
Kojto | 115:87f2f5183dfb | 70 | #if !defined (STM32F7) |
Kojto | 115:87f2f5183dfb | 71 | #define STM32F7 |
Kojto | 115:87f2f5183dfb | 72 | #endif /* STM32F7 */ |
Kojto | 115:87f2f5183dfb | 73 | |
Kojto | 115:87f2f5183dfb | 74 | /* Uncomment the line below according to the target STM32 device used in your |
Kojto | 115:87f2f5183dfb | 75 | application |
Kojto | 115:87f2f5183dfb | 76 | */ |
Kojto | 115:87f2f5183dfb | 77 | #if !defined (STM32F756xx) && !defined (STM32F746xx) && !defined (STM32F745xx) |
Kojto | 115:87f2f5183dfb | 78 | /* #define STM32F756xx */ /*!< STM32F756VG, STM32F756ZG, STM32F756ZG, STM32F756IG, STM32F756BG, |
Kojto | 115:87f2f5183dfb | 79 | STM32F756NG Devices */ |
Kojto | 115:87f2f5183dfb | 80 | #define STM32F746xx /*!< STM32F746VE, STM32F746VG, STM32F746ZE, STM32F746ZG, STM32F746IE, STM32F746IG, |
Kojto | 115:87f2f5183dfb | 81 | STM32F746BE, STM32F746BG, STM32F746NE, STM32F746NG Devices */ |
Kojto | 115:87f2f5183dfb | 82 | /* #define STM32F745xx */ /*!< STM32F745VE, STM32F745VG, STM32F745ZG, STM32F745ZE, STM32F745IE, STM32F745IG Devices */ |
Kojto | 115:87f2f5183dfb | 83 | #endif |
Kojto | 115:87f2f5183dfb | 84 | |
Kojto | 115:87f2f5183dfb | 85 | /* Tip: To avoid modifying this file each time you need to switch between these |
Kojto | 115:87f2f5183dfb | 86 | devices, you can define the device in your toolchain compiler preprocessor. |
Kojto | 115:87f2f5183dfb | 87 | */ |
Kojto | 115:87f2f5183dfb | 88 | |
Kojto | 115:87f2f5183dfb | 89 | #if !defined (USE_HAL_DRIVER) |
Kojto | 115:87f2f5183dfb | 90 | /** |
Kojto | 115:87f2f5183dfb | 91 | * @brief Comment the line below if you will not use the peripherals drivers. |
Kojto | 115:87f2f5183dfb | 92 | In this case, these drivers will not be included and the application code will |
Kojto | 115:87f2f5183dfb | 93 | be based on direct access to peripherals registers |
Kojto | 115:87f2f5183dfb | 94 | */ |
Kojto | 115:87f2f5183dfb | 95 | #define USE_HAL_DRIVER |
Kojto | 115:87f2f5183dfb | 96 | #endif /* USE_HAL_DRIVER */ |
Kojto | 115:87f2f5183dfb | 97 | |
Kojto | 115:87f2f5183dfb | 98 | /** |
Kojto | 115:87f2f5183dfb | 99 | * @brief CMSIS Device version number V1.0.1 |
Kojto | 115:87f2f5183dfb | 100 | */ |
Kojto | 115:87f2f5183dfb | 101 | #define __STM32F7xx_CMSIS_DEVICE_VERSION_MAIN (0x01) /*!< [31:24] main version */ |
Kojto | 115:87f2f5183dfb | 102 | #define __STM32F7xx_CMSIS_DEVICE_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */ |
Kojto | 115:87f2f5183dfb | 103 | #define __STM32F7xx_CMSIS_DEVICE_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */ |
Kojto | 115:87f2f5183dfb | 104 | #define __STM32F7xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */ |
Kojto | 115:87f2f5183dfb | 105 | #define __STM32F7xx_CMSIS_DEVICE_VERSION ((__STM32F7xx_CMSIS_DEVICE_VERSION_MAIN << 24)\ |
Kojto | 115:87f2f5183dfb | 106 | |(__STM32F7xx_CMSIS_DEVICE_VERSION_SUB1 << 16)\ |
Kojto | 115:87f2f5183dfb | 107 | |(__STM32F7xx_CMSIS_DEVICE_VERSION_SUB2 << 8 )\ |
Kojto | 115:87f2f5183dfb | 108 | |(__STM32F7xx_CMSIS_DEVICE_VERSION)) |
Kojto | 115:87f2f5183dfb | 109 | /** |
Kojto | 115:87f2f5183dfb | 110 | * @} |
Kojto | 115:87f2f5183dfb | 111 | */ |
Kojto | 115:87f2f5183dfb | 112 | |
Kojto | 115:87f2f5183dfb | 113 | /** @addtogroup Device_Included |
Kojto | 115:87f2f5183dfb | 114 | * @{ |
Kojto | 115:87f2f5183dfb | 115 | */ |
Kojto | 115:87f2f5183dfb | 116 | #if defined(STM32F756xx) |
Kojto | 115:87f2f5183dfb | 117 | #include "stm32f756xx.h" |
Kojto | 115:87f2f5183dfb | 118 | #elif defined(STM32F746xx) |
Kojto | 115:87f2f5183dfb | 119 | #include "stm32f746xx.h" |
Kojto | 115:87f2f5183dfb | 120 | #elif defined(STM32F745xx) |
Kojto | 115:87f2f5183dfb | 121 | #include "stm32f745xx.h" |
Kojto | 115:87f2f5183dfb | 122 | #else |
Kojto | 115:87f2f5183dfb | 123 | #error "Please select first the target STM32F7xx device used in your application (in stm32f7xx.h file)" |
Kojto | 115:87f2f5183dfb | 124 | #endif |
Kojto | 115:87f2f5183dfb | 125 | |
Kojto | 115:87f2f5183dfb | 126 | /** |
Kojto | 115:87f2f5183dfb | 127 | * @} |
Kojto | 115:87f2f5183dfb | 128 | */ |
Kojto | 115:87f2f5183dfb | 129 | |
Kojto | 115:87f2f5183dfb | 130 | /** @addtogroup Exported_types |
Kojto | 115:87f2f5183dfb | 131 | * @{ |
Kojto | 115:87f2f5183dfb | 132 | */ |
Kojto | 115:87f2f5183dfb | 133 | typedef enum |
Kojto | 115:87f2f5183dfb | 134 | { |
Kojto | 115:87f2f5183dfb | 135 | RESET = 0, |
Kojto | 115:87f2f5183dfb | 136 | SET = !RESET |
Kojto | 115:87f2f5183dfb | 137 | } FlagStatus, ITStatus; |
Kojto | 115:87f2f5183dfb | 138 | |
Kojto | 115:87f2f5183dfb | 139 | typedef enum |
Kojto | 115:87f2f5183dfb | 140 | { |
Kojto | 115:87f2f5183dfb | 141 | DISABLE = 0, |
Kojto | 115:87f2f5183dfb | 142 | ENABLE = !DISABLE |
Kojto | 115:87f2f5183dfb | 143 | } FunctionalState; |
Kojto | 115:87f2f5183dfb | 144 | #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE)) |
Kojto | 115:87f2f5183dfb | 145 | |
Kojto | 115:87f2f5183dfb | 146 | typedef enum |
Kojto | 115:87f2f5183dfb | 147 | { |
Kojto | 115:87f2f5183dfb | 148 | ERROR = 0, |
Kojto | 115:87f2f5183dfb | 149 | SUCCESS = !ERROR |
Kojto | 115:87f2f5183dfb | 150 | } ErrorStatus; |
Kojto | 115:87f2f5183dfb | 151 | |
Kojto | 115:87f2f5183dfb | 152 | /** |
Kojto | 115:87f2f5183dfb | 153 | * @} |
Kojto | 115:87f2f5183dfb | 154 | */ |
Kojto | 115:87f2f5183dfb | 155 | |
Kojto | 115:87f2f5183dfb | 156 | /** @addtogroup Exported_macro |
Kojto | 115:87f2f5183dfb | 157 | * @{ |
Kojto | 115:87f2f5183dfb | 158 | */ |
Kojto | 115:87f2f5183dfb | 159 | #define SET_BIT(REG, BIT) ((REG) |= (BIT)) |
Kojto | 115:87f2f5183dfb | 160 | |
Kojto | 115:87f2f5183dfb | 161 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT)) |
Kojto | 115:87f2f5183dfb | 162 | |
Kojto | 115:87f2f5183dfb | 163 | #define READ_BIT(REG, BIT) ((REG) & (BIT)) |
Kojto | 115:87f2f5183dfb | 164 | |
Kojto | 115:87f2f5183dfb | 165 | #define CLEAR_REG(REG) ((REG) = (0x0)) |
Kojto | 115:87f2f5183dfb | 166 | |
Kojto | 115:87f2f5183dfb | 167 | #define WRITE_REG(REG, VAL) ((REG) = (VAL)) |
Kojto | 115:87f2f5183dfb | 168 | |
Kojto | 115:87f2f5183dfb | 169 | #define READ_REG(REG) ((REG)) |
Kojto | 115:87f2f5183dfb | 170 | |
Kojto | 115:87f2f5183dfb | 171 | #define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK))) |
Kojto | 115:87f2f5183dfb | 172 | |
Kojto | 115:87f2f5183dfb | 173 | #define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL))) |
Kojto | 115:87f2f5183dfb | 174 | |
Kojto | 115:87f2f5183dfb | 175 | /** |
Kojto | 115:87f2f5183dfb | 176 | * @} |
Kojto | 115:87f2f5183dfb | 177 | */ |
Kojto | 115:87f2f5183dfb | 178 | |
Kojto | 115:87f2f5183dfb | 179 | #ifdef USE_HAL_DRIVER |
Kojto | 115:87f2f5183dfb | 180 | #include "stm32f7xx_hal_conf.h" |
Kojto | 115:87f2f5183dfb | 181 | #endif /* USE_HAL_DRIVER */ |
Kojto | 115:87f2f5183dfb | 182 | |
Kojto | 115:87f2f5183dfb | 183 | #ifdef __cplusplus |
Kojto | 115:87f2f5183dfb | 184 | } |
Kojto | 115:87f2f5183dfb | 185 | #endif /* __cplusplus */ |
Kojto | 115:87f2f5183dfb | 186 | |
Kojto | 115:87f2f5183dfb | 187 | #endif /* __STM32F7xx_H */ |
Kojto | 115:87f2f5183dfb | 188 | |
Kojto | 115:87f2f5183dfb | 189 | /** |
Kojto | 115:87f2f5183dfb | 190 | * @} |
Kojto | 115:87f2f5183dfb | 191 | */ |
Kojto | 115:87f2f5183dfb | 192 | |
Kojto | 115:87f2f5183dfb | 193 | /** |
Kojto | 115:87f2f5183dfb | 194 | * @} |
Kojto | 115:87f2f5183dfb | 195 | */ |
Kojto | 115:87f2f5183dfb | 196 | |
Kojto | 115:87f2f5183dfb | 197 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |