Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /** |
2 | ****************************************************************************** |
||
3 | * @file stm32f1xx_ll_bus.h |
||
4 | * @author MCD Application Team |
||
5 | * @brief Header file of BUS LL module. |
||
6 | |||
7 | @verbatim |
||
8 | ##### RCC Limitations ##### |
||
9 | ============================================================================== |
||
10 | [..] |
||
11 | A delay between an RCC peripheral clock enable and the effective peripheral |
||
12 | enabling should be taken into account in order to manage the peripheral read/write |
||
13 | from/to registers. |
||
14 | (+) This delay depends on the peripheral mapping. |
||
15 | (++) AHB & APB peripherals, 1 dummy read is necessary |
||
16 | |||
17 | [..] |
||
18 | Workarounds: |
||
19 | (#) For AHB & APB peripherals, a dummy read to the peripheral register has been |
||
20 | inserted in each LL_{BUS}_GRP{x}_EnableClock() function. |
||
21 | |||
22 | @endverbatim |
||
23 | ****************************************************************************** |
||
24 | * @attention |
||
25 | * |
||
26 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
||
27 | * |
||
28 | * Redistribution and use in source and binary forms, with or without modification, |
||
29 | * are permitted provided that the following conditions are met: |
||
30 | * 1. Redistributions of source code must retain the above copyright notice, |
||
31 | * this list of conditions and the following disclaimer. |
||
32 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
||
33 | * this list of conditions and the following disclaimer in the documentation |
||
34 | * and/or other materials provided with the distribution. |
||
35 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
||
36 | * may be used to endorse or promote products derived from this software |
||
37 | * without specific prior written permission. |
||
38 | * |
||
39 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||
40 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||
42 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
||
43 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
||
44 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||
45 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
||
46 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||
47 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||
48 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
49 | * |
||
50 | ****************************************************************************** |
||
51 | */ |
||
52 | |||
53 | /* Define to prevent recursive inclusion -------------------------------------*/ |
||
54 | #ifndef __STM32F1xx_LL_BUS_H |
||
55 | #define __STM32F1xx_LL_BUS_H |
||
56 | |||
57 | #ifdef __cplusplus |
||
58 | extern "C" { |
||
59 | #endif |
||
60 | |||
61 | /* Includes ------------------------------------------------------------------*/ |
||
62 | #include "stm32f1xx.h" |
||
63 | |||
64 | /** @addtogroup STM32F1xx_LL_Driver |
||
65 | * @{ |
||
66 | */ |
||
67 | |||
68 | #if defined(RCC) |
||
69 | |||
70 | /** @defgroup BUS_LL BUS |
||
71 | * @{ |
||
72 | */ |
||
73 | |||
74 | /* Private types -------------------------------------------------------------*/ |
||
75 | /* Private variables ---------------------------------------------------------*/ |
||
76 | |||
77 | /* Private constants ---------------------------------------------------------*/ |
||
78 | #if defined(RCC_AHBRSTR_OTGFSRST) || defined(RCC_AHBRSTR_ETHMACRST) |
||
79 | #define RCC_AHBRSTR_SUPPORT |
||
80 | #endif /* RCC_AHBRSTR_OTGFSRST || RCC_AHBRSTR_ETHMACRST */ |
||
81 | |||
82 | /* Private macros ------------------------------------------------------------*/ |
||
83 | |||
84 | /* Exported types ------------------------------------------------------------*/ |
||
85 | /* Exported constants --------------------------------------------------------*/ |
||
86 | /** @defgroup BUS_LL_Exported_Constants BUS Exported Constants |
||
87 | * @{ |
||
88 | */ |
||
89 | |||
90 | /** @defgroup BUS_LL_EC_AHB1_GRP1_PERIPH AHB1 GRP1 PERIPH |
||
91 | * @{ |
||
92 | */ |
||
93 | #define LL_AHB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
||
94 | #define LL_AHB1_GRP1_PERIPH_CRC RCC_AHBENR_CRCEN |
||
95 | #define LL_AHB1_GRP1_PERIPH_DMA1 RCC_AHBENR_DMA1EN |
||
96 | #if defined(DMA2) |
||
97 | #define LL_AHB1_GRP1_PERIPH_DMA2 RCC_AHBENR_DMA2EN |
||
98 | #endif /*DMA2*/ |
||
99 | #if defined(ETH) |
||
100 | #define LL_AHB1_GRP1_PERIPH_ETHMAC RCC_AHBENR_ETHMACEN |
||
101 | #define LL_AHB1_GRP1_PERIPH_ETHMACRX RCC_AHBENR_ETHMACRXEN |
||
102 | #define LL_AHB1_GRP1_PERIPH_ETHMACTX RCC_AHBENR_ETHMACTXEN |
||
103 | #endif /*ETH*/ |
||
104 | #define LL_AHB1_GRP1_PERIPH_FLASH RCC_AHBENR_FLITFEN |
||
105 | #if defined(FSMC_Bank1) |
||
106 | #define LL_AHB1_GRP1_PERIPH_FSMC RCC_AHBENR_FSMCEN |
||
107 | #endif /*FSMC_Bank1*/ |
||
108 | #if defined(USB_OTG_FS) |
||
109 | #define LL_AHB1_GRP1_PERIPH_OTGFS RCC_AHBENR_OTGFSEN |
||
110 | #endif /*USB_OTG_FS*/ |
||
111 | #if defined(SDIO) |
||
112 | #define LL_AHB1_GRP1_PERIPH_SDIO RCC_AHBENR_SDIOEN |
||
113 | #endif /*SDIO*/ |
||
114 | #define LL_AHB1_GRP1_PERIPH_SRAM RCC_AHBENR_SRAMEN |
||
115 | /** |
||
116 | * @} |
||
117 | */ |
||
118 | |||
119 | /** @defgroup BUS_LL_EC_APB1_GRP1_PERIPH APB1 GRP1 PERIPH |
||
120 | * @{ |
||
121 | */ |
||
122 | #define LL_APB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
||
123 | #define LL_APB1_GRP1_PERIPH_BKP RCC_APB1ENR_BKPEN |
||
124 | #if defined(CAN1) |
||
125 | #define LL_APB1_GRP1_PERIPH_CAN1 RCC_APB1ENR_CAN1EN |
||
126 | #endif /*CAN1*/ |
||
127 | #if defined(CAN2) |
||
128 | #define LL_APB1_GRP1_PERIPH_CAN2 RCC_APB1ENR_CAN2EN |
||
129 | #endif /*CAN2*/ |
||
130 | #if defined(CEC) |
||
131 | #define LL_APB1_GRP1_PERIPH_CEC RCC_APB1ENR_CECEN |
||
132 | #endif /*CEC*/ |
||
133 | #if defined(DAC) |
||
134 | #define LL_APB1_GRP1_PERIPH_DAC1 RCC_APB1ENR_DACEN |
||
135 | #endif /*DAC*/ |
||
136 | #define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1ENR_I2C1EN |
||
137 | #if defined(I2C2) |
||
138 | #define LL_APB1_GRP1_PERIPH_I2C2 RCC_APB1ENR_I2C2EN |
||
139 | #endif /*I2C2*/ |
||
140 | #define LL_APB1_GRP1_PERIPH_PWR RCC_APB1ENR_PWREN |
||
141 | #if defined(SPI2) |
||
142 | #define LL_APB1_GRP1_PERIPH_SPI2 RCC_APB1ENR_SPI2EN |
||
143 | #endif /*SPI2*/ |
||
144 | #if defined(SPI3) |
||
145 | #define LL_APB1_GRP1_PERIPH_SPI3 RCC_APB1ENR_SPI3EN |
||
146 | #endif /*SPI3*/ |
||
147 | #if defined(TIM12) |
||
148 | #define LL_APB1_GRP1_PERIPH_TIM12 RCC_APB1ENR_TIM12EN |
||
149 | #endif /*TIM12*/ |
||
150 | #if defined(TIM13) |
||
151 | #define LL_APB1_GRP1_PERIPH_TIM13 RCC_APB1ENR_TIM13EN |
||
152 | #endif /*TIM13*/ |
||
153 | #if defined(TIM14) |
||
154 | #define LL_APB1_GRP1_PERIPH_TIM14 RCC_APB1ENR_TIM14EN |
||
155 | #endif /*TIM14*/ |
||
156 | #define LL_APB1_GRP1_PERIPH_TIM2 RCC_APB1ENR_TIM2EN |
||
157 | #define LL_APB1_GRP1_PERIPH_TIM3 RCC_APB1ENR_TIM3EN |
||
158 | #if defined(TIM4) |
||
159 | #define LL_APB1_GRP1_PERIPH_TIM4 RCC_APB1ENR_TIM4EN |
||
160 | #endif /*TIM4*/ |
||
161 | #if defined(TIM5) |
||
162 | #define LL_APB1_GRP1_PERIPH_TIM5 RCC_APB1ENR_TIM5EN |
||
163 | #endif /*TIM5*/ |
||
164 | #if defined(TIM6) |
||
165 | #define LL_APB1_GRP1_PERIPH_TIM6 RCC_APB1ENR_TIM6EN |
||
166 | #endif /*TIM6*/ |
||
167 | #if defined(TIM7) |
||
168 | #define LL_APB1_GRP1_PERIPH_TIM7 RCC_APB1ENR_TIM7EN |
||
169 | #endif /*TIM7*/ |
||
170 | #if defined(UART4) |
||
171 | #define LL_APB1_GRP1_PERIPH_UART4 RCC_APB1ENR_UART4EN |
||
172 | #endif /*UART4*/ |
||
173 | #if defined(UART5) |
||
174 | #define LL_APB1_GRP1_PERIPH_UART5 RCC_APB1ENR_UART5EN |
||
175 | #endif /*UART5*/ |
||
176 | #define LL_APB1_GRP1_PERIPH_USART2 RCC_APB1ENR_USART2EN |
||
177 | #if defined(USART3) |
||
178 | #define LL_APB1_GRP1_PERIPH_USART3 RCC_APB1ENR_USART3EN |
||
179 | #endif /*USART3*/ |
||
180 | #if defined(USB) |
||
181 | #define LL_APB1_GRP1_PERIPH_USB RCC_APB1ENR_USBEN |
||
182 | #endif /*USB*/ |
||
183 | #define LL_APB1_GRP1_PERIPH_WWDG RCC_APB1ENR_WWDGEN |
||
184 | /** |
||
185 | * @} |
||
186 | */ |
||
187 | |||
188 | /** @defgroup BUS_LL_EC_APB2_GRP1_PERIPH APB2 GRP1 PERIPH |
||
189 | * @{ |
||
190 | */ |
||
191 | #define LL_APB2_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
||
192 | #define LL_APB2_GRP1_PERIPH_ADC1 RCC_APB2ENR_ADC1EN |
||
193 | #if defined(ADC2) |
||
194 | #define LL_APB2_GRP1_PERIPH_ADC2 RCC_APB2ENR_ADC2EN |
||
195 | #endif /*ADC2*/ |
||
196 | #if defined(ADC3) |
||
197 | #define LL_APB2_GRP1_PERIPH_ADC3 RCC_APB2ENR_ADC3EN |
||
198 | #endif /*ADC3*/ |
||
199 | #define LL_APB2_GRP1_PERIPH_AFIO RCC_APB2ENR_AFIOEN |
||
200 | #define LL_APB2_GRP1_PERIPH_GPIOA RCC_APB2ENR_IOPAEN |
||
201 | #define LL_APB2_GRP1_PERIPH_GPIOB RCC_APB2ENR_IOPBEN |
||
202 | #define LL_APB2_GRP1_PERIPH_GPIOC RCC_APB2ENR_IOPCEN |
||
203 | #define LL_APB2_GRP1_PERIPH_GPIOD RCC_APB2ENR_IOPDEN |
||
204 | #if defined(GPIOE) |
||
205 | #define LL_APB2_GRP1_PERIPH_GPIOE RCC_APB2ENR_IOPEEN |
||
206 | #endif /*GPIOE*/ |
||
207 | #if defined(GPIOF) |
||
208 | #define LL_APB2_GRP1_PERIPH_GPIOF RCC_APB2ENR_IOPFEN |
||
209 | #endif /*GPIOF*/ |
||
210 | #if defined(GPIOG) |
||
211 | #define LL_APB2_GRP1_PERIPH_GPIOG RCC_APB2ENR_IOPGEN |
||
212 | #endif /*GPIOG*/ |
||
213 | #define LL_APB2_GRP1_PERIPH_SPI1 RCC_APB2ENR_SPI1EN |
||
214 | #if defined(TIM10) |
||
215 | #define LL_APB2_GRP1_PERIPH_TIM10 RCC_APB2ENR_TIM10EN |
||
216 | #endif /*TIM10*/ |
||
217 | #if defined(TIM11) |
||
218 | #define LL_APB2_GRP1_PERIPH_TIM11 RCC_APB2ENR_TIM11EN |
||
219 | #endif /*TIM11*/ |
||
220 | #if defined(TIM15) |
||
221 | #define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN |
||
222 | #endif /*TIM15*/ |
||
223 | #if defined(TIM16) |
||
224 | #define LL_APB2_GRP1_PERIPH_TIM16 RCC_APB2ENR_TIM16EN |
||
225 | #endif /*TIM16*/ |
||
226 | #if defined(TIM17) |
||
227 | #define LL_APB2_GRP1_PERIPH_TIM17 RCC_APB2ENR_TIM17EN |
||
228 | #endif /*TIM17*/ |
||
229 | #define LL_APB2_GRP1_PERIPH_TIM1 RCC_APB2ENR_TIM1EN |
||
230 | #if defined(TIM8) |
||
231 | #define LL_APB2_GRP1_PERIPH_TIM8 RCC_APB2ENR_TIM8EN |
||
232 | #endif /*TIM8*/ |
||
233 | #if defined(TIM9) |
||
234 | #define LL_APB2_GRP1_PERIPH_TIM9 RCC_APB2ENR_TIM9EN |
||
235 | #endif /*TIM9*/ |
||
236 | #define LL_APB2_GRP1_PERIPH_USART1 RCC_APB2ENR_USART1EN |
||
237 | /** |
||
238 | * @} |
||
239 | */ |
||
240 | |||
241 | /** |
||
242 | * @} |
||
243 | */ |
||
244 | |||
245 | /* Exported macro ------------------------------------------------------------*/ |
||
246 | |||
247 | /* Exported functions --------------------------------------------------------*/ |
||
248 | /** @defgroup BUS_LL_Exported_Functions BUS Exported Functions |
||
249 | * @{ |
||
250 | */ |
||
251 | |||
252 | /** @defgroup BUS_LL_EF_AHB1 AHB1 |
||
253 | * @{ |
||
254 | */ |
||
255 | |||
256 | /** |
||
257 | * @brief Enable AHB1 peripherals clock. |
||
258 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_EnableClock\n |
||
259 | * AHBENR DMA1EN LL_AHB1_GRP1_EnableClock\n |
||
260 | * AHBENR DMA2EN LL_AHB1_GRP1_EnableClock\n |
||
261 | * AHBENR ETHMACEN LL_AHB1_GRP1_EnableClock\n |
||
262 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_EnableClock\n |
||
263 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_EnableClock\n |
||
264 | * AHBENR FLITFEN LL_AHB1_GRP1_EnableClock\n |
||
265 | * AHBENR FSMCEN LL_AHB1_GRP1_EnableClock\n |
||
266 | * AHBENR OTGFSEN LL_AHB1_GRP1_EnableClock\n |
||
267 | * AHBENR SDIOEN LL_AHB1_GRP1_EnableClock\n |
||
268 | * AHBENR SRAMEN LL_AHB1_GRP1_EnableClock |
||
269 | * @param Periphs This parameter can be a combination of the following values: |
||
270 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
||
271 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
||
272 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
||
273 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
||
274 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
||
275 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
||
276 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
||
277 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
||
278 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
||
279 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
||
280 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
||
281 | * |
||
282 | * (*) value not defined in all devices. |
||
283 | * @retval None |
||
284 | */ |
||
285 | __STATIC_INLINE void LL_AHB1_GRP1_EnableClock(uint32_t Periphs) |
||
286 | { |
||
287 | __IO uint32_t tmpreg; |
||
288 | SET_BIT(RCC->AHBENR, Periphs); |
||
289 | /* Delay after an RCC peripheral clock enabling */ |
||
290 | tmpreg = READ_BIT(RCC->AHBENR, Periphs); |
||
291 | (void)tmpreg; |
||
292 | } |
||
293 | |||
294 | /** |
||
295 | * @brief Check if AHB1 peripheral clock is enabled or not |
||
296 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_IsEnabledClock\n |
||
297 | * AHBENR DMA1EN LL_AHB1_GRP1_IsEnabledClock\n |
||
298 | * AHBENR DMA2EN LL_AHB1_GRP1_IsEnabledClock\n |
||
299 | * AHBENR ETHMACEN LL_AHB1_GRP1_IsEnabledClock\n |
||
300 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_IsEnabledClock\n |
||
301 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_IsEnabledClock\n |
||
302 | * AHBENR FLITFEN LL_AHB1_GRP1_IsEnabledClock\n |
||
303 | * AHBENR FSMCEN LL_AHB1_GRP1_IsEnabledClock\n |
||
304 | * AHBENR OTGFSEN LL_AHB1_GRP1_IsEnabledClock\n |
||
305 | * AHBENR SDIOEN LL_AHB1_GRP1_IsEnabledClock\n |
||
306 | * AHBENR SRAMEN LL_AHB1_GRP1_IsEnabledClock |
||
307 | * @param Periphs This parameter can be a combination of the following values: |
||
308 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
||
309 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
||
310 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
||
311 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
||
312 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
||
313 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
||
314 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
||
315 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
||
316 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
||
317 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
||
318 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
||
319 | * |
||
320 | * (*) value not defined in all devices. |
||
321 | * @retval State of Periphs (1 or 0). |
||
322 | */ |
||
323 | __STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) |
||
324 | { |
||
325 | return (READ_BIT(RCC->AHBENR, Periphs) == Periphs); |
||
326 | } |
||
327 | |||
328 | /** |
||
329 | * @brief Disable AHB1 peripherals clock. |
||
330 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_DisableClock\n |
||
331 | * AHBENR DMA1EN LL_AHB1_GRP1_DisableClock\n |
||
332 | * AHBENR DMA2EN LL_AHB1_GRP1_DisableClock\n |
||
333 | * AHBENR ETHMACEN LL_AHB1_GRP1_DisableClock\n |
||
334 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_DisableClock\n |
||
335 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_DisableClock\n |
||
336 | * AHBENR FLITFEN LL_AHB1_GRP1_DisableClock\n |
||
337 | * AHBENR FSMCEN LL_AHB1_GRP1_DisableClock\n |
||
338 | * AHBENR OTGFSEN LL_AHB1_GRP1_DisableClock\n |
||
339 | * AHBENR SDIOEN LL_AHB1_GRP1_DisableClock\n |
||
340 | * AHBENR SRAMEN LL_AHB1_GRP1_DisableClock |
||
341 | * @param Periphs This parameter can be a combination of the following values: |
||
342 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
||
343 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
||
344 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
||
345 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
||
346 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
||
347 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
||
348 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
||
349 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
||
350 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
||
351 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
||
352 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
||
353 | * |
||
354 | * (*) value not defined in all devices. |
||
355 | * @retval None |
||
356 | */ |
||
357 | __STATIC_INLINE void LL_AHB1_GRP1_DisableClock(uint32_t Periphs) |
||
358 | { |
||
359 | CLEAR_BIT(RCC->AHBENR, Periphs); |
||
360 | } |
||
361 | |||
362 | #if defined(RCC_AHBRSTR_SUPPORT) |
||
363 | /** |
||
364 | * @brief Force AHB1 peripherals reset. |
||
365 | * @rmtoll AHBRSTR ETHMACRST LL_AHB1_GRP1_ForceReset\n |
||
366 | * AHBRSTR OTGFSRST LL_AHB1_GRP1_ForceReset |
||
367 | * @param Periphs This parameter can be a combination of the following values: |
||
368 | * @arg @ref LL_AHB1_GRP1_PERIPH_ALL |
||
369 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
||
370 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
||
371 | * |
||
372 | * (*) value not defined in all devices. |
||
373 | * @retval None |
||
374 | */ |
||
375 | __STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs) |
||
376 | { |
||
377 | SET_BIT(RCC->AHBRSTR, Periphs); |
||
378 | } |
||
379 | |||
380 | /** |
||
381 | * @brief Release AHB1 peripherals reset. |
||
382 | * @rmtoll AHBRSTR ETHMACRST LL_AHB1_GRP1_ReleaseReset\n |
||
383 | * AHBRSTR OTGFSRST LL_AHB1_GRP1_ReleaseReset |
||
384 | * @param Periphs This parameter can be a combination of the following values: |
||
385 | * @arg @ref LL_AHB1_GRP1_PERIPH_ALL |
||
386 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
||
387 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
||
388 | * |
||
389 | * (*) value not defined in all devices. |
||
390 | * @retval None |
||
391 | */ |
||
392 | __STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs) |
||
393 | { |
||
394 | CLEAR_BIT(RCC->AHBRSTR, Periphs); |
||
395 | } |
||
396 | #endif /* RCC_AHBRSTR_SUPPORT */ |
||
397 | |||
398 | /** |
||
399 | * @} |
||
400 | */ |
||
401 | |||
402 | /** @defgroup BUS_LL_EF_APB1 APB1 |
||
403 | * @{ |
||
404 | */ |
||
405 | |||
406 | /** |
||
407 | * @brief Enable APB1 peripherals clock. |
||
408 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_EnableClock\n |
||
409 | * APB1ENR CAN1EN LL_APB1_GRP1_EnableClock\n |
||
410 | * APB1ENR CAN2EN LL_APB1_GRP1_EnableClock\n |
||
411 | * APB1ENR CECEN LL_APB1_GRP1_EnableClock\n |
||
412 | * APB1ENR DACEN LL_APB1_GRP1_EnableClock\n |
||
413 | * APB1ENR I2C1EN LL_APB1_GRP1_EnableClock\n |
||
414 | * APB1ENR I2C2EN LL_APB1_GRP1_EnableClock\n |
||
415 | * APB1ENR PWREN LL_APB1_GRP1_EnableClock\n |
||
416 | * APB1ENR SPI2EN LL_APB1_GRP1_EnableClock\n |
||
417 | * APB1ENR SPI3EN LL_APB1_GRP1_EnableClock\n |
||
418 | * APB1ENR TIM12EN LL_APB1_GRP1_EnableClock\n |
||
419 | * APB1ENR TIM13EN LL_APB1_GRP1_EnableClock\n |
||
420 | * APB1ENR TIM14EN LL_APB1_GRP1_EnableClock\n |
||
421 | * APB1ENR TIM2EN LL_APB1_GRP1_EnableClock\n |
||
422 | * APB1ENR TIM3EN LL_APB1_GRP1_EnableClock\n |
||
423 | * APB1ENR TIM4EN LL_APB1_GRP1_EnableClock\n |
||
424 | * APB1ENR TIM5EN LL_APB1_GRP1_EnableClock\n |
||
425 | * APB1ENR TIM6EN LL_APB1_GRP1_EnableClock\n |
||
426 | * APB1ENR TIM7EN LL_APB1_GRP1_EnableClock\n |
||
427 | * APB1ENR UART4EN LL_APB1_GRP1_EnableClock\n |
||
428 | * APB1ENR UART5EN LL_APB1_GRP1_EnableClock\n |
||
429 | * APB1ENR USART2EN LL_APB1_GRP1_EnableClock\n |
||
430 | * APB1ENR USART3EN LL_APB1_GRP1_EnableClock\n |
||
431 | * APB1ENR USBEN LL_APB1_GRP1_EnableClock\n |
||
432 | * APB1ENR WWDGEN LL_APB1_GRP1_EnableClock |
||
433 | * @param Periphs This parameter can be a combination of the following values: |
||
434 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
||
435 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
||
436 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
||
437 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
||
438 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
||
439 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
||
440 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
||
441 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
||
442 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
||
443 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
||
444 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
||
445 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
||
446 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
||
447 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
||
448 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
||
449 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
||
450 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
||
451 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
||
452 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
||
453 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
||
454 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
||
455 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
||
456 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
||
457 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
||
458 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
||
459 | * |
||
460 | * (*) value not defined in all devices. |
||
461 | * @retval None |
||
462 | */ |
||
463 | __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) |
||
464 | { |
||
465 | __IO uint32_t tmpreg; |
||
466 | SET_BIT(RCC->APB1ENR, Periphs); |
||
467 | /* Delay after an RCC peripheral clock enabling */ |
||
468 | tmpreg = READ_BIT(RCC->APB1ENR, Periphs); |
||
469 | (void)tmpreg; |
||
470 | } |
||
471 | |||
472 | /** |
||
473 | * @brief Check if APB1 peripheral clock is enabled or not |
||
474 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_IsEnabledClock\n |
||
475 | * APB1ENR CAN1EN LL_APB1_GRP1_IsEnabledClock\n |
||
476 | * APB1ENR CAN2EN LL_APB1_GRP1_IsEnabledClock\n |
||
477 | * APB1ENR CECEN LL_APB1_GRP1_IsEnabledClock\n |
||
478 | * APB1ENR DACEN LL_APB1_GRP1_IsEnabledClock\n |
||
479 | * APB1ENR I2C1EN LL_APB1_GRP1_IsEnabledClock\n |
||
480 | * APB1ENR I2C2EN LL_APB1_GRP1_IsEnabledClock\n |
||
481 | * APB1ENR PWREN LL_APB1_GRP1_IsEnabledClock\n |
||
482 | * APB1ENR SPI2EN LL_APB1_GRP1_IsEnabledClock\n |
||
483 | * APB1ENR SPI3EN LL_APB1_GRP1_IsEnabledClock\n |
||
484 | * APB1ENR TIM12EN LL_APB1_GRP1_IsEnabledClock\n |
||
485 | * APB1ENR TIM13EN LL_APB1_GRP1_IsEnabledClock\n |
||
486 | * APB1ENR TIM14EN LL_APB1_GRP1_IsEnabledClock\n |
||
487 | * APB1ENR TIM2EN LL_APB1_GRP1_IsEnabledClock\n |
||
488 | * APB1ENR TIM3EN LL_APB1_GRP1_IsEnabledClock\n |
||
489 | * APB1ENR TIM4EN LL_APB1_GRP1_IsEnabledClock\n |
||
490 | * APB1ENR TIM5EN LL_APB1_GRP1_IsEnabledClock\n |
||
491 | * APB1ENR TIM6EN LL_APB1_GRP1_IsEnabledClock\n |
||
492 | * APB1ENR TIM7EN LL_APB1_GRP1_IsEnabledClock\n |
||
493 | * APB1ENR UART4EN LL_APB1_GRP1_IsEnabledClock\n |
||
494 | * APB1ENR UART5EN LL_APB1_GRP1_IsEnabledClock\n |
||
495 | * APB1ENR USART2EN LL_APB1_GRP1_IsEnabledClock\n |
||
496 | * APB1ENR USART3EN LL_APB1_GRP1_IsEnabledClock\n |
||
497 | * APB1ENR USBEN LL_APB1_GRP1_IsEnabledClock\n |
||
498 | * APB1ENR WWDGEN LL_APB1_GRP1_IsEnabledClock |
||
499 | * @param Periphs This parameter can be a combination of the following values: |
||
500 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
||
501 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
||
502 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
||
503 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
||
504 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
||
505 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
||
506 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
||
507 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
||
508 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
||
509 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
||
510 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
||
511 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
||
512 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
||
513 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
||
514 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
||
515 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
||
516 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
||
517 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
||
518 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
||
519 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
||
520 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
||
521 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
||
522 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
||
523 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
||
524 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
||
525 | * |
||
526 | * (*) value not defined in all devices. |
||
527 | * @retval State of Periphs (1 or 0). |
||
528 | */ |
||
529 | __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs) |
||
530 | { |
||
531 | return (READ_BIT(RCC->APB1ENR, Periphs) == Periphs); |
||
532 | } |
||
533 | |||
534 | /** |
||
535 | * @brief Disable APB1 peripherals clock. |
||
536 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_DisableClock\n |
||
537 | * APB1ENR CAN1EN LL_APB1_GRP1_DisableClock\n |
||
538 | * APB1ENR CAN2EN LL_APB1_GRP1_DisableClock\n |
||
539 | * APB1ENR CECEN LL_APB1_GRP1_DisableClock\n |
||
540 | * APB1ENR DACEN LL_APB1_GRP1_DisableClock\n |
||
541 | * APB1ENR I2C1EN LL_APB1_GRP1_DisableClock\n |
||
542 | * APB1ENR I2C2EN LL_APB1_GRP1_DisableClock\n |
||
543 | * APB1ENR PWREN LL_APB1_GRP1_DisableClock\n |
||
544 | * APB1ENR SPI2EN LL_APB1_GRP1_DisableClock\n |
||
545 | * APB1ENR SPI3EN LL_APB1_GRP1_DisableClock\n |
||
546 | * APB1ENR TIM12EN LL_APB1_GRP1_DisableClock\n |
||
547 | * APB1ENR TIM13EN LL_APB1_GRP1_DisableClock\n |
||
548 | * APB1ENR TIM14EN LL_APB1_GRP1_DisableClock\n |
||
549 | * APB1ENR TIM2EN LL_APB1_GRP1_DisableClock\n |
||
550 | * APB1ENR TIM3EN LL_APB1_GRP1_DisableClock\n |
||
551 | * APB1ENR TIM4EN LL_APB1_GRP1_DisableClock\n |
||
552 | * APB1ENR TIM5EN LL_APB1_GRP1_DisableClock\n |
||
553 | * APB1ENR TIM6EN LL_APB1_GRP1_DisableClock\n |
||
554 | * APB1ENR TIM7EN LL_APB1_GRP1_DisableClock\n |
||
555 | * APB1ENR UART4EN LL_APB1_GRP1_DisableClock\n |
||
556 | * APB1ENR UART5EN LL_APB1_GRP1_DisableClock\n |
||
557 | * APB1ENR USART2EN LL_APB1_GRP1_DisableClock\n |
||
558 | * APB1ENR USART3EN LL_APB1_GRP1_DisableClock\n |
||
559 | * APB1ENR USBEN LL_APB1_GRP1_DisableClock\n |
||
560 | * APB1ENR WWDGEN LL_APB1_GRP1_DisableClock |
||
561 | * @param Periphs This parameter can be a combination of the following values: |
||
562 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
||
563 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
||
564 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
||
565 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
||
566 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
||
567 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
||
568 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
||
569 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
||
570 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
||
571 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
||
572 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
||
573 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
||
574 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
||
575 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
||
576 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
||
577 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
||
578 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
||
579 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
||
580 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
||
581 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
||
582 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
||
583 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
||
584 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
||
585 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
||
586 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
||
587 | * |
||
588 | * (*) value not defined in all devices. |
||
589 | * @retval None |
||
590 | */ |
||
591 | __STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs) |
||
592 | { |
||
593 | CLEAR_BIT(RCC->APB1ENR, Periphs); |
||
594 | } |
||
595 | |||
596 | /** |
||
597 | * @brief Force APB1 peripherals reset. |
||
598 | * @rmtoll APB1RSTR BKPRST LL_APB1_GRP1_ForceReset\n |
||
599 | * APB1RSTR CAN1RST LL_APB1_GRP1_ForceReset\n |
||
600 | * APB1RSTR CAN2RST LL_APB1_GRP1_ForceReset\n |
||
601 | * APB1RSTR CECRST LL_APB1_GRP1_ForceReset\n |
||
602 | * APB1RSTR DACRST LL_APB1_GRP1_ForceReset\n |
||
603 | * APB1RSTR I2C1RST LL_APB1_GRP1_ForceReset\n |
||
604 | * APB1RSTR I2C2RST LL_APB1_GRP1_ForceReset\n |
||
605 | * APB1RSTR PWRRST LL_APB1_GRP1_ForceReset\n |
||
606 | * APB1RSTR SPI2RST LL_APB1_GRP1_ForceReset\n |
||
607 | * APB1RSTR SPI3RST LL_APB1_GRP1_ForceReset\n |
||
608 | * APB1RSTR TIM12RST LL_APB1_GRP1_ForceReset\n |
||
609 | * APB1RSTR TIM13RST LL_APB1_GRP1_ForceReset\n |
||
610 | * APB1RSTR TIM14RST LL_APB1_GRP1_ForceReset\n |
||
611 | * APB1RSTR TIM2RST LL_APB1_GRP1_ForceReset\n |
||
612 | * APB1RSTR TIM3RST LL_APB1_GRP1_ForceReset\n |
||
613 | * APB1RSTR TIM4RST LL_APB1_GRP1_ForceReset\n |
||
614 | * APB1RSTR TIM5RST LL_APB1_GRP1_ForceReset\n |
||
615 | * APB1RSTR TIM6RST LL_APB1_GRP1_ForceReset\n |
||
616 | * APB1RSTR TIM7RST LL_APB1_GRP1_ForceReset\n |
||
617 | * APB1RSTR UART4RST LL_APB1_GRP1_ForceReset\n |
||
618 | * APB1RSTR UART5RST LL_APB1_GRP1_ForceReset\n |
||
619 | * APB1RSTR USART2RST LL_APB1_GRP1_ForceReset\n |
||
620 | * APB1RSTR USART3RST LL_APB1_GRP1_ForceReset\n |
||
621 | * APB1RSTR USBRST LL_APB1_GRP1_ForceReset\n |
||
622 | * APB1RSTR WWDGRST LL_APB1_GRP1_ForceReset |
||
623 | * @param Periphs This parameter can be a combination of the following values: |
||
624 | * @arg @ref LL_APB1_GRP1_PERIPH_ALL |
||
625 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
||
626 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
||
627 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
||
628 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
||
629 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
||
630 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
||
631 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
||
632 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
||
633 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
||
634 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
||
635 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
||
636 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
||
637 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
||
638 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
||
639 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
||
640 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
||
641 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
||
642 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
||
643 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
||
644 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
||
645 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
||
646 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
||
647 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
||
648 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
||
649 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
||
650 | * |
||
651 | * (*) value not defined in all devices. |
||
652 | * @retval None |
||
653 | */ |
||
654 | __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs) |
||
655 | { |
||
656 | SET_BIT(RCC->APB1RSTR, Periphs); |
||
657 | } |
||
658 | |||
659 | /** |
||
660 | * @brief Release APB1 peripherals reset. |
||
661 | * @rmtoll APB1RSTR BKPRST LL_APB1_GRP1_ReleaseReset\n |
||
662 | * APB1RSTR CAN1RST LL_APB1_GRP1_ReleaseReset\n |
||
663 | * APB1RSTR CAN2RST LL_APB1_GRP1_ReleaseReset\n |
||
664 | * APB1RSTR CECRST LL_APB1_GRP1_ReleaseReset\n |
||
665 | * APB1RSTR DACRST LL_APB1_GRP1_ReleaseReset\n |
||
666 | * APB1RSTR I2C1RST LL_APB1_GRP1_ReleaseReset\n |
||
667 | * APB1RSTR I2C2RST LL_APB1_GRP1_ReleaseReset\n |
||
668 | * APB1RSTR PWRRST LL_APB1_GRP1_ReleaseReset\n |
||
669 | * APB1RSTR SPI2RST LL_APB1_GRP1_ReleaseReset\n |
||
670 | * APB1RSTR SPI3RST LL_APB1_GRP1_ReleaseReset\n |
||
671 | * APB1RSTR TIM12RST LL_APB1_GRP1_ReleaseReset\n |
||
672 | * APB1RSTR TIM13RST LL_APB1_GRP1_ReleaseReset\n |
||
673 | * APB1RSTR TIM14RST LL_APB1_GRP1_ReleaseReset\n |
||
674 | * APB1RSTR TIM2RST LL_APB1_GRP1_ReleaseReset\n |
||
675 | * APB1RSTR TIM3RST LL_APB1_GRP1_ReleaseReset\n |
||
676 | * APB1RSTR TIM4RST LL_APB1_GRP1_ReleaseReset\n |
||
677 | * APB1RSTR TIM5RST LL_APB1_GRP1_ReleaseReset\n |
||
678 | * APB1RSTR TIM6RST LL_APB1_GRP1_ReleaseReset\n |
||
679 | * APB1RSTR TIM7RST LL_APB1_GRP1_ReleaseReset\n |
||
680 | * APB1RSTR UART4RST LL_APB1_GRP1_ReleaseReset\n |
||
681 | * APB1RSTR UART5RST LL_APB1_GRP1_ReleaseReset\n |
||
682 | * APB1RSTR USART2RST LL_APB1_GRP1_ReleaseReset\n |
||
683 | * APB1RSTR USART3RST LL_APB1_GRP1_ReleaseReset\n |
||
684 | * APB1RSTR USBRST LL_APB1_GRP1_ReleaseReset\n |
||
685 | * APB1RSTR WWDGRST LL_APB1_GRP1_ReleaseReset |
||
686 | * @param Periphs This parameter can be a combination of the following values: |
||
687 | * @arg @ref LL_APB1_GRP1_PERIPH_ALL |
||
688 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
||
689 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
||
690 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
||
691 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
||
692 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
||
693 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
||
694 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
||
695 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
||
696 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
||
697 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
||
698 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
||
699 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
||
700 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
||
701 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
||
702 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
||
703 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
||
704 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
||
705 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
||
706 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
||
707 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
||
708 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
||
709 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
||
710 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
||
711 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
||
712 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
||
713 | * |
||
714 | * (*) value not defined in all devices. |
||
715 | * @retval None |
||
716 | */ |
||
717 | __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs) |
||
718 | { |
||
719 | CLEAR_BIT(RCC->APB1RSTR, Periphs); |
||
720 | } |
||
721 | |||
722 | /** |
||
723 | * @} |
||
724 | */ |
||
725 | |||
726 | /** @defgroup BUS_LL_EF_APB2 APB2 |
||
727 | * @{ |
||
728 | */ |
||
729 | |||
730 | /** |
||
731 | * @brief Enable APB2 peripherals clock. |
||
732 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_EnableClock\n |
||
733 | * APB2ENR ADC2EN LL_APB2_GRP1_EnableClock\n |
||
734 | * APB2ENR ADC3EN LL_APB2_GRP1_EnableClock\n |
||
735 | * APB2ENR AFIOEN LL_APB2_GRP1_EnableClock\n |
||
736 | * APB2ENR IOPAEN LL_APB2_GRP1_EnableClock\n |
||
737 | * APB2ENR IOPBEN LL_APB2_GRP1_EnableClock\n |
||
738 | * APB2ENR IOPCEN LL_APB2_GRP1_EnableClock\n |
||
739 | * APB2ENR IOPDEN LL_APB2_GRP1_EnableClock\n |
||
740 | * APB2ENR IOPEEN LL_APB2_GRP1_EnableClock\n |
||
741 | * APB2ENR IOPFEN LL_APB2_GRP1_EnableClock\n |
||
742 | * APB2ENR IOPGEN LL_APB2_GRP1_EnableClock\n |
||
743 | * APB2ENR SPI1EN LL_APB2_GRP1_EnableClock\n |
||
744 | * APB2ENR TIM10EN LL_APB2_GRP1_EnableClock\n |
||
745 | * APB2ENR TIM11EN LL_APB2_GRP1_EnableClock\n |
||
746 | * APB2ENR TIM15EN LL_APB2_GRP1_EnableClock\n |
||
747 | * APB2ENR TIM16EN LL_APB2_GRP1_EnableClock\n |
||
748 | * APB2ENR TIM17EN LL_APB2_GRP1_EnableClock\n |
||
749 | * APB2ENR TIM1EN LL_APB2_GRP1_EnableClock\n |
||
750 | * APB2ENR TIM8EN LL_APB2_GRP1_EnableClock\n |
||
751 | * APB2ENR TIM9EN LL_APB2_GRP1_EnableClock\n |
||
752 | * APB2ENR USART1EN LL_APB2_GRP1_EnableClock |
||
753 | * @param Periphs This parameter can be a combination of the following values: |
||
754 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
||
755 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
||
756 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
||
757 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
||
758 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
||
759 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
||
760 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
||
761 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
||
762 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
||
763 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
||
764 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
||
765 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
||
766 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
||
767 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
||
768 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
||
769 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
||
770 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
||
771 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
||
772 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
||
773 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
||
774 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
||
775 | * |
||
776 | * (*) value not defined in all devices. |
||
777 | * @retval None |
||
778 | */ |
||
779 | __STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs) |
||
780 | { |
||
781 | __IO uint32_t tmpreg; |
||
782 | SET_BIT(RCC->APB2ENR, Periphs); |
||
783 | /* Delay after an RCC peripheral clock enabling */ |
||
784 | tmpreg = READ_BIT(RCC->APB2ENR, Periphs); |
||
785 | (void)tmpreg; |
||
786 | } |
||
787 | |||
788 | /** |
||
789 | * @brief Check if APB2 peripheral clock is enabled or not |
||
790 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_IsEnabledClock\n |
||
791 | * APB2ENR ADC2EN LL_APB2_GRP1_IsEnabledClock\n |
||
792 | * APB2ENR ADC3EN LL_APB2_GRP1_IsEnabledClock\n |
||
793 | * APB2ENR AFIOEN LL_APB2_GRP1_IsEnabledClock\n |
||
794 | * APB2ENR IOPAEN LL_APB2_GRP1_IsEnabledClock\n |
||
795 | * APB2ENR IOPBEN LL_APB2_GRP1_IsEnabledClock\n |
||
796 | * APB2ENR IOPCEN LL_APB2_GRP1_IsEnabledClock\n |
||
797 | * APB2ENR IOPDEN LL_APB2_GRP1_IsEnabledClock\n |
||
798 | * APB2ENR IOPEEN LL_APB2_GRP1_IsEnabledClock\n |
||
799 | * APB2ENR IOPFEN LL_APB2_GRP1_IsEnabledClock\n |
||
800 | * APB2ENR IOPGEN LL_APB2_GRP1_IsEnabledClock\n |
||
801 | * APB2ENR SPI1EN LL_APB2_GRP1_IsEnabledClock\n |
||
802 | * APB2ENR TIM10EN LL_APB2_GRP1_IsEnabledClock\n |
||
803 | * APB2ENR TIM11EN LL_APB2_GRP1_IsEnabledClock\n |
||
804 | * APB2ENR TIM15EN LL_APB2_GRP1_IsEnabledClock\n |
||
805 | * APB2ENR TIM16EN LL_APB2_GRP1_IsEnabledClock\n |
||
806 | * APB2ENR TIM17EN LL_APB2_GRP1_IsEnabledClock\n |
||
807 | * APB2ENR TIM1EN LL_APB2_GRP1_IsEnabledClock\n |
||
808 | * APB2ENR TIM8EN LL_APB2_GRP1_IsEnabledClock\n |
||
809 | * APB2ENR TIM9EN LL_APB2_GRP1_IsEnabledClock\n |
||
810 | * APB2ENR USART1EN LL_APB2_GRP1_IsEnabledClock |
||
811 | * @param Periphs This parameter can be a combination of the following values: |
||
812 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
||
813 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
||
814 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
||
815 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
||
816 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
||
817 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
||
818 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
||
819 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
||
820 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
||
821 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
||
822 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
||
823 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
||
824 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
||
825 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
||
826 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
||
827 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
||
828 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
||
829 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
||
830 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
||
831 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
||
832 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
||
833 | * |
||
834 | * (*) value not defined in all devices. |
||
835 | * @retval State of Periphs (1 or 0). |
||
836 | */ |
||
837 | __STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs) |
||
838 | { |
||
839 | return (READ_BIT(RCC->APB2ENR, Periphs) == Periphs); |
||
840 | } |
||
841 | |||
842 | /** |
||
843 | * @brief Disable APB2 peripherals clock. |
||
844 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_DisableClock\n |
||
845 | * APB2ENR ADC2EN LL_APB2_GRP1_DisableClock\n |
||
846 | * APB2ENR ADC3EN LL_APB2_GRP1_DisableClock\n |
||
847 | * APB2ENR AFIOEN LL_APB2_GRP1_DisableClock\n |
||
848 | * APB2ENR IOPAEN LL_APB2_GRP1_DisableClock\n |
||
849 | * APB2ENR IOPBEN LL_APB2_GRP1_DisableClock\n |
||
850 | * APB2ENR IOPCEN LL_APB2_GRP1_DisableClock\n |
||
851 | * APB2ENR IOPDEN LL_APB2_GRP1_DisableClock\n |
||
852 | * APB2ENR IOPEEN LL_APB2_GRP1_DisableClock\n |
||
853 | * APB2ENR IOPFEN LL_APB2_GRP1_DisableClock\n |
||
854 | * APB2ENR IOPGEN LL_APB2_GRP1_DisableClock\n |
||
855 | * APB2ENR SPI1EN LL_APB2_GRP1_DisableClock\n |
||
856 | * APB2ENR TIM10EN LL_APB2_GRP1_DisableClock\n |
||
857 | * APB2ENR TIM11EN LL_APB2_GRP1_DisableClock\n |
||
858 | * APB2ENR TIM15EN LL_APB2_GRP1_DisableClock\n |
||
859 | * APB2ENR TIM16EN LL_APB2_GRP1_DisableClock\n |
||
860 | * APB2ENR TIM17EN LL_APB2_GRP1_DisableClock\n |
||
861 | * APB2ENR TIM1EN LL_APB2_GRP1_DisableClock\n |
||
862 | * APB2ENR TIM8EN LL_APB2_GRP1_DisableClock\n |
||
863 | * APB2ENR TIM9EN LL_APB2_GRP1_DisableClock\n |
||
864 | * APB2ENR USART1EN LL_APB2_GRP1_DisableClock |
||
865 | * @param Periphs This parameter can be a combination of the following values: |
||
866 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
||
867 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
||
868 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
||
869 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
||
870 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
||
871 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
||
872 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
||
873 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
||
874 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
||
875 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
||
876 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
||
877 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
||
878 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
||
879 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
||
880 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
||
881 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
||
882 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
||
883 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
||
884 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
||
885 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
||
886 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
||
887 | * |
||
888 | * (*) value not defined in all devices. |
||
889 | * @retval None |
||
890 | */ |
||
891 | __STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs) |
||
892 | { |
||
893 | CLEAR_BIT(RCC->APB2ENR, Periphs); |
||
894 | } |
||
895 | |||
896 | /** |
||
897 | * @brief Force APB2 peripherals reset. |
||
898 | * @rmtoll APB2RSTR ADC1RST LL_APB2_GRP1_ForceReset\n |
||
899 | * APB2RSTR ADC2RST LL_APB2_GRP1_ForceReset\n |
||
900 | * APB2RSTR ADC3RST LL_APB2_GRP1_ForceReset\n |
||
901 | * APB2RSTR AFIORST LL_APB2_GRP1_ForceReset\n |
||
902 | * APB2RSTR IOPARST LL_APB2_GRP1_ForceReset\n |
||
903 | * APB2RSTR IOPBRST LL_APB2_GRP1_ForceReset\n |
||
904 | * APB2RSTR IOPCRST LL_APB2_GRP1_ForceReset\n |
||
905 | * APB2RSTR IOPDRST LL_APB2_GRP1_ForceReset\n |
||
906 | * APB2RSTR IOPERST LL_APB2_GRP1_ForceReset\n |
||
907 | * APB2RSTR IOPFRST LL_APB2_GRP1_ForceReset\n |
||
908 | * APB2RSTR IOPGRST LL_APB2_GRP1_ForceReset\n |
||
909 | * APB2RSTR SPI1RST LL_APB2_GRP1_ForceReset\n |
||
910 | * APB2RSTR TIM10RST LL_APB2_GRP1_ForceReset\n |
||
911 | * APB2RSTR TIM11RST LL_APB2_GRP1_ForceReset\n |
||
912 | * APB2RSTR TIM15RST LL_APB2_GRP1_ForceReset\n |
||
913 | * APB2RSTR TIM16RST LL_APB2_GRP1_ForceReset\n |
||
914 | * APB2RSTR TIM17RST LL_APB2_GRP1_ForceReset\n |
||
915 | * APB2RSTR TIM1RST LL_APB2_GRP1_ForceReset\n |
||
916 | * APB2RSTR TIM8RST LL_APB2_GRP1_ForceReset\n |
||
917 | * APB2RSTR TIM9RST LL_APB2_GRP1_ForceReset\n |
||
918 | * APB2RSTR USART1RST LL_APB2_GRP1_ForceReset |
||
919 | * @param Periphs This parameter can be a combination of the following values: |
||
920 | * @arg @ref LL_APB2_GRP1_PERIPH_ALL |
||
921 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
||
922 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
||
923 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
||
924 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
||
925 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
||
926 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
||
927 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
||
928 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
||
929 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
||
930 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
||
931 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
||
932 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
||
933 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
||
934 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
||
935 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
||
936 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
||
937 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
||
938 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
||
939 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
||
940 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
||
941 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
||
942 | * |
||
943 | * (*) value not defined in all devices. |
||
944 | * @retval None |
||
945 | */ |
||
946 | __STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs) |
||
947 | { |
||
948 | SET_BIT(RCC->APB2RSTR, Periphs); |
||
949 | } |
||
950 | |||
951 | /** |
||
952 | * @brief Release APB2 peripherals reset. |
||
953 | * @rmtoll APB2RSTR ADC1RST LL_APB2_GRP1_ReleaseReset\n |
||
954 | * APB2RSTR ADC2RST LL_APB2_GRP1_ReleaseReset\n |
||
955 | * APB2RSTR ADC3RST LL_APB2_GRP1_ReleaseReset\n |
||
956 | * APB2RSTR AFIORST LL_APB2_GRP1_ReleaseReset\n |
||
957 | * APB2RSTR IOPARST LL_APB2_GRP1_ReleaseReset\n |
||
958 | * APB2RSTR IOPBRST LL_APB2_GRP1_ReleaseReset\n |
||
959 | * APB2RSTR IOPCRST LL_APB2_GRP1_ReleaseReset\n |
||
960 | * APB2RSTR IOPDRST LL_APB2_GRP1_ReleaseReset\n |
||
961 | * APB2RSTR IOPERST LL_APB2_GRP1_ReleaseReset\n |
||
962 | * APB2RSTR IOPFRST LL_APB2_GRP1_ReleaseReset\n |
||
963 | * APB2RSTR IOPGRST LL_APB2_GRP1_ReleaseReset\n |
||
964 | * APB2RSTR SPI1RST LL_APB2_GRP1_ReleaseReset\n |
||
965 | * APB2RSTR TIM10RST LL_APB2_GRP1_ReleaseReset\n |
||
966 | * APB2RSTR TIM11RST LL_APB2_GRP1_ReleaseReset\n |
||
967 | * APB2RSTR TIM15RST LL_APB2_GRP1_ReleaseReset\n |
||
968 | * APB2RSTR TIM16RST LL_APB2_GRP1_ReleaseReset\n |
||
969 | * APB2RSTR TIM17RST LL_APB2_GRP1_ReleaseReset\n |
||
970 | * APB2RSTR TIM1RST LL_APB2_GRP1_ReleaseReset\n |
||
971 | * APB2RSTR TIM8RST LL_APB2_GRP1_ReleaseReset\n |
||
972 | * APB2RSTR TIM9RST LL_APB2_GRP1_ReleaseReset\n |
||
973 | * APB2RSTR USART1RST LL_APB2_GRP1_ReleaseReset |
||
974 | * @param Periphs This parameter can be a combination of the following values: |
||
975 | * @arg @ref LL_APB2_GRP1_PERIPH_ALL |
||
976 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
||
977 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
||
978 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
||
979 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
||
980 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
||
981 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
||
982 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
||
983 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
||
984 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
||
985 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
||
986 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
||
987 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
||
988 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
||
989 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
||
990 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
||
991 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
||
992 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
||
993 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
||
994 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
||
995 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
||
996 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
||
997 | * |
||
998 | * (*) value not defined in all devices. |
||
999 | * @retval None |
||
1000 | */ |
||
1001 | __STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs) |
||
1002 | { |
||
1003 | CLEAR_BIT(RCC->APB2RSTR, Periphs); |
||
1004 | } |
||
1005 | |||
1006 | /** |
||
1007 | * @} |
||
1008 | */ |
||
1009 | |||
1010 | |||
1011 | /** |
||
1012 | * @} |
||
1013 | */ |
||
1014 | |||
1015 | /** |
||
1016 | * @} |
||
1017 | */ |
||
1018 | |||
1019 | #endif /* defined(RCC) */ |
||
1020 | |||
1021 | /** |
||
1022 | * @} |
||
1023 | */ |
||
1024 | |||
1025 | #ifdef __cplusplus |
||
1026 | } |
||
1027 | #endif |
||
1028 | |||
1029 | #endif /* __STM32F1xx_LL_BUS_H */ |
||
1030 | |||
1031 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |