1 | /** |
---|
2 | ****************************************************************************** |
---|
3 | * @file stm32f7xx_hal.h |
---|
4 | * @author MCD Application Team |
---|
5 | * @version V1.0.1 |
---|
6 | * @date 25-June-2015 |
---|
7 | * @brief This file contains all the functions prototypes for the HAL |
---|
8 | * module driver. |
---|
9 | ****************************************************************************** |
---|
10 | * @attention |
---|
11 | * |
---|
12 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
---|
13 | * |
---|
14 | * Redistribution and use in source and binary forms, with or without modification, |
---|
15 | * are permitted provided that the following conditions are met: |
---|
16 | * 1. Redistributions of source code must retain the above copyright notice, |
---|
17 | * this list of conditions and the following disclaimer. |
---|
18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
---|
19 | * this list of conditions and the following disclaimer in the documentation |
---|
20 | * and/or other materials provided with the distribution. |
---|
21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
---|
22 | * may be used to endorse or promote products derived from this software |
---|
23 | * without specific prior written permission. |
---|
24 | * |
---|
25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
---|
28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
---|
29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
---|
31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
---|
32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
---|
33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
---|
34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
35 | * |
---|
36 | ****************************************************************************** |
---|
37 | */ |
---|
38 | |
---|
39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
---|
40 | #ifndef __STM32F7xx_HAL_H |
---|
41 | #define __STM32F7xx_HAL_H |
---|
42 | |
---|
43 | #ifdef __cplusplus |
---|
44 | extern "C" { |
---|
45 | #endif |
---|
46 | |
---|
47 | /* Includes ------------------------------------------------------------------*/ |
---|
48 | #include "stm32f7xx_hal_conf.h" |
---|
49 | |
---|
50 | /** @addtogroup STM32F7xx_HAL_Driver |
---|
51 | * @{ |
---|
52 | */ |
---|
53 | |
---|
54 | /** @addtogroup HAL |
---|
55 | * @{ |
---|
56 | */ |
---|
57 | |
---|
58 | /* Exported types ------------------------------------------------------------*/ |
---|
59 | /* Exported constants --------------------------------------------------------*/ |
---|
60 | /* Exported macro ------------------------------------------------------------*/ |
---|
61 | /** @defgroup HAL_Exported_Macros HAL Exported Macros |
---|
62 | * @{ |
---|
63 | */ |
---|
64 | |
---|
65 | /** @brief Freeze/Unfreeze Peripherals in Debug mode |
---|
66 | */ |
---|
67 | #define __HAL_DBGMCU_FREEZE_TIM2() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP)) |
---|
68 | #define __HAL_DBGMCU_FREEZE_TIM3() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP)) |
---|
69 | #define __HAL_DBGMCU_FREEZE_TIM4() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM4_STOP)) |
---|
70 | #define __HAL_DBGMCU_FREEZE_TIM5() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM5_STOP)) |
---|
71 | #define __HAL_DBGMCU_FREEZE_TIM6() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP)) |
---|
72 | #define __HAL_DBGMCU_FREEZE_TIM7() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP)) |
---|
73 | #define __HAL_DBGMCU_FREEZE_TIM12() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM12_STOP)) |
---|
74 | #define __HAL_DBGMCU_FREEZE_TIM13() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM13_STOP)) |
---|
75 | #define __HAL_DBGMCU_FREEZE_TIM14() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP)) |
---|
76 | #define __HAL_DBGMCU_FREEZE_LPTIM1() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_LPTIM1_STOP)) |
---|
77 | #define __HAL_DBGMCU_FREEZE_RTC() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP)) |
---|
78 | #define __HAL_DBGMCU_FREEZE_WWDG() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP)) |
---|
79 | #define __HAL_DBGMCU_FREEZE_IWDG() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP)) |
---|
80 | #define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)) |
---|
81 | #define __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT)) |
---|
82 | #define __HAL_DBGMCU_FREEZE_I2C3_TIMEOUT() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT)) |
---|
83 | #define __HAL_DBGMCU_FREEZE_I2C4_TIMEOUT() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT)) |
---|
84 | #define __HAL_DBGMCU_FREEZE_CAN1() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN1_STOP)) |
---|
85 | #define __HAL_DBGMCU_FREEZE_CAN2() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN2_STOP)) |
---|
86 | #define __HAL_DBGMCU_FREEZE_TIM1() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP)) |
---|
87 | #define __HAL_DBGMCU_FREEZE_TIM8() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM8_STOP)) |
---|
88 | #define __HAL_DBGMCU_FREEZE_TIM9() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM9_STOP)) |
---|
89 | #define __HAL_DBGMCU_FREEZE_TIM10() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM10_STOP)) |
---|
90 | #define __HAL_DBGMCU_FREEZE_TIM11() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM11_STOP)) |
---|
91 | |
---|
92 | #define __HAL_DBGMCU_UNFREEZE_TIM2() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP)) |
---|
93 | #define __HAL_DBGMCU_UNFREEZE_TIM3() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP)) |
---|
94 | #define __HAL_DBGMCU_UNFREEZE_TIM4() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM4_STOP)) |
---|
95 | #define __HAL_DBGMCU_UNFREEZE_TIM5() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM5_STOP)) |
---|
96 | #define __HAL_DBGMCU_UNFREEZE_TIM6() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP)) |
---|
97 | #define __HAL_DBGMCU_UNFREEZE_TIM7() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP)) |
---|
98 | #define __HAL_DBGMCU_UNFREEZE_TIM12() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM12_STOP)) |
---|
99 | #define __HAL_DBGMCU_UNFREEZE_TIM13() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM13_STOP)) |
---|
100 | #define __HAL_DBGMCU_UNFREEZE_TIM14() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP)) |
---|
101 | #define __HAL_DBGMCU_UNFREEZE_LPTIM1() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_LPTIM1_STOP)) |
---|
102 | #define __HAL_DBGMCU_UNFREEZE_RTC() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP)) |
---|
103 | #define __HAL_DBGMCU_UNFREEZE_WWDG() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP)) |
---|
104 | #define __HAL_DBGMCU_UNFREEZE_IWDG() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP)) |
---|
105 | #define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)) |
---|
106 | #define __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT)) |
---|
107 | #define __HAL_DBGMCU_UNFREEZE_I2C3_TIMEOUT() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT)) |
---|
108 | #define __HAL_DBGMCU_UNFREEZE_I2C4_TIMEOUT() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT)) |
---|
109 | #define __HAL_DBGMCU_UNFREEZE_CAN1() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN1_STOP)) |
---|
110 | #define __HAL_DBGMCU_UNFREEZE_CAN2() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN2_STOP)) |
---|
111 | #define __HAL_DBGMCU_UNFREEZE_TIM1() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP)) |
---|
112 | #define __HAL_DBGMCU_UNFREEZE_TIM8() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM8_STOP)) |
---|
113 | #define __HAL_DBGMCU_UNFREEZE_TIM9() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM9_STOP)) |
---|
114 | #define __HAL_DBGMCU_UNFREEZE_TIM10() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM10_STOP)) |
---|
115 | #define __HAL_DBGMCU_UNFREEZE_TIM11() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM11_STOP)) |
---|
116 | |
---|
117 | |
---|
118 | /** @brief FMC (NOR/RAM) mapped at 0x60000000 and SDRAM mapped at 0xC0000000 |
---|
119 | */ |
---|
120 | #define __HAL_SYSCFG_REMAPMEMORY_FMC() (SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_SWP_FMC)) |
---|
121 | |
---|
122 | |
---|
123 | /** @brief FMC/SDRAM mapped at 0x60000000 (NOR/RAM) mapped at 0xC0000000 |
---|
124 | */ |
---|
125 | #define __HAL_SYSCFG_REMAPMEMORY_FMC_SDRAM() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_SWP_FMC);\ |
---|
126 | SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_SWP_FMC_0);\ |
---|
127 | }while(0); |
---|
128 | /** |
---|
129 | * @} |
---|
130 | */ |
---|
131 | |
---|
132 | /* Exported functions --------------------------------------------------------*/ |
---|
133 | /** @addtogroup HAL_Exported_Functions |
---|
134 | * @{ |
---|
135 | */ |
---|
136 | /** @addtogroup HAL_Exported_Functions_Group1 |
---|
137 | * @{ |
---|
138 | */ |
---|
139 | /* Initialization and de-initialization functions ******************************/ |
---|
140 | HAL_StatusTypeDef HAL_Init(void); |
---|
141 | HAL_StatusTypeDef HAL_DeInit(void); |
---|
142 | void HAL_MspInit(void); |
---|
143 | void HAL_MspDeInit(void); |
---|
144 | HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority); |
---|
145 | /** |
---|
146 | * @} |
---|
147 | */ |
---|
148 | |
---|
149 | /** @addtogroup HAL_Exported_Functions_Group2 |
---|
150 | * @{ |
---|
151 | */ |
---|
152 | /* Peripheral Control functions ************************************************/ |
---|
153 | void HAL_IncTick(void); |
---|
154 | void HAL_Delay(__IO uint32_t Delay); |
---|
155 | uint32_t HAL_GetTick(void); |
---|
156 | void HAL_SuspendTick(void); |
---|
157 | void HAL_ResumeTick(void); |
---|
158 | uint32_t HAL_GetHalVersion(void); |
---|
159 | uint32_t HAL_GetREVID(void); |
---|
160 | uint32_t HAL_GetDEVID(void); |
---|
161 | void HAL_DBGMCU_EnableDBGSleepMode(void); |
---|
162 | void HAL_DBGMCU_DisableDBGSleepMode(void); |
---|
163 | void HAL_DBGMCU_EnableDBGStopMode(void); |
---|
164 | void HAL_DBGMCU_DisableDBGStopMode(void); |
---|
165 | void HAL_DBGMCU_EnableDBGStandbyMode(void); |
---|
166 | void HAL_DBGMCU_DisableDBGStandbyMode(void); |
---|
167 | void HAL_EnableCompensationCell(void); |
---|
168 | void HAL_DisableCompensationCell(void); |
---|
169 | void HAL_EnableFMCMemorySwapping(void); |
---|
170 | void HAL_DisableFMCMemorySwapping(void); |
---|
171 | /** |
---|
172 | * @} |
---|
173 | */ |
---|
174 | |
---|
175 | /** |
---|
176 | * @} |
---|
177 | */ |
---|
178 | /* Private types -------------------------------------------------------------*/ |
---|
179 | /* Private variables ---------------------------------------------------------*/ |
---|
180 | /** @defgroup HAL_Private_Variables HAL Private Variables |
---|
181 | * @{ |
---|
182 | */ |
---|
183 | /** |
---|
184 | * @} |
---|
185 | */ |
---|
186 | /* Private constants ---------------------------------------------------------*/ |
---|
187 | /** @defgroup HAL_Private_Constants HAL Private Constants |
---|
188 | * @{ |
---|
189 | */ |
---|
190 | /** |
---|
191 | * @} |
---|
192 | */ |
---|
193 | /* Private macros ------------------------------------------------------------*/ |
---|
194 | /* Private functions ---------------------------------------------------------*/ |
---|
195 | /** |
---|
196 | * @} |
---|
197 | */ |
---|
198 | |
---|
199 | /** |
---|
200 | * @} |
---|
201 | */ |
---|
202 | |
---|
203 | #ifdef __cplusplus |
---|
204 | } |
---|
205 | #endif |
---|
206 | |
---|
207 | #endif /* __STM32F7xx_HAL_H */ |
---|
208 | |
---|
209 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
---|