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