1 /**
2 ******************************************************************************
3 * @file stm32h5xx_ll_exti.h
4 * @author MCD Application Team
5 * @brief Header file of EXTI LL module.
6 ******************************************************************************
7 * @attention
8 *
9 * Copyright (c) 2023 STMicroelectronics.
10 * All rights reserved.
11 *
12 * This software is licensed under terms that can be found in the LICENSE file
13 * in the root directory of this software component.
14 * If no LICENSE file comes with this software, it is provided AS-IS.
15 *
16 ******************************************************************************
17 */
18
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef STM32H5xx_LL_EXTI_H
21 #define STM32H5xx_LL_EXTI_H
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32h5xx.h"
29
30 /** @addtogroup STM32H5xx_LL_Driver
31 * @{
32 */
33
34 #if defined (EXTI)
35
36 /** @defgroup EXTI_LL EXTI
37 * @{
38 */
39
40 /* Private types -------------------------------------------------------------*/
41 /* Private variables ---------------------------------------------------------*/
42 /* Private constants ---------------------------------------------------------*/
43 #define LL_EXTI_REGISTER_PINPOS_SHFT 16U /*!< Define used to shift pin position in EXTICR register */
44
45 /* Private Macros ------------------------------------------------------------*/
46 #if defined(USE_FULL_LL_DRIVER)
47 /** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
48 * @{
49 */
50 /**
51 * @}
52 */
53 #endif /*USE_FULL_LL_DRIVER*/
54 /* Exported types ------------------------------------------------------------*/
55 #if defined(USE_FULL_LL_DRIVER)
56 /** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
57 * @{
58 */
59 typedef struct
60 {
61
62 uint32_t Line_0_31; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31
63 This parameter can be any combination of @ref EXTI_LL_EC_LINE */
64
65 uint32_t Line_32_63; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 32 to 63
66 This parameter can be any combination of @ref EXTI_LL_EC_LINE */
67
68 FunctionalState LineCommand; /*!< Specifies the new state of the selected EXTI lines.
69 This parameter can be set either to ENABLE or DISABLE */
70
71 uint8_t Mode; /*!< Specifies the mode for the EXTI lines.
72 This parameter can be a value of @ref EXTI_LL_EC_MODE. */
73
74 uint8_t Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
75 This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
76 } LL_EXTI_InitTypeDef;
77
78 /**
79 * @}
80 */
81 #endif /*USE_FULL_LL_DRIVER*/
82
83 /* Exported constants --------------------------------------------------------*/
84 /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
85 * @{
86 */
87
88 /** @defgroup EXTI_LL_EC_LINE LINE
89 * @{
90 */
91 #define LL_EXTI_LINE_0 EXTI_IMR1_IM0 /*!< Extended line 0 */
92 #define LL_EXTI_LINE_1 EXTI_IMR1_IM1 /*!< Extended line 1 */
93 #define LL_EXTI_LINE_2 EXTI_IMR1_IM2 /*!< Extended line 2 */
94 #define LL_EXTI_LINE_3 EXTI_IMR1_IM3 /*!< Extended line 3 */
95 #define LL_EXTI_LINE_4 EXTI_IMR1_IM4 /*!< Extended line 4 */
96 #define LL_EXTI_LINE_5 EXTI_IMR1_IM5 /*!< Extended line 5 */
97 #define LL_EXTI_LINE_6 EXTI_IMR1_IM6 /*!< Extended line 6 */
98 #define LL_EXTI_LINE_7 EXTI_IMR1_IM7 /*!< Extended line 7 */
99 #define LL_EXTI_LINE_8 EXTI_IMR1_IM8 /*!< Extended line 8 */
100 #define LL_EXTI_LINE_9 EXTI_IMR1_IM9 /*!< Extended line 9 */
101 #define LL_EXTI_LINE_10 EXTI_IMR1_IM10 /*!< Extended line 10 */
102 #define LL_EXTI_LINE_11 EXTI_IMR1_IM11 /*!< Extended line 11 */
103 #define LL_EXTI_LINE_12 EXTI_IMR1_IM12 /*!< Extended line 12 */
104 #define LL_EXTI_LINE_13 EXTI_IMR1_IM13 /*!< Extended line 13 */
105 #define LL_EXTI_LINE_14 EXTI_IMR1_IM14 /*!< Extended line 14 */
106 #define LL_EXTI_LINE_15 EXTI_IMR1_IM15 /*!< Extended line 15 */
107 #define LL_EXTI_LINE_16 EXTI_IMR1_IM16 /*!< Extended line 16 */
108 #define LL_EXTI_LINE_17 EXTI_IMR1_IM17 /*!< Extended line 17 */
109 #if defined(EXTI_IMR1_IM18)
110 #define LL_EXTI_LINE_18 EXTI_IMR1_IM18 /*!< Extended line 18 */
111 #endif /* EXTI_IMR1_IM18 */
112 #define LL_EXTI_LINE_19 EXTI_IMR1_IM19 /*!< Extended line 19 */
113 #if defined(EXTI_IMR1_IM20)
114 #define LL_EXTI_LINE_20 EXTI_IMR1_IM20 /*!< Extended line 20 */
115 #endif /* EXTI_IMR1_IM20 */
116 #define LL_EXTI_LINE_21 EXTI_IMR1_IM21 /*!< Extended line 21 */
117 #define LL_EXTI_LINE_22 EXTI_IMR1_IM22 /*!< Extended line 22 */
118 #if defined(EXTI_IMR1_IM23)
119 #define LL_EXTI_LINE_23 EXTI_IMR1_IM23 /*!< Extended line 23 */
120 #endif /* EXTI_IMR1_IM23 */
121 #define LL_EXTI_LINE_24 EXTI_IMR1_IM24 /*!< Extended line 24 */
122 #define LL_EXTI_LINE_25 EXTI_IMR1_IM25 /*!< Extended line 25 */
123 #define LL_EXTI_LINE_26 EXTI_IMR1_IM26 /*!< Extended line 26 */
124 #define LL_EXTI_LINE_27 EXTI_IMR1_IM27 /*!< Extended line 27 */
125 #define LL_EXTI_LINE_28 EXTI_IMR1_IM28 /*!< Extended line 28 */
126 #define LL_EXTI_LINE_29 EXTI_IMR1_IM29 /*!< Extended line 29 */
127 #if defined(EXTI_IMR1_IM30)
128 #define LL_EXTI_LINE_30 EXTI_IMR1_IM30 /*!< Extended line 30 */
129 #endif /* EXTI_IMR1_IM30 */
130 #if defined(EXTI_IMR1_IM31)
131 #define LL_EXTI_LINE_31 EXTI_IMR1_IM31 /*!< Extended line 31 */
132 #endif /* EXTI_IMR1_IM31 */
133 #define LL_EXTI_LINE_ALL_0_31 EXTI_IMR1_IM /*!< All Extended line not reserved */
134
135 #if defined(EXTI_IMR2_IM32)
136 #define LL_EXTI_LINE_32 EXTI_IMR2_IM32 /*!< Extended line 32 */
137 #endif /* EXTI_IMR2_IM32 */
138 #if defined(EXTI_IMR2_IM33)
139 #define LL_EXTI_LINE_33 EXTI_IMR2_IM33 /*!< Extended line 33 */
140 #endif /* EXTI_IMR2_IM33 */
141 #if defined(EXTI_IMR2_IM34)
142 #define LL_EXTI_LINE_34 EXTI_IMR2_IM34 /*!< Extended line 34 */
143 #endif /* EXTI_IMR2_IM34 */
144 #if defined(EXTI_IMR2_IM35)
145 #define LL_EXTI_LINE_35 EXTI_IMR2_IM35 /*!< Extended line 35 */
146 #endif /* EXTI_IMR2_IM35 */
147 #if defined(EXTI_IMR2_IM36)
148 #define LL_EXTI_LINE_36 EXTI_IMR2_IM36 /*!< Extended line 36 */
149 #endif /* EXTI_IMR2_IM36 */
150 #define LL_EXTI_LINE_37 EXTI_IMR2_IM37 /*!< Extended line 37 */
151 #define LL_EXTI_LINE_38 EXTI_IMR2_IM38 /*!< Extended line 38 */
152 #define LL_EXTI_LINE_39 EXTI_IMR2_IM39 /*!< Extended line 39 */
153 #define LL_EXTI_LINE_40 EXTI_IMR2_IM40 /*!< Extended line 40 */
154 #define LL_EXTI_LINE_41 EXTI_IMR2_IM41 /*!< Extended line 41 */
155 #define LL_EXTI_LINE_42 EXTI_IMR2_IM42 /*!< Extended line 42 */
156 #if defined(EXTI_IMR2_IM43)
157 #define LL_EXTI_LINE_43 EXTI_IMR2_IM43 /*!< Extended line 43 */
158 #endif /* EXTI_IMR2_IM43 */
159 #if defined(EXTI_IMR2_IM44)
160 #define LL_EXTI_LINE_44 EXTI_IMR2_IM44 /*!< Extended line 44 */
161 #endif /* EXTI_IMR2_IM44 */
162 #if defined(EXTI_IMR2_IM45)
163 #define LL_EXTI_LINE_45 EXTI_IMR2_IM45 /*!< Extended line 45 */
164 #endif /* EXTI_IMR2_IM45 */
165 #if defined(ETH)
166 #define LL_EXTI_LINE_46 EXTI_IMR2_IM46 /*!< Extended line 46 */
167 #endif /* ETH */
168 #define LL_EXTI_LINE_47 EXTI_IMR2_IM47 /*!< Extended line 47 */
169 #if defined(EXTI_IMR2_IM48)
170 #define LL_EXTI_LINE_48 EXTI_IMR2_IM48 /*!< Extended line 48 */
171 #endif /* EXTI_IMR2_IM48 */
172 #define LL_EXTI_LINE_49 EXTI_IMR2_IM49 /*!< Extended line 49 */
173 #define LL_EXTI_LINE_50 EXTI_IMR2_IM50 /*!< Extended line 50 */
174 #if defined(EXTI_IMR2_IM51)
175 #define LL_EXTI_LINE_51 EXTI_IMR2_IM51 /*!< Extended line 51 */
176 #endif /* EXTI_IMR2_IM51 */
177 #if defined(EXTI_IMR2_IM52)
178 #define LL_EXTI_LINE_52 EXTI_IMR2_IM52 /*!< Extended line 52 */
179 #endif /* EXTI_IMR2_IM52 */
180 #define LL_EXTI_LINE_53 EXTI_IMR2_IM53 /*!< Extended line 53 */
181 #if defined(EXTI_IMR2_IM54)
182 #define LL_EXTI_LINE_54 EXTI_IMR2_IM54 /*!< Extended line 54 */
183 #endif /* EXTI_IMR2_IM54 */
184 #if defined(EXTI_IMR2_IM55)
185 #define LL_EXTI_LINE_55 EXTI_IMR2_IM55 /*!< Extended line 55 */
186 #endif /* EXTI_IMR2_IM55 */
187 #if defined(EXTI_IMR2_IM56)
188 #define LL_EXTI_LINE_56 EXTI_IMR2_IM56 /*!< Extended line 56 */
189 #endif /* EXTI_IMR2_IM56 */
190 #if defined(EXTI_IMR2_IM57)
191 #define LL_EXTI_LINE_57 EXTI_IMR2_IM57 /*!< Extended line 57 */
192 #endif /* EXTI_IMR2_IM57 */
193 #if defined(EXTI_IMR2_IM58)
194 #define LL_EXTI_LINE_58 EXTI_IMR2_IM58 /*!< Extended line 58 */
195 #endif /* EXTI_IMR2_IM58 */
196 #define LL_EXTI_LINE_ALL_32_63 EXTI_IMR2_IM /*!< ALL Extended lines */
197
198 #define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
199
200 #if defined(USE_FULL_LL_DRIVER)
201 #define LL_EXTI_LINE_NONE 0x00000000U /*!< None Extended line */
202 #endif /*USE_FULL_LL_DRIVER*/
203
204 /** @defgroup SYSTEM_LL_EC_EXTI_PORT EXTI EXTI PORT
205 * @{
206 */
207 #define LL_EXTI_EXTI_PORTA 0U /*!< EXTI PORT A */
208 #define LL_EXTI_EXTI_PORTB EXTI_EXTICR1_EXTI0_0 /*!< EXTI PORT B */
209 #define LL_EXTI_EXTI_PORTC EXTI_EXTICR1_EXTI0_1 /*!< EXTI PORT C */
210 #define LL_EXTI_EXTI_PORTD (EXTI_EXTICR1_EXTI0_1|EXTI_EXTICR1_EXTI0_0) /*!< EXTI PORT D */
211 #if defined(GPIOE)
212 #define LL_EXTI_EXTI_PORTE EXTI_EXTICR1_EXTI0_2 /*!< EXTI PORT E */
213 #endif /* GPIO E */
214 #if defined(GPIOF)
215 #define LL_EXTI_EXTI_PORTF (EXTI_EXTICR1_EXTI0_2|EXTI_EXTICR1_EXTI0_0) /*!< EXTI PORT F */
216 #endif /* GPIO F */
217 #if defined(GPIOG)
218 #define LL_EXTI_EXTI_PORTG (EXTI_EXTICR1_EXTI0_2|EXTI_EXTICR1_EXTI0_1) /*!< EXTI PORT G */
219 #endif /* GPIO G */
220 #define LL_EXTI_EXTI_PORTH (EXTI_EXTICR1_EXTI0_2|EXTI_EXTICR1_EXTI0_1|EXTI_EXTICR1_EXTI0_0) /*!< EXTI PORT H */
221 #if defined(GPIOI)
222 #define LL_EXTI_EXTI_PORTI EXTI_EXTICR1_EXTI0_3 /*!< EXTI PORT I */
223 #endif /* GPIO I */
224
225 /**
226 * @}
227 */
228
229 /** @defgroup SYSTEM_LL_EC_EXTI_LINE EXTI EXTI LINE
230 * @{
231 */
232 #define LL_EXTI_EXTI_LINE0 ((0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /*!< EXTI_POSITION_0 | EXTICR[0] */
233 #define LL_EXTI_EXTI_LINE1 ((8U << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /*!< EXTI_POSITION_8 | EXTICR[0] */
234 #define LL_EXTI_EXTI_LINE2 ((16U << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /*!< EXTI_POSITION_16 | EXTICR[0] */
235 #define LL_EXTI_EXTI_LINE3 ((24U << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U) /*!< EXTI_POSITION_24 | EXTICR[0] */
236 #define LL_EXTI_EXTI_LINE4 ((0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /*!< EXTI_POSITION_0 | EXTICR[1] */
237 #define LL_EXTI_EXTI_LINE5 ((8U << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /*!< EXTI_POSITION_8 | EXTICR[1] */
238 #define LL_EXTI_EXTI_LINE6 ((16U << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /*!< EXTI_POSITION_16 | EXTICR[1] */
239 #define LL_EXTI_EXTI_LINE7 ((24U << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U) /*!< EXTI_POSITION_24 | EXTICR[1] */
240 #define LL_EXTI_EXTI_LINE8 ((0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /*!< EXTI_POSITION_0 | EXTICR[2] */
241 #define LL_EXTI_EXTI_LINE9 ((8U << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /*!< EXTI_POSITION_8 | EXTICR[2] */
242 #define LL_EXTI_EXTI_LINE10 ((16U << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /*!< EXTI_POSITION_16 | EXTICR[2] */
243 #define LL_EXTI_EXTI_LINE11 ((24U << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U) /*!< EXTI_POSITION_24 | EXTICR[2] */
244 #define LL_EXTI_EXTI_LINE12 ((0U << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /*!< EXTI_POSITION_0 | EXTICR[3] */
245 #define LL_EXTI_EXTI_LINE13 ((8U << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /*!< EXTI_POSITION_8 | EXTICR[3] */
246 #define LL_EXTI_EXTI_LINE14 ((16U << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /*!< EXTI_POSITION_16 | EXTICR[3] */
247 #define LL_EXTI_EXTI_LINE15 ((24U << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U) /*!< EXTI_POSITION_24 | EXTICR[3] */
248 /**
249 * @}
250 */
251 /**
252 * @}
253 */
254 #if defined(USE_FULL_LL_DRIVER)
255
256 /** @defgroup EXTI_LL_EC_MODE Mode
257 * @{
258 */
259 #define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */
260 #define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */
261 #define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
262 /**
263 * @}
264 */
265
266 /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
267 * @{
268 */
269 #define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */
270 #define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */
271 #define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */
272 #define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
273
274 /**
275 * @}
276 */
277
278
279 #endif /*USE_FULL_LL_DRIVER*/
280
281
282 /**
283 * @}
284 */
285
286 /* Exported macro ------------------------------------------------------------*/
287 /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
288 * @{
289 */
290
291 /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
292 * @{
293 */
294
295 /**
296 * @brief Write a value in EXTI register
297 * @param __REG__ Register to be written
298 * @param __VALUE__ Value to be written in the register
299 * @retval None
300 */
301 #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
302
303 /**
304 * @brief Read a value in EXTI register
305 * @param __REG__ Register to be read
306 * @retval Register value
307 */
308 #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
309 /**
310 * @}
311 */
312
313
314 /**
315 * @}
316 */
317
318
319 /* Exported functions --------------------------------------------------------*/
320 /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
321 * @{
322 */
323 /** @defgroup EXTI_LL_EF_IT_Management IT_Management
324 * @{
325 */
326
327 /**
328 * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31
329 * @note The reset value for the direct or internal lines (see RM)
330 * is set to 1 in order to enable the interrupt by default.
331 * Bits are set automatically at Power on.
332 * @rmtoll IMR1 IMx LL_EXTI_EnableIT_0_31
333 * @param ExtiLine This parameter can be one of the following values:
334 * @arg @ref LL_EXTI_LINE_0
335 * @arg @ref LL_EXTI_LINE_1
336 * @arg @ref LL_EXTI_LINE_2
337 * @arg @ref LL_EXTI_LINE_3
338 * @arg @ref LL_EXTI_LINE_4
339 * @arg @ref LL_EXTI_LINE_5
340 * @arg @ref LL_EXTI_LINE_6
341 * @arg @ref LL_EXTI_LINE_7
342 * @arg @ref LL_EXTI_LINE_8
343 * @arg @ref LL_EXTI_LINE_9
344 * @arg @ref LL_EXTI_LINE_10
345 * @arg @ref LL_EXTI_LINE_11
346 * @arg @ref LL_EXTI_LINE_12
347 * @arg @ref LL_EXTI_LINE_13
348 * @arg @ref LL_EXTI_LINE_14
349 * @arg @ref LL_EXTI_LINE_15
350 * @arg @ref LL_EXTI_LINE_16
351 * @arg @ref LL_EXTI_LINE_17
352 * @arg @ref LL_EXTI_LINE_18
353 * @arg @ref LL_EXTI_LINE_19
354 * @arg @ref LL_EXTI_LINE_20
355 * @arg @ref LL_EXTI_LINE_21
356 * @arg @ref LL_EXTI_LINE_22
357 * @arg @ref LL_EXTI_LINE_23
358 * @arg @ref LL_EXTI_LINE_24
359 * @arg @ref LL_EXTI_LINE_25
360 * @arg @ref LL_EXTI_LINE_26
361 * @arg @ref LL_EXTI_LINE_27
362 * @arg @ref LL_EXTI_LINE_28
363 * @arg @ref LL_EXTI_LINE_29
364 * @arg @ref LL_EXTI_LINE_30
365 * @arg @ref LL_EXTI_LINE_31
366 * @arg @ref LL_EXTI_LINE_ALL_0_31
367 * @note Please check each device line mapping for EXTI Line availability
368 * @retval None
369 */
LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)370 __STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)
371 {
372 SET_BIT(EXTI->IMR1, ExtiLine);
373 }
374
375 /**
376 * @brief Enable ExtiLine Interrupt request for Lines in range 32 to 63
377 * @rmtoll IMR2 IMx LL_EXTI_EnableIT_32_63
378 * @param ExtiLine This parameter can be one of the following values:
379 * @arg @ref LL_EXTI_LINE_32
380 * @arg @ref LL_EXTI_LINE_33
381 * @arg @ref LL_EXTI_LINE_34
382 * @arg @ref LL_EXTI_LINE_35
383 * @arg @ref LL_EXTI_LINE_36
384 * @arg @ref LL_EXTI_LINE_37
385 * @arg @ref LL_EXTI_LINE_38
386 * @arg @ref LL_EXTI_LINE_39
387 * @arg @ref LL_EXTI_LINE_40
388 * @arg @ref LL_EXTI_LINE_41
389 * @arg @ref LL_EXTI_LINE_42
390 * @arg @ref LL_EXTI_LINE_43
391 * @arg @ref LL_EXTI_LINE_44
392 * @arg @ref LL_EXTI_LINE_45
393 * @arg @ref LL_EXTI_LINE_46
394 * @arg @ref LL_EXTI_LINE_47
395 * @arg @ref LL_EXTI_LINE_48
396 * @arg @ref LL_EXTI_LINE_49
397 * @arg @ref LL_EXTI_LINE_50
398 * @arg @ref LL_EXTI_LINE_51
399 * @arg @ref LL_EXTI_LINE_52
400 * @arg @ref LL_EXTI_LINE_53
401 * @arg @ref LL_EXTI_LINE_54
402 * @arg @ref LL_EXTI_LINE_55
403 * @arg @ref LL_EXTI_LINE_56
404 * @arg @ref LL_EXTI_LINE_57
405 * @arg @ref LL_EXTI_LINE_58
406 * @arg @ref LL_EXTI_LINE_ALL_32_63
407 *
408 * @note Please check each device line mapping for EXTI Line availability
409 * @retval None
410 */
LL_EXTI_EnableIT_32_63(uint32_t ExtiLine)411 __STATIC_INLINE void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine)
412 {
413 SET_BIT(EXTI->IMR2, ExtiLine);
414 }
415
416 /**
417 * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31
418 * @note The reset value for the direct or internal lines (see RM)
419 * is set to 1 in order to enable the interrupt by default.
420 * Bits are set automatically at Power on.
421 * @rmtoll IMR1 IMx LL_EXTI_DisableIT_0_31
422 * @param ExtiLine This parameter can be one of the following values:
423 * @arg @ref LL_EXTI_LINE_0
424 * @arg @ref LL_EXTI_LINE_1
425 * @arg @ref LL_EXTI_LINE_2
426 * @arg @ref LL_EXTI_LINE_3
427 * @arg @ref LL_EXTI_LINE_4
428 * @arg @ref LL_EXTI_LINE_5
429 * @arg @ref LL_EXTI_LINE_6
430 * @arg @ref LL_EXTI_LINE_7
431 * @arg @ref LL_EXTI_LINE_8
432 * @arg @ref LL_EXTI_LINE_9
433 * @arg @ref LL_EXTI_LINE_10
434 * @arg @ref LL_EXTI_LINE_11
435 * @arg @ref LL_EXTI_LINE_12
436 * @arg @ref LL_EXTI_LINE_13
437 * @arg @ref LL_EXTI_LINE_14
438 * @arg @ref LL_EXTI_LINE_15
439 * @arg @ref LL_EXTI_LINE_16
440 * @arg @ref LL_EXTI_LINE_17
441 * @arg @ref LL_EXTI_LINE_18
442 * @arg @ref LL_EXTI_LINE_19
443 * @arg @ref LL_EXTI_LINE_20
444 * @arg @ref LL_EXTI_LINE_21
445 * @arg @ref LL_EXTI_LINE_22
446 * @arg @ref LL_EXTI_LINE_23
447 * @arg @ref LL_EXTI_LINE_24
448 * @arg @ref LL_EXTI_LINE_25
449 * @arg @ref LL_EXTI_LINE_26
450 * @arg @ref LL_EXTI_LINE_27
451 * @arg @ref LL_EXTI_LINE_28
452 * @arg @ref LL_EXTI_LINE_29
453 * @arg @ref LL_EXTI_LINE_30
454 * @arg @ref LL_EXTI_LINE_31
455 * @arg @ref LL_EXTI_LINE_ALL_0_31
456 * @note Please check each device line mapping for EXTI Line availability
457 * @retval None
458 */
LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)459 __STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)
460 {
461 CLEAR_BIT(EXTI->IMR1, ExtiLine);
462 }
463
464
465 /**
466 * @brief Disable ExtiLine Interrupt request for Lines in range 32 to 63
467 * @rmtoll IMR2 IMx LL_EXTI_DisableIT_32_63
468 * @param ExtiLine This parameter can be one of the following values:
469 * @arg @ref LL_EXTI_LINE_32
470 * @arg @ref LL_EXTI_LINE_33
471 * @arg @ref LL_EXTI_LINE_34
472 * @arg @ref LL_EXTI_LINE_35
473 * @arg @ref LL_EXTI_LINE_36
474 * @arg @ref LL_EXTI_LINE_37
475 * @arg @ref LL_EXTI_LINE_38
476 * @arg @ref LL_EXTI_LINE_39
477 * @arg @ref LL_EXTI_LINE_40
478 * @arg @ref LL_EXTI_LINE_41
479 * @arg @ref LL_EXTI_LINE_42
480 * @arg @ref LL_EXTI_LINE_43
481 * @arg @ref LL_EXTI_LINE_44
482 * @arg @ref LL_EXTI_LINE_45
483 * @arg @ref LL_EXTI_LINE_46
484 * @arg @ref LL_EXTI_LINE_47
485 * @arg @ref LL_EXTI_LINE_48
486 * @arg @ref LL_EXTI_LINE_49
487 * @arg @ref LL_EXTI_LINE_50
488 * @arg @ref LL_EXTI_LINE_51
489 * @arg @ref LL_EXTI_LINE_52
490 * @arg @ref LL_EXTI_LINE_53
491 * @arg @ref LL_EXTI_LINE_54
492 * @arg @ref LL_EXTI_LINE_55
493 * @arg @ref LL_EXTI_LINE_56
494 * @arg @ref LL_EXTI_LINE_57
495 * @arg @ref LL_EXTI_LINE_58
496 * @arg @ref LL_EXTI_LINE_ALL_32_63
497 *
498 * @note Please check each device line mapping for EXTI Line availability
499 * @retval None
500 */
LL_EXTI_DisableIT_32_63(uint32_t ExtiLine)501 __STATIC_INLINE void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine)
502 {
503 CLEAR_BIT(EXTI->IMR2, ExtiLine);
504 }
505
506 /**
507 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
508 * @note The reset value for the direct or internal lines (see RM)
509 * is set to 1 in order to enable the interrupt by default.
510 * Bits are set automatically at Power on.
511 * @rmtoll IMR1 IMx LL_EXTI_IsEnabledIT_0_31
512 * @param ExtiLine This parameter can be one of the following values:
513 * @arg @ref LL_EXTI_LINE_0
514 * @arg @ref LL_EXTI_LINE_1
515 * @arg @ref LL_EXTI_LINE_2
516 * @arg @ref LL_EXTI_LINE_3
517 * @arg @ref LL_EXTI_LINE_4
518 * @arg @ref LL_EXTI_LINE_5
519 * @arg @ref LL_EXTI_LINE_6
520 * @arg @ref LL_EXTI_LINE_7
521 * @arg @ref LL_EXTI_LINE_8
522 * @arg @ref LL_EXTI_LINE_9
523 * @arg @ref LL_EXTI_LINE_10
524 * @arg @ref LL_EXTI_LINE_11
525 * @arg @ref LL_EXTI_LINE_12
526 * @arg @ref LL_EXTI_LINE_13
527 * @arg @ref LL_EXTI_LINE_14
528 * @arg @ref LL_EXTI_LINE_15
529 * @arg @ref LL_EXTI_LINE_16
530 * @arg @ref LL_EXTI_LINE_17
531 * @arg @ref LL_EXTI_LINE_18
532 * @arg @ref LL_EXTI_LINE_19
533 * @arg @ref LL_EXTI_LINE_20
534 * @arg @ref LL_EXTI_LINE_21
535 * @arg @ref LL_EXTI_LINE_22
536 * @arg @ref LL_EXTI_LINE_23
537 * @arg @ref LL_EXTI_LINE_24
538 * @arg @ref LL_EXTI_LINE_25
539 * @arg @ref LL_EXTI_LINE_26
540 * @arg @ref LL_EXTI_LINE_27
541 * @arg @ref LL_EXTI_LINE_28
542 * @arg @ref LL_EXTI_LINE_29
543 * @arg @ref LL_EXTI_LINE_30
544 * @arg @ref LL_EXTI_LINE_31
545 * @arg @ref LL_EXTI_LINE_ALL_0_31
546 * @note Please check each device line mapping for EXTI Line availability
547 * @retval State of bit (1 or 0).
548 */
LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)549 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)
550 {
551 return ((READ_BIT(EXTI->IMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
552 }
553
554
555 /**
556 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63
557 * @rmtoll IMR2 IMx LL_EXTI_IsEnabledIT_32_63
558 * @param ExtiLine This parameter can be one of the following values:
559 * @arg @ref LL_EXTI_LINE_32
560 * @arg @ref LL_EXTI_LINE_33
561 * @arg @ref LL_EXTI_LINE_34
562 * @arg @ref LL_EXTI_LINE_35
563 * @arg @ref LL_EXTI_LINE_36
564 * @arg @ref LL_EXTI_LINE_37
565 * @arg @ref LL_EXTI_LINE_38
566 * @arg @ref LL_EXTI_LINE_39
567 * @arg @ref LL_EXTI_LINE_40
568 * @arg @ref LL_EXTI_LINE_41
569 * @arg @ref LL_EXTI_LINE_42
570 * @arg @ref LL_EXTI_LINE_43
571 * @arg @ref LL_EXTI_LINE_44
572 * @arg @ref LL_EXTI_LINE_45
573 * @arg @ref LL_EXTI_LINE_46
574 * @arg @ref LL_EXTI_LINE_47
575 * @arg @ref LL_EXTI_LINE_48
576 * @arg @ref LL_EXTI_LINE_49
577 * @arg @ref LL_EXTI_LINE_50
578 * @arg @ref LL_EXTI_LINE_51
579 * @arg @ref LL_EXTI_LINE_52
580 * @arg @ref LL_EXTI_LINE_53
581 * @arg @ref LL_EXTI_LINE_54
582 * @arg @ref LL_EXTI_LINE_55
583 * @arg @ref LL_EXTI_LINE_56
584 * @arg @ref LL_EXTI_LINE_57
585 * @arg @ref LL_EXTI_LINE_58
586 * @arg @ref LL_EXTI_LINE_ALL_32_63
587 *
588 * @note Please check each device line mapping for EXTI Line availability
589 * @retval State of bit (1 or 0).
590 */
LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine)591 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine)
592 {
593 return ((READ_BIT(EXTI->IMR2, ExtiLine) == (ExtiLine)) ? 1U : 0U);
594 }
595
596 /**
597 * @}
598 */
599
600 /** @defgroup EXTI_LL_EF_Event_Management Event_Management
601 * @{
602 */
603
604 /**
605 * @brief Enable ExtiLine Event request for Lines in range 0 to 31
606 * @rmtoll EMR1 EMx LL_EXTI_EnableEvent_0_31
607 * @param ExtiLine This parameter can be one of the following values:
608 * @arg @ref LL_EXTI_LINE_0
609 * @arg @ref LL_EXTI_LINE_1
610 * @arg @ref LL_EXTI_LINE_2
611 * @arg @ref LL_EXTI_LINE_3
612 * @arg @ref LL_EXTI_LINE_4
613 * @arg @ref LL_EXTI_LINE_5
614 * @arg @ref LL_EXTI_LINE_6
615 * @arg @ref LL_EXTI_LINE_7
616 * @arg @ref LL_EXTI_LINE_8
617 * @arg @ref LL_EXTI_LINE_9
618 * @arg @ref LL_EXTI_LINE_10
619 * @arg @ref LL_EXTI_LINE_11
620 * @arg @ref LL_EXTI_LINE_12
621 * @arg @ref LL_EXTI_LINE_13
622 * @arg @ref LL_EXTI_LINE_14
623 * @arg @ref LL_EXTI_LINE_15
624 * @arg @ref LL_EXTI_LINE_16
625 * @arg @ref LL_EXTI_LINE_17
626 * @arg @ref LL_EXTI_LINE_18
627 * @arg @ref LL_EXTI_LINE_19
628 * @arg @ref LL_EXTI_LINE_20
629 * @arg @ref LL_EXTI_LINE_21
630 * @arg @ref LL_EXTI_LINE_22
631 * @arg @ref LL_EXTI_LINE_23
632 * @arg @ref LL_EXTI_LINE_24
633 * @arg @ref LL_EXTI_LINE_25
634 * @arg @ref LL_EXTI_LINE_26
635 * @arg @ref LL_EXTI_LINE_27
636 * @arg @ref LL_EXTI_LINE_28
637 * @arg @ref LL_EXTI_LINE_29
638 * @arg @ref LL_EXTI_LINE_30
639 * @arg @ref LL_EXTI_LINE_31
640 * @arg @ref LL_EXTI_LINE_ALL_0_31
641 * @note Please check each device line mapping for EXTI Line availability
642 * @retval None
643 */
LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)644 __STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)
645 {
646 SET_BIT(EXTI->EMR1, ExtiLine);
647 }
648
649 /**
650 * @brief Enable ExtiLine Event request for Lines in range 32 to 63
651 * @rmtoll EMR2 EMx LL_EXTI_EnableEvent_32_63
652 * @param ExtiLine This parameter can be a combination of the following values:
653 * @arg @ref LL_EXTI_LINE_32
654 * @arg @ref LL_EXTI_LINE_33
655 * @arg @ref LL_EXTI_LINE_34
656 * @arg @ref LL_EXTI_LINE_35
657 * @arg @ref LL_EXTI_LINE_36
658 * @arg @ref LL_EXTI_LINE_37
659 * @arg @ref LL_EXTI_LINE_38
660 * @arg @ref LL_EXTI_LINE_39
661 * @arg @ref LL_EXTI_LINE_40
662 * @arg @ref LL_EXTI_LINE_41
663 * @arg @ref LL_EXTI_LINE_42
664 * @arg @ref LL_EXTI_LINE_43
665 * @arg @ref LL_EXTI_LINE_44
666 * @arg @ref LL_EXTI_LINE_46
667 * @arg @ref LL_EXTI_LINE_45
668 * @arg @ref LL_EXTI_LINE_47
669 * @arg @ref LL_EXTI_LINE_48
670 * @arg @ref LL_EXTI_LINE_49
671 * @arg @ref LL_EXTI_LINE_50
672 * @arg @ref LL_EXTI_LINE_51
673 * @arg @ref LL_EXTI_LINE_52
674 * @arg @ref LL_EXTI_LINE_53
675 * @arg @ref LL_EXTI_LINE_54
676 * @arg @ref LL_EXTI_LINE_55
677 * @arg @ref LL_EXTI_LINE_56
678 * @arg @ref LL_EXTI_LINE_57
679 * @arg @ref LL_EXTI_LINE_58
680 * @arg @ref LL_EXTI_LINE_ALL_32_63
681 *
682 * @note Please check each device line mapping for EXTI Line availability
683 * @retval None
684 */
LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine)685 __STATIC_INLINE void LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine)
686 {
687 SET_BIT(EXTI->EMR2, ExtiLine);
688 }
689
690 /**
691 * @brief Disable ExtiLine Event request for Lines in range 0 to 31
692 * @rmtoll EMR1 EMx LL_EXTI_DisableEvent_0_31
693 * @param ExtiLine This parameter can be one of the following values:
694 * @arg @ref LL_EXTI_LINE_0
695 * @arg @ref LL_EXTI_LINE_1
696 * @arg @ref LL_EXTI_LINE_2
697 * @arg @ref LL_EXTI_LINE_3
698 * @arg @ref LL_EXTI_LINE_4
699 * @arg @ref LL_EXTI_LINE_5
700 * @arg @ref LL_EXTI_LINE_6
701 * @arg @ref LL_EXTI_LINE_7
702 * @arg @ref LL_EXTI_LINE_8
703 * @arg @ref LL_EXTI_LINE_9
704 * @arg @ref LL_EXTI_LINE_10
705 * @arg @ref LL_EXTI_LINE_11
706 * @arg @ref LL_EXTI_LINE_12
707 * @arg @ref LL_EXTI_LINE_13
708 * @arg @ref LL_EXTI_LINE_14
709 * @arg @ref LL_EXTI_LINE_15
710 * @arg @ref LL_EXTI_LINE_16
711 * @arg @ref LL_EXTI_LINE_17
712 * @arg @ref LL_EXTI_LINE_18
713 * @arg @ref LL_EXTI_LINE_19
714 * @arg @ref LL_EXTI_LINE_20
715 * @arg @ref LL_EXTI_LINE_21
716 * @arg @ref LL_EXTI_LINE_22
717 * @arg @ref LL_EXTI_LINE_23
718 * @arg @ref LL_EXTI_LINE_24
719 * @arg @ref LL_EXTI_LINE_25
720 * @arg @ref LL_EXTI_LINE_26
721 * @arg @ref LL_EXTI_LINE_27
722 * @arg @ref LL_EXTI_LINE_28
723 * @arg @ref LL_EXTI_LINE_29
724 * @arg @ref LL_EXTI_LINE_30
725 * @arg @ref LL_EXTI_LINE_31
726 * @arg @ref LL_EXTI_LINE_ALL_0_31
727 * @note Please check each device line mapping for EXTI Line availability
728 * @retval None
729 */
LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)730 __STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)
731 {
732 CLEAR_BIT(EXTI->EMR1, ExtiLine);
733 }
734
735 /**
736 * @brief Disable ExtiLine Event request for Lines in range 32 to 63
737 * @rmtoll EMR2 EMx LL_EXTI_DisableEvent_32_63
738 * @param ExtiLine This parameter can be a combination of the following values:
739 * @arg @ref LL_EXTI_LINE_32
740 * @arg @ref LL_EXTI_LINE_33
741 * @arg @ref LL_EXTI_LINE_34
742 * @arg @ref LL_EXTI_LINE_35
743 * @arg @ref LL_EXTI_LINE_36
744 * @arg @ref LL_EXTI_LINE_37
745 * @arg @ref LL_EXTI_LINE_38
746 * @arg @ref LL_EXTI_LINE_39
747 * @arg @ref LL_EXTI_LINE_40
748 * @arg @ref LL_EXTI_LINE_41
749 * @arg @ref LL_EXTI_LINE_42
750 * @arg @ref LL_EXTI_LINE_43
751 * @arg @ref LL_EXTI_LINE_44
752 * @arg @ref LL_EXTI_LINE_46
753 * @arg @ref LL_EXTI_LINE_47
754 * @arg @ref LL_EXTI_LINE_48
755 * @arg @ref LL_EXTI_LINE_49
756 * @arg @ref LL_EXTI_LINE_50
757 * @arg @ref LL_EXTI_LINE_51
758 * @arg @ref LL_EXTI_LINE_52
759 * @arg @ref LL_EXTI_LINE_53
760 * @arg @ref LL_EXTI_LINE_54
761 * @arg @ref LL_EXTI_LINE_55
762 * @arg @ref LL_EXTI_LINE_56
763 * @arg @ref LL_EXTI_LINE_57
764 * @arg @ref LL_EXTI_LINE_58
765 * @arg @ref LL_EXTI_LINE_ALL_32_63
766 *
767 * @note Please check each device line mapping for EXTI Line availability
768 * @retval None
769 */
LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine)770 __STATIC_INLINE void LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine)
771 {
772 CLEAR_BIT(EXTI->EMR2, ExtiLine);
773 }
774
775 /**
776 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
777 * @rmtoll EMR1 EMx LL_EXTI_IsEnabledEvent_0_31
778 * @param ExtiLine This parameter can be one of the following values:
779 * @arg @ref LL_EXTI_LINE_0
780 * @arg @ref LL_EXTI_LINE_1
781 * @arg @ref LL_EXTI_LINE_2
782 * @arg @ref LL_EXTI_LINE_3
783 * @arg @ref LL_EXTI_LINE_4
784 * @arg @ref LL_EXTI_LINE_5
785 * @arg @ref LL_EXTI_LINE_6
786 * @arg @ref LL_EXTI_LINE_7
787 * @arg @ref LL_EXTI_LINE_8
788 * @arg @ref LL_EXTI_LINE_9
789 * @arg @ref LL_EXTI_LINE_10
790 * @arg @ref LL_EXTI_LINE_11
791 * @arg @ref LL_EXTI_LINE_12
792 * @arg @ref LL_EXTI_LINE_13
793 * @arg @ref LL_EXTI_LINE_14
794 * @arg @ref LL_EXTI_LINE_15
795 * @arg @ref LL_EXTI_LINE_16
796 * @arg @ref LL_EXTI_LINE_17
797 * @arg @ref LL_EXTI_LINE_18
798 * @arg @ref LL_EXTI_LINE_19
799 * @arg @ref LL_EXTI_LINE_20
800 * @arg @ref LL_EXTI_LINE_21
801 * @arg @ref LL_EXTI_LINE_22
802 * @arg @ref LL_EXTI_LINE_23
803 * @arg @ref LL_EXTI_LINE_24
804 * @arg @ref LL_EXTI_LINE_25
805 * @arg @ref LL_EXTI_LINE_26
806 * @arg @ref LL_EXTI_LINE_27
807 * @arg @ref LL_EXTI_LINE_28
808 * @arg @ref LL_EXTI_LINE_29
809 * @arg @ref LL_EXTI_LINE_30
810 * @arg @ref LL_EXTI_LINE_31
811 * @arg @ref LL_EXTI_LINE_ALL_0_31
812 * @note Please check each device line mapping for EXTI Line availability
813 * @retval State of bit (1 or 0).
814 */
LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)815 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)
816 {
817 return ((READ_BIT(EXTI->EMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
818 }
819
820 /**
821 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 32 to 63
822 * @rmtoll EMR2 EMx LL_EXTI_IsEnabledEvent_32_63
823 * @param ExtiLine This parameter can be a combination of the following values:
824 * @arg @ref LL_EXTI_LINE_32
825 * @arg @ref LL_EXTI_LINE_33
826 * @arg @ref LL_EXTI_LINE_34
827 * @arg @ref LL_EXTI_LINE_35
828 * @arg @ref LL_EXTI_LINE_36
829 * @arg @ref LL_EXTI_LINE_37
830 * @arg @ref LL_EXTI_LINE_38
831 * @arg @ref LL_EXTI_LINE_39
832 * @arg @ref LL_EXTI_LINE_40
833 * @arg @ref LL_EXTI_LINE_41
834 * @arg @ref LL_EXTI_LINE_42
835 * @arg @ref LL_EXTI_LINE_43
836 * @arg @ref LL_EXTI_LINE_44
837 * @arg @ref LL_EXTI_LINE_46
838 * @arg @ref LL_EXTI_LINE_47
839 * @arg @ref LL_EXTI_LINE_48
840 * @arg @ref LL_EXTI_LINE_49
841 * @arg @ref LL_EXTI_LINE_50
842 * @arg @ref LL_EXTI_LINE_51
843 * @arg @ref LL_EXTI_LINE_52
844 * @arg @ref LL_EXTI_LINE_53
845 * @arg @ref LL_EXTI_LINE_54
846 * @arg @ref LL_EXTI_LINE_55
847 * @arg @ref LL_EXTI_LINE_56
848 * @arg @ref LL_EXTI_LINE_57
849 * @arg @ref LL_EXTI_LINE_58
850 * @arg @ref LL_EXTI_LINE_ALL_32_63
851 *
852 * @note Please check each device line mapping for EXTI Line availability
853 * @retval State of bit (1 or 0).
854 */
LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine)855 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine)
856 {
857 return ((READ_BIT(EXTI->EMR2, ExtiLine) == (ExtiLine)) ? 1U : 0U);
858 }
859
860 /**
861 * @}
862 */
863
864 /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
865 * @{
866 */
867
868 /**
869 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
870 * @note The configurable wakeup lines are edge-triggered. No glitch must be
871 * generated on these lines. If a rising edge on a configurable interrupt
872 * line occurs during a write operation in the EXTI_RTSR register, the
873 * pending bit is not set.
874 * Rising and falling edge triggers can be set for
875 * the same interrupt line. In this case, both generate a trigger
876 * condition.
877 * @rmtoll RTSR1 RTx LL_EXTI_EnableRisingTrig_0_31
878 * @param ExtiLine This parameter can be a combination of the following values:
879 * @arg @ref LL_EXTI_LINE_0
880 * @arg @ref LL_EXTI_LINE_1
881 * @arg @ref LL_EXTI_LINE_2
882 * @arg @ref LL_EXTI_LINE_3
883 * @arg @ref LL_EXTI_LINE_4
884 * @arg @ref LL_EXTI_LINE_5
885 * @arg @ref LL_EXTI_LINE_6
886 * @arg @ref LL_EXTI_LINE_7
887 * @arg @ref LL_EXTI_LINE_8
888 * @arg @ref LL_EXTI_LINE_9
889 * @arg @ref LL_EXTI_LINE_10
890 * @arg @ref LL_EXTI_LINE_11
891 * @arg @ref LL_EXTI_LINE_12
892 * @arg @ref LL_EXTI_LINE_13
893 * @arg @ref LL_EXTI_LINE_14
894 * @arg @ref LL_EXTI_LINE_15
895 * @arg @ref LL_EXTI_LINE_16
896 * @note Please check each device line mapping for EXTI Line availability
897 * @retval None
898 */
LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)899 __STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)
900 {
901 SET_BIT(EXTI->RTSR1, ExtiLine);
902
903 }
904
905 /**
906 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
907 * @note The configurable wakeup lines are edge-triggered. No glitch must be
908 * generated on these lines. If a rising edge on a configurable interrupt
909 * line occurs during a write operation in the EXTI_RTSR register, the
910 * pending bit is not set.Rising and falling edge triggers can be set for
911 * the same interrupt line. In this case, both generate a trigger
912 * condition.
913 * @rmtoll RTSR2 RTx LL_EXTI_EnableRisingTrig_32_63
914 * @param ExtiLine This parameter can be a combination of the following values:
915 * @arg @ref LL_EXTI_LINE_46
916 * @arg @ref LL_EXTI_LINE_50
917 * @arg @ref LL_EXTI_LINE_53
918 * @note Please check each device line mapping for EXTI Line availability
919 * @retval None
920 */
LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine)921 __STATIC_INLINE void LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine)
922 {
923 SET_BIT(EXTI->RTSR2, ExtiLine);
924 }
925
926 /**
927 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
928 * @note The configurable wakeup lines are edge-triggered. No glitch must be
929 * generated on these lines. If a rising edge on a configurable interrupt
930 * line occurs during a write operation in the EXTI_RTSR register, the
931 * pending bit is not set.
932 * Rising and falling edge triggers can be set for
933 * the same interrupt line. In this case, both generate a trigger
934 * condition.
935 * @rmtoll RTSR1 RTx LL_EXTI_DisableRisingTrig_0_31
936 * @param ExtiLine This parameter can be a combination of the following values:
937 * @arg @ref LL_EXTI_LINE_0
938 * @arg @ref LL_EXTI_LINE_1
939 * @arg @ref LL_EXTI_LINE_2
940 * @arg @ref LL_EXTI_LINE_3
941 * @arg @ref LL_EXTI_LINE_4
942 * @arg @ref LL_EXTI_LINE_5
943 * @arg @ref LL_EXTI_LINE_6
944 * @arg @ref LL_EXTI_LINE_7
945 * @arg @ref LL_EXTI_LINE_8
946 * @arg @ref LL_EXTI_LINE_9
947 * @arg @ref LL_EXTI_LINE_10
948 * @arg @ref LL_EXTI_LINE_11
949 * @arg @ref LL_EXTI_LINE_12
950 * @arg @ref LL_EXTI_LINE_13
951 * @arg @ref LL_EXTI_LINE_14
952 * @arg @ref LL_EXTI_LINE_15
953 * @arg @ref LL_EXTI_LINE_16
954 * @note Please check each device line mapping for EXTI Line availability
955 * @retval None
956 */
LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)957 __STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)
958 {
959 CLEAR_BIT(EXTI->RTSR1, ExtiLine);
960
961 }
962
963 /**
964 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
965 * @note The configurable wakeup lines are edge-triggered. No glitch must be
966 * generated on these lines. If a rising edge on a configurable interrupt
967 * line occurs during a write operation in the EXTI_RTSR register, the
968 * pending bit is not set.
969 * Rising and falling edge triggers can be set for
970 * the same interrupt line. In this case, both generate a trigger
971 * condition.
972 * @rmtoll RTSR2 RTx LL_EXTI_DisableRisingTrig_32_63
973 * @param ExtiLine This parameter can be a combination of the following values:
974 * @arg @ref LL_EXTI_LINE_46
975 * @arg @ref LL_EXTI_LINE_50
976 * @arg @ref LL_EXTI_LINE_53
977 *
978 * (*) : Not available for all stm32h5xxxx family lines.
979 * @note Please check each device line mapping for EXTI Line availability
980 * @retval None
981 */
LL_EXTI_DisableRisingTrig_32_63(uint32_t ExtiLine)982 __STATIC_INLINE void LL_EXTI_DisableRisingTrig_32_63(uint32_t ExtiLine)
983 {
984 CLEAR_BIT(EXTI->RTSR2, ExtiLine);
985 }
986
987 /**
988 * @brief Check if rising edge trigger is enabled for Lines in range 0 to 31
989 * @rmtoll RTSR1 RTx LL_EXTI_IsEnabledRisingTrig_0_31
990 * @param ExtiLine This parameter can be a combination of the following values:
991 * @arg @ref LL_EXTI_LINE_0
992 * @arg @ref LL_EXTI_LINE_1
993 * @arg @ref LL_EXTI_LINE_2
994 * @arg @ref LL_EXTI_LINE_3
995 * @arg @ref LL_EXTI_LINE_4
996 * @arg @ref LL_EXTI_LINE_5
997 * @arg @ref LL_EXTI_LINE_6
998 * @arg @ref LL_EXTI_LINE_7
999 * @arg @ref LL_EXTI_LINE_8
1000 * @arg @ref LL_EXTI_LINE_9
1001 * @arg @ref LL_EXTI_LINE_10
1002 * @arg @ref LL_EXTI_LINE_11
1003 * @arg @ref LL_EXTI_LINE_12
1004 * @arg @ref LL_EXTI_LINE_13
1005 * @arg @ref LL_EXTI_LINE_14
1006 * @arg @ref LL_EXTI_LINE_15
1007 * @arg @ref LL_EXTI_LINE_16
1008 * @note Please check each device line mapping for EXTI Line availability
1009 * @retval State of bit (1 or 0).
1010 */
LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)1011 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)
1012 {
1013 return ((READ_BIT(EXTI->RTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1014 }
1015
1016
1017 /**
1018 * @brief Check if rising edge trigger is enabled for Lines in range 32 to 63
1019 * @rmtoll RTSR2 RTx LL_EXTI_IsEnabledRisingTrig_32_63
1020 * @param ExtiLine This parameter can be a combination of the following values:
1021 * @arg @ref LL_EXTI_LINE_46
1022 * @arg @ref LL_EXTI_LINE_50
1023 * @arg @ref LL_EXTI_LINE_53
1024 *
1025 * (*) : Not available for all stm32h5xxxx family lines.
1026 * @note Please check each device line mapping for EXTI Line availability
1027 * @retval State of bit (1 or 0).
1028 */
LL_EXTI_IsEnabledRisingTrig_32_63(uint32_t ExtiLine)1029 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_32_63(uint32_t ExtiLine)
1030 {
1031 return ((READ_BIT(EXTI->RTSR2, ExtiLine) == (ExtiLine)) ? 1U : 0U);
1032 }
1033
1034 /**
1035 * @}
1036 */
1037
1038 /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
1039 * @{
1040 */
1041
1042 /**
1043 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
1044 * @note The configurable wakeup lines are edge-triggered. No glitch must be
1045 * generated on these lines. If a falling edge on a configurable interrupt
1046 * line occurs during a write operation in the EXTI_FTSR register, the
1047 * pending bit is not set.
1048 * Rising and falling edge triggers can be set for
1049 * the same interrupt line. In this case, both generate a trigger
1050 * condition.
1051 * @rmtoll FTSR1 FTx LL_EXTI_EnableFallingTrig_0_31
1052 * @param ExtiLine This parameter can be a combination of the following values:
1053 * @arg @ref LL_EXTI_LINE_0
1054 * @arg @ref LL_EXTI_LINE_1
1055 * @arg @ref LL_EXTI_LINE_2
1056 * @arg @ref LL_EXTI_LINE_3
1057 * @arg @ref LL_EXTI_LINE_4
1058 * @arg @ref LL_EXTI_LINE_5
1059 * @arg @ref LL_EXTI_LINE_6
1060 * @arg @ref LL_EXTI_LINE_7
1061 * @arg @ref LL_EXTI_LINE_8
1062 * @arg @ref LL_EXTI_LINE_9
1063 * @arg @ref LL_EXTI_LINE_10
1064 * @arg @ref LL_EXTI_LINE_11
1065 * @arg @ref LL_EXTI_LINE_12
1066 * @arg @ref LL_EXTI_LINE_13
1067 * @arg @ref LL_EXTI_LINE_14
1068 * @arg @ref LL_EXTI_LINE_15
1069 * @arg @ref LL_EXTI_LINE_16
1070 * @note Please check each device line mapping for EXTI Line availability
1071 * @retval None
1072 */
LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)1073 __STATIC_INLINE void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)
1074 {
1075 SET_BIT(EXTI->FTSR1, ExtiLine);
1076 }
1077
1078 /**
1079 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
1080 * @note The configurable wakeup lines are edge-triggered. No glitch must be
1081 * generated on these lines. If a Falling edge on a configurable interrupt
1082 * line occurs during a write operation in the EXTI_FTSR register, the
1083 * pending bit is not set.
1084 * Rising and falling edge triggers can be set for
1085 * the same interrupt line. In this case, both generate a trigger
1086 * condition.
1087 * @rmtoll FTSR2 FTx LL_EXTI_EnableFallingTrig_32_63
1088 * @param ExtiLine This parameter can be a combination of the following values:
1089 * @arg @ref LL_EXTI_LINE_46
1090 * @arg @ref LL_EXTI_LINE_50
1091 * @arg @ref LL_EXTI_LINE_53
1092 *
1093 * @note Please check each device line mapping for EXTI Line availability
1094 * @retval None
1095 */
LL_EXTI_EnableFallingTrig_32_63(uint32_t ExtiLine)1096 __STATIC_INLINE void LL_EXTI_EnableFallingTrig_32_63(uint32_t ExtiLine)
1097 {
1098 SET_BIT(EXTI->FTSR2, ExtiLine);
1099 }
1100
1101 /**
1102 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
1103 * @note The configurable wakeup lines are edge-triggered. No glitch must be
1104 * generated on these lines. If a Falling edge on a configurable interrupt
1105 * line occurs during a write operation in the EXTI_FTSR register, the
1106 * pending bit is not set.
1107 * Rising and falling edge triggers can be set for the same interrupt line.
1108 * In this case, both generate a trigger condition.
1109 * @rmtoll FTSR1 FTx LL_EXTI_DisableFallingTrig_0_31
1110 * @param ExtiLine This parameter can be a combination of the following values:
1111 * @arg @ref LL_EXTI_LINE_0
1112 * @arg @ref LL_EXTI_LINE_1
1113 * @arg @ref LL_EXTI_LINE_2
1114 * @arg @ref LL_EXTI_LINE_3
1115 * @arg @ref LL_EXTI_LINE_4
1116 * @arg @ref LL_EXTI_LINE_5
1117 * @arg @ref LL_EXTI_LINE_6
1118 * @arg @ref LL_EXTI_LINE_7
1119 * @arg @ref LL_EXTI_LINE_8
1120 * @arg @ref LL_EXTI_LINE_9
1121 * @arg @ref LL_EXTI_LINE_10
1122 * @arg @ref LL_EXTI_LINE_11
1123 * @arg @ref LL_EXTI_LINE_12
1124 * @arg @ref LL_EXTI_LINE_13
1125 * @arg @ref LL_EXTI_LINE_14
1126 * @arg @ref LL_EXTI_LINE_15
1127 * @arg @ref LL_EXTI_LINE_16
1128 * @note Please check each device line mapping for EXTI Line availability
1129 * @retval None
1130 */
LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)1131 __STATIC_INLINE void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)
1132 {
1133 CLEAR_BIT(EXTI->FTSR1, ExtiLine);
1134 }
1135
1136 /**
1137 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
1138 * @note The configurable wakeup lines are edge-triggered. No glitch must be
1139 * generated on these lines. If a Falling edge on a configurable interrupt
1140 * line occurs during a write operation in the EXTI_FTSR register, the
1141 * pending bit is not set.
1142 * Rising and falling edge triggers can be set for the same interrupt line.
1143 * In this case, both generate a trigger condition.
1144 * @rmtoll FTSR2 FTx LL_EXTI_DisableFallingTrig_32_63
1145 * @param ExtiLine This parameter can be a combination of the following values:
1146 * @arg @ref LL_EXTI_LINE_46
1147 * @arg @ref LL_EXTI_LINE_50
1148 * @arg @ref LL_EXTI_LINE_53
1149 *
1150 * (*) : Not available for all stm32h5xxxx family lines.
1151 * @note Please check each device line mapping for EXTI Line availability
1152 * @retval None
1153 */
LL_EXTI_DisableFallingTrig_32_63(uint32_t ExtiLine)1154 __STATIC_INLINE void LL_EXTI_DisableFallingTrig_32_63(uint32_t ExtiLine)
1155 {
1156 CLEAR_BIT(EXTI->FTSR2, ExtiLine);
1157 }
1158
1159 /**
1160 * @brief Check if falling edge trigger is enabled for Lines in range 0 to 31
1161 * @rmtoll FTSR1 FTx LL_EXTI_IsEnabledFallingTrig_0_31
1162 * @param ExtiLine This parameter can be a combination of the following values:
1163 * @arg @ref LL_EXTI_LINE_0
1164 * @arg @ref LL_EXTI_LINE_1
1165 * @arg @ref LL_EXTI_LINE_2
1166 * @arg @ref LL_EXTI_LINE_3
1167 * @arg @ref LL_EXTI_LINE_4
1168 * @arg @ref LL_EXTI_LINE_5
1169 * @arg @ref LL_EXTI_LINE_6
1170 * @arg @ref LL_EXTI_LINE_7
1171 * @arg @ref LL_EXTI_LINE_8
1172 * @arg @ref LL_EXTI_LINE_9
1173 * @arg @ref LL_EXTI_LINE_10
1174 * @arg @ref LL_EXTI_LINE_11
1175 * @arg @ref LL_EXTI_LINE_12
1176 * @arg @ref LL_EXTI_LINE_13
1177 * @arg @ref LL_EXTI_LINE_14
1178 * @arg @ref LL_EXTI_LINE_15
1179 * @arg @ref LL_EXTI_LINE_16
1180 * @note Please check each device line mapping for EXTI Line availability
1181 * @retval State of bit (1 or 0).
1182 */
LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine)1183 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine)
1184 {
1185 return ((READ_BIT(EXTI->FTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1186 }
1187
1188 /**
1189 * @brief Check if falling edge trigger is enabled for Lines in range 32 to 63
1190 * @rmtoll FTSR2 FTx LL_EXTI_IsEnabledFallingTrig_32_63
1191 * @param ExtiLine This parameter can be a combination of the following values:
1192 * @arg @ref LL_EXTI_LINE_46
1193 * @arg @ref LL_EXTI_LINE_50
1194 * @arg @ref LL_EXTI_LINE_53
1195 *
1196 * (*) : Not available for all stm32h5xxxx family lines.
1197 * @note Please check each device line mapping for EXTI Line availability
1198 * @retval State of bit (1 or 0).
1199 */
LL_EXTI_IsEnabledFallingTrig_32_63(uint32_t ExtiLine)1200 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_32_63(uint32_t ExtiLine)
1201 {
1202 return ((READ_BIT(EXTI->FTSR2, ExtiLine) == (ExtiLine)) ? 1U : 0U);
1203 }
1204
1205 /**
1206 * @}
1207 */
1208
1209 /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
1210 * @{
1211 */
1212
1213 /**
1214 * @brief Generate a software Interrupt Event for Lines in range 0 to 31
1215 * @note If the interrupt is enabled on this line in the EXTI_C1IMR1, writing a 1 to
1216 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR1
1217 * resulting in an interrupt request generation.
1218 * This bit is cleared by clearing the corresponding bit in the EXTI_PR1
1219 * register (by writing a 1 into the bit)
1220 * @rmtoll SWIER1 SWIx LL_EXTI_GenerateSWI_0_31
1221 * @param ExtiLine This parameter can be a combination of the following values:
1222 * @arg @ref LL_EXTI_LINE_0
1223 * @arg @ref LL_EXTI_LINE_1
1224 * @arg @ref LL_EXTI_LINE_2
1225 * @arg @ref LL_EXTI_LINE_3
1226 * @arg @ref LL_EXTI_LINE_4
1227 * @arg @ref LL_EXTI_LINE_5
1228 * @arg @ref LL_EXTI_LINE_6
1229 * @arg @ref LL_EXTI_LINE_7
1230 * @arg @ref LL_EXTI_LINE_8
1231 * @arg @ref LL_EXTI_LINE_9
1232 * @arg @ref LL_EXTI_LINE_10
1233 * @arg @ref LL_EXTI_LINE_11
1234 * @arg @ref LL_EXTI_LINE_12
1235 * @arg @ref LL_EXTI_LINE_13
1236 * @arg @ref LL_EXTI_LINE_14
1237 * @arg @ref LL_EXTI_LINE_15
1238 * @arg @ref LL_EXTI_LINE_16
1239 * @note Please check each device line mapping for EXTI Line availability
1240 * @retval None
1241 */
LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)1242 __STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)
1243 {
1244 SET_BIT(EXTI->SWIER1, ExtiLine);
1245 }
1246
1247 /**
1248 * @brief Generate a software Interrupt Event for Lines in range 32 to 63
1249 * @note If the interrupt is enabled on this line in the EXTI_IMR2, writing a 1 to
1250 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR2
1251 * resulting in an interrupt request generation.
1252 * This bit is cleared by clearing the corresponding bit in the EXTI_PR2
1253 * register (by writing a 1 into the bit)
1254 * @rmtoll SWIER2 SWIx LL_EXTI_GenerateSWI_32_63
1255 * @param ExtiLine This parameter can be a combination of the following values:
1256 * @arg @ref LL_EXTI_LINE_46
1257 * @arg @ref LL_EXTI_LINE_50
1258 * @arg @ref LL_EXTI_LINE_53
1259 *
1260 * @note Please check each device line mapping for EXTI Line availability
1261 * @retval None
1262 */
LL_EXTI_GenerateSWI_32_63(uint32_t ExtiLine)1263 __STATIC_INLINE void LL_EXTI_GenerateSWI_32_63(uint32_t ExtiLine)
1264 {
1265 SET_BIT(EXTI->SWIER2, ExtiLine);
1266 }
1267
1268 /**
1269 * @}
1270 */
1271
1272 /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
1273 * @{
1274 */
1275
1276 /**
1277 * @brief Check if the ExtLine Falling Flag is set or not for Lines in range 0 to 31
1278 * @note This bit is set when the falling edge event arrives on the interrupt
1279 * line. This bit is cleared by writing a 1 to the bit.
1280 * @rmtoll FPR1 FPIFx LL_EXTI_IsActiveFallingFlag_0_31
1281 * @param ExtiLine This parameter can be a combination of the following values:
1282 * @arg @ref LL_EXTI_LINE_0
1283 * @arg @ref LL_EXTI_LINE_1
1284 * @arg @ref LL_EXTI_LINE_2
1285 * @arg @ref LL_EXTI_LINE_3
1286 * @arg @ref LL_EXTI_LINE_4
1287 * @arg @ref LL_EXTI_LINE_5
1288 * @arg @ref LL_EXTI_LINE_6
1289 * @arg @ref LL_EXTI_LINE_7
1290 * @arg @ref LL_EXTI_LINE_8
1291 * @arg @ref LL_EXTI_LINE_9
1292 * @arg @ref LL_EXTI_LINE_10
1293 * @arg @ref LL_EXTI_LINE_11
1294 * @arg @ref LL_EXTI_LINE_12
1295 * @arg @ref LL_EXTI_LINE_13
1296 * @arg @ref LL_EXTI_LINE_14
1297 * @arg @ref LL_EXTI_LINE_15
1298 * @arg @ref LL_EXTI_LINE_16
1299 * @note Please check each device line mapping for EXTI Line availability
1300 * @retval State of bit (1 or 0).
1301 */
LL_EXTI_IsActiveFallingFlag_0_31(uint32_t ExtiLine)1302 __STATIC_INLINE uint32_t LL_EXTI_IsActiveFallingFlag_0_31(uint32_t ExtiLine)
1303 {
1304 return ((READ_BIT(EXTI->FPR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1305 }
1306
1307 /**
1308 * @brief Check if the ExtLine Falling Flag is set or not for Lines in range 32 to 63
1309 * @note This bit is set when the falling edge event arrives on the interrupt
1310 * line. This bit is cleared by writing a 1 to the bit.
1311 * @rmtoll FPR2 FPIFx LL_EXTI_IsActiveFallingFlag_32_63
1312 * @param ExtiLine This parameter can be a combination of the following values:
1313 * @arg @ref LL_EXTI_LINE_46
1314 * @arg @ref LL_EXTI_LINE_50
1315 * @arg @ref LL_EXTI_LINE_53
1316 *
1317 * @note Please check each device line mapping for EXTI Line availability
1318 * @retval State of bit (1 or 0).
1319 */
LL_EXTI_IsActiveFallingFlag_32_63(uint32_t ExtiLine)1320 __STATIC_INLINE uint32_t LL_EXTI_IsActiveFallingFlag_32_63(uint32_t ExtiLine)
1321 {
1322 return ((READ_BIT(EXTI->FPR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1323 }
1324
1325 /**
1326 * @brief Read ExtLine Combination Falling Flag for Lines in range 0 to 31
1327 * @note This bit is set when the falling edge event arrives on the interrupt
1328 * line. This bit is cleared by writing a 1 to the bit.
1329 * @rmtoll FPR1 FPIFx LL_EXTI_ReadFallingFlag_0_31
1330 * @param ExtiLine This parameter can be a combination of the following values:
1331 * @arg @ref LL_EXTI_LINE_0
1332 * @arg @ref LL_EXTI_LINE_1
1333 * @arg @ref LL_EXTI_LINE_2
1334 * @arg @ref LL_EXTI_LINE_3
1335 * @arg @ref LL_EXTI_LINE_4
1336 * @arg @ref LL_EXTI_LINE_5
1337 * @arg @ref LL_EXTI_LINE_6
1338 * @arg @ref LL_EXTI_LINE_7
1339 * @arg @ref LL_EXTI_LINE_8
1340 * @arg @ref LL_EXTI_LINE_9
1341 * @arg @ref LL_EXTI_LINE_10
1342 * @arg @ref LL_EXTI_LINE_11
1343 * @arg @ref LL_EXTI_LINE_12
1344 * @arg @ref LL_EXTI_LINE_13
1345 * @arg @ref LL_EXTI_LINE_14
1346 * @arg @ref LL_EXTI_LINE_15
1347 * @arg @ref LL_EXTI_LINE_16
1348 * @note Please check each device line mapping for EXTI Line availability
1349 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1350 */
LL_EXTI_ReadFallingFlag_0_31(uint32_t ExtiLine)1351 __STATIC_INLINE uint32_t LL_EXTI_ReadFallingFlag_0_31(uint32_t ExtiLine)
1352 {
1353 return (uint32_t)(READ_BIT(EXTI->FPR1, ExtiLine));
1354 }
1355
1356 /**
1357 * @brief Read ExtLine Combination Falling Flag for Lines in range 32 to 63
1358 * @note This bit is set when the falling edge event arrives on the interrupt
1359 * line. This bit is cleared by writing a 1 to the bit.
1360 * @rmtoll FPR2 FPIFx LL_EXTI_ReadFallingFlag_32_63
1361 * @param ExtiLine This parameter can be a combination of the following values:
1362 * @arg @ref LL_EXTI_LINE_46
1363 * @arg @ref LL_EXTI_LINE_50
1364 * @arg @ref LL_EXTI_LINE_53
1365 *
1366 * @note Please check each device line mapping for EXTI Line availability
1367 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1368 */
LL_EXTI_ReadFallingFlag_32_63(uint32_t ExtiLine)1369 __STATIC_INLINE uint32_t LL_EXTI_ReadFallingFlag_32_63(uint32_t ExtiLine)
1370 {
1371 return (uint32_t)(READ_BIT(EXTI->FPR2, ExtiLine));
1372 }
1373
1374 /**
1375 * @brief Clear ExtLine Falling Flags for Lines in range 0 to 31
1376 * @note This bit is set when the falling edge event arrives on the interrupt
1377 * line. This bit is cleared by writing a 1 to the bit.
1378 * @rmtoll FPR1 FPIFx LL_EXTI_ClearFallingFlag_0_31
1379 * @param ExtiLine This parameter can be a combination of the following values:
1380 * @arg @ref LL_EXTI_LINE_0
1381 * @arg @ref LL_EXTI_LINE_1
1382 * @arg @ref LL_EXTI_LINE_2
1383 * @arg @ref LL_EXTI_LINE_3
1384 * @arg @ref LL_EXTI_LINE_4
1385 * @arg @ref LL_EXTI_LINE_5
1386 * @arg @ref LL_EXTI_LINE_6
1387 * @arg @ref LL_EXTI_LINE_7
1388 * @arg @ref LL_EXTI_LINE_8
1389 * @arg @ref LL_EXTI_LINE_9
1390 * @arg @ref LL_EXTI_LINE_10
1391 * @arg @ref LL_EXTI_LINE_11
1392 * @arg @ref LL_EXTI_LINE_12
1393 * @arg @ref LL_EXTI_LINE_13
1394 * @arg @ref LL_EXTI_LINE_14
1395 * @arg @ref LL_EXTI_LINE_15
1396 * @arg @ref LL_EXTI_LINE_16
1397 * @note Please check each device line mapping for EXTI Line availability
1398 * @retval None
1399 */
LL_EXTI_ClearFallingFlag_0_31(uint32_t ExtiLine)1400 __STATIC_INLINE void LL_EXTI_ClearFallingFlag_0_31(uint32_t ExtiLine)
1401 {
1402 WRITE_REG(EXTI->FPR1, ExtiLine);
1403 }
1404
1405 /**
1406 * @brief Clear ExtLine Falling Flags for Lines in range 32 to 63
1407 * @note This bit is set when the falling edge event arrives on the interrupt
1408 * line. This bit is cleared by writing a 1 to the bit.
1409 * @rmtoll FPR2 FPIFx LL_EXTI_ClearFallingFlag_32_63
1410 * @param ExtiLine This parameter can be a combination of the following values:
1411 * @arg @ref LL_EXTI_LINE_46
1412 * @arg @ref LL_EXTI_LINE_50
1413 * @arg @ref LL_EXTI_LINE_53
1414 *
1415 * (*) : Not available for all stm32h5xxxx family lines.
1416 * @note Please check each device line mapping for EXTI Line availability
1417 * @retval None
1418 */
LL_EXTI_ClearFallingFlag_32_63(uint32_t ExtiLine)1419 __STATIC_INLINE void LL_EXTI_ClearFallingFlag_32_63(uint32_t ExtiLine)
1420 {
1421 WRITE_REG(EXTI->FPR2, ExtiLine);
1422 }
1423
1424 /**
1425 * @brief Check if the ExtLine Rising Flag is set or not for Lines in range 0 to 31
1426 * @note This bit is set when the Rising edge event arrives on the interrupt
1427 * line. This bit is cleared by writing a 1 to the bit.
1428 * @rmtoll RPR1 RPIFx LL_EXTI_IsActiveRisingFlag_0_31
1429 * @param ExtiLine This parameter can be a combination of the following values:
1430 * @arg @ref LL_EXTI_LINE_0
1431 * @arg @ref LL_EXTI_LINE_1
1432 * @arg @ref LL_EXTI_LINE_2
1433 * @arg @ref LL_EXTI_LINE_3
1434 * @arg @ref LL_EXTI_LINE_4
1435 * @arg @ref LL_EXTI_LINE_5
1436 * @arg @ref LL_EXTI_LINE_6
1437 * @arg @ref LL_EXTI_LINE_7
1438 * @arg @ref LL_EXTI_LINE_8
1439 * @arg @ref LL_EXTI_LINE_9
1440 * @arg @ref LL_EXTI_LINE_10
1441 * @arg @ref LL_EXTI_LINE_11
1442 * @arg @ref LL_EXTI_LINE_12
1443 * @arg @ref LL_EXTI_LINE_13
1444 * @arg @ref LL_EXTI_LINE_14
1445 * @arg @ref LL_EXTI_LINE_15
1446 * @arg @ref LL_EXTI_LINE_16
1447 * @note Please check each device line mapping for EXTI Line availability
1448 * @retval State of bit (1 or 0).
1449 */
LL_EXTI_IsActiveRisingFlag_0_31(uint32_t ExtiLine)1450 __STATIC_INLINE uint32_t LL_EXTI_IsActiveRisingFlag_0_31(uint32_t ExtiLine)
1451 {
1452 return ((READ_BIT(EXTI->RPR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1453 }
1454
1455 /**
1456 * @brief Check if the ExtLine Rising Flag is set or not for Lines in range 32 to 63
1457 * @note This bit is set when the rising edge event arrives on the interrupt
1458 * line. This bit is cleared by writing a 1 to the bit.
1459 * @rmtoll RPR2 RPIFx LL_EXTI_IsActiveRisingFlag_32_63
1460 * @param ExtiLine This parameter can be a combination of the following values:
1461 * @arg @ref LL_EXTI_LINE_46
1462 * @arg @ref LL_EXTI_LINE_50
1463 * @arg @ref LL_EXTI_LINE_53
1464 *
1465 * (*) : Not available for all stm32h5xxxx family lines.
1466 * @note Please check each device line mapping for EXTI Line availability
1467 * @retval State of bit (1 or 0).
1468 */
LL_EXTI_IsActiveRisingFlag_32_63(uint32_t ExtiLine)1469 __STATIC_INLINE uint32_t LL_EXTI_IsActiveRisingFlag_32_63(uint32_t ExtiLine)
1470 {
1471 return ((READ_BIT(EXTI->RPR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1472 }
1473
1474 /**
1475 * @brief Read ExtLine Combination Rising Flag for Lines in range 0 to 31
1476 * @note This bit is set when the Rising edge event arrives on the interrupt
1477 * line. This bit is cleared by writing a 1 to the bit.
1478 * @rmtoll RPR1 RPIFx LL_EXTI_ReadRisingFlag_0_31
1479 * @param ExtiLine This parameter can be a combination of the following values:
1480 * @arg @ref LL_EXTI_LINE_0
1481 * @arg @ref LL_EXTI_LINE_1
1482 * @arg @ref LL_EXTI_LINE_2
1483 * @arg @ref LL_EXTI_LINE_3
1484 * @arg @ref LL_EXTI_LINE_4
1485 * @arg @ref LL_EXTI_LINE_5
1486 * @arg @ref LL_EXTI_LINE_6
1487 * @arg @ref LL_EXTI_LINE_7
1488 * @arg @ref LL_EXTI_LINE_8
1489 * @arg @ref LL_EXTI_LINE_9
1490 * @arg @ref LL_EXTI_LINE_10
1491 * @arg @ref LL_EXTI_LINE_11
1492 * @arg @ref LL_EXTI_LINE_12
1493 * @arg @ref LL_EXTI_LINE_13
1494 * @arg @ref LL_EXTI_LINE_14
1495 * @arg @ref LL_EXTI_LINE_15
1496 * @arg @ref LL_EXTI_LINE_16
1497 * @note Please check each device line mapping for EXTI Line availability
1498 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1499 */
LL_EXTI_ReadRisingFlag_0_31(uint32_t ExtiLine)1500 __STATIC_INLINE uint32_t LL_EXTI_ReadRisingFlag_0_31(uint32_t ExtiLine)
1501 {
1502 return (uint32_t)(READ_BIT(EXTI->RPR1, ExtiLine));
1503 }
1504
1505 /**
1506 * @brief Read ExtLine Combination Rising Flag for Lines in range 32 to 63
1507 * @note This bit is set when the rising edge event arrives on the interrupt
1508 * line. This bit is cleared by writing a 1 to the bit.
1509 * @rmtoll RPR2 RPIFx LL_EXTI_ReadRisingFlag_32_63
1510 * @param ExtiLine This parameter can be a combination of the following values:
1511 * @arg @ref LL_EXTI_LINE_46
1512 * @arg @ref LL_EXTI_LINE_50
1513 * @arg @ref LL_EXTI_LINE_53
1514 *
1515 * @note Please check each device line mapping for EXTI Line availability
1516 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1517 */
LL_EXTI_ReadRisingFlag_32_63(uint32_t ExtiLine)1518 __STATIC_INLINE uint32_t LL_EXTI_ReadRisingFlag_32_63(uint32_t ExtiLine)
1519 {
1520 return (uint32_t)(READ_BIT(EXTI->RPR2, ExtiLine));
1521 }
1522
1523 /**
1524 * @brief Clear ExtLine Rising Flags for Lines in range 0 to 31
1525 * @note This bit is set when the Rising edge event arrives on the interrupt
1526 * line. This bit is cleared by writing a 1 to the bit.
1527 * @rmtoll RPR1 RPIFx LL_EXTI_ClearRisingFlag_0_31
1528 * @param ExtiLine This parameter can be a combination of the following values:
1529 * @arg @ref LL_EXTI_LINE_0
1530 * @arg @ref LL_EXTI_LINE_1
1531 * @arg @ref LL_EXTI_LINE_2
1532 * @arg @ref LL_EXTI_LINE_3
1533 * @arg @ref LL_EXTI_LINE_4
1534 * @arg @ref LL_EXTI_LINE_5
1535 * @arg @ref LL_EXTI_LINE_6
1536 * @arg @ref LL_EXTI_LINE_7
1537 * @arg @ref LL_EXTI_LINE_8
1538 * @arg @ref LL_EXTI_LINE_9
1539 * @arg @ref LL_EXTI_LINE_10
1540 * @arg @ref LL_EXTI_LINE_11
1541 * @arg @ref LL_EXTI_LINE_12
1542 * @arg @ref LL_EXTI_LINE_13
1543 * @arg @ref LL_EXTI_LINE_14
1544 * @arg @ref LL_EXTI_LINE_15
1545 * @arg @ref LL_EXTI_LINE_16
1546 * @note Please check each device line mapping for EXTI Line availability
1547 * @retval None
1548 */
LL_EXTI_ClearRisingFlag_0_31(uint32_t ExtiLine)1549 __STATIC_INLINE void LL_EXTI_ClearRisingFlag_0_31(uint32_t ExtiLine)
1550 {
1551 WRITE_REG(EXTI->RPR1, ExtiLine);
1552 }
1553
1554 /**
1555 * @brief Clear ExtLine Rising Flags for Lines in range 32 to 63
1556 * @note This bit is set when the rising edge event arrives on the interrupt
1557 * line. This bit is cleared by writing a 1 to the bit.
1558 * @rmtoll RPR2 RPIFx LL_EXTI_ClearRisingFlag_32_63
1559 * @param ExtiLine This parameter can be a combination of the following values:
1560 * @arg @ref LL_EXTI_LINE_46
1561 * @arg @ref LL_EXTI_LINE_50
1562 * @arg @ref LL_EXTI_LINE_53
1563 *
1564 * @note Please check each device line mapping for EXTI Line availability
1565 * @retval None
1566 */
LL_EXTI_ClearRisingFlag_32_63(uint32_t ExtiLine)1567 __STATIC_INLINE void LL_EXTI_ClearRisingFlag_32_63(uint32_t ExtiLine)
1568 {
1569 WRITE_REG(EXTI->RPR2, ExtiLine);
1570 }
1571
1572 /**
1573 * @}
1574 */
1575 /** @defgroup EXTI_LL_EF_Config EF configuration functions
1576 * @{
1577 */
1578
1579 /**
1580 * @brief Configure source input for the EXTI external interrupt.
1581 * @rmtoll EXTI_EXTICR1 EXTI0 LL_EXTI_SetEXTISource\n
1582 * EXTI_EXTICR1 EXTI1 LL_EXTI_SetEXTISource\n
1583 * EXTI_EXTICR1 EXTI2 LL_EXTI_SetEXTISource\n
1584 * EXTI_EXTICR1 EXTI3 LL_EXTI_SetEXTISource\n
1585 * EXTI_EXTICR2 EXTI4 LL_EXTI_SetEXTISource\n
1586 * EXTI_EXTICR2 EXTI5 LL_EXTI_SetEXTISource\n
1587 * EXTI_EXTICR2 EXTI6 LL_EXTI_SetEXTISource\n
1588 * EXTI_EXTICR2 EXTI7 LL_EXTI_SetEXTISource\n
1589 * EXTI_EXTICR3 EXTI8 LL_EXTI_SetEXTISource\n
1590 * EXTI_EXTICR3 EXTI9 LL_EXTI_SetEXTISource\n
1591 * EXTI_EXTICR3 EXTI10 LL_EXTI_SetEXTISource\n
1592 * EXTI_EXTICR3 EXTI11 LL_EXTI_SetEXTISource\n
1593 * EXTI_EXTICR4 EXTI12 LL_EXTI_SetEXTISource\n
1594 * EXTI_EXTICR4 EXTI13 LL_EXTI_SetEXTISource\n
1595 * EXTI_EXTICR4 EXTI14 LL_EXTI_SetEXTISource\n
1596 * EXTI_EXTICR4 EXTI15 LL_EXTI_SetEXTISource
1597 * @param Port This parameter can be one of the following values:
1598 * @arg @ref LL_EXTI_EXTI_PORTA
1599 * @arg @ref LL_EXTI_EXTI_PORTB
1600 * @arg @ref LL_EXTI_EXTI_PORTC
1601 * @arg @ref LL_EXTI_EXTI_PORTD
1602 * @arg @ref LL_EXTI_EXTI_PORTE (*)
1603 * @arg @ref LL_EXTI_EXTI_PORTF (*)
1604 * @arg @ref LL_EXTI_EXTI_PORTG (*)
1605 * @arg @ref LL_EXTI_EXTI_PORTH
1606 * @arg @ref LL_EXTI_EXTI_PORTI (*)
1607 *
1608 * (*) value not defined in all devices
1609 * @param Line This parameter can be one of the following values:
1610 * @arg @ref LL_EXTI_EXTI_LINE0
1611 * @arg @ref LL_EXTI_EXTI_LINE1
1612 * @arg @ref LL_EXTI_EXTI_LINE2
1613 * @arg @ref LL_EXTI_EXTI_LINE3
1614 * @arg @ref LL_EXTI_EXTI_LINE4
1615 * @arg @ref LL_EXTI_EXTI_LINE5
1616 * @arg @ref LL_EXTI_EXTI_LINE6
1617 * @arg @ref LL_EXTI_EXTI_LINE7
1618 * @arg @ref LL_EXTI_EXTI_LINE8
1619 * @arg @ref LL_EXTI_EXTI_LINE9
1620 * @arg @ref LL_EXTI_EXTI_LINE10
1621 * @arg @ref LL_EXTI_EXTI_LINE11
1622 * @arg @ref LL_EXTI_EXTI_LINE12
1623 * @arg @ref LL_EXTI_EXTI_LINE13
1624 * @arg @ref LL_EXTI_EXTI_LINE14
1625 * @arg @ref LL_EXTI_EXTI_LINE15
1626 * @retval None
1627 */
LL_EXTI_SetEXTISource(uint32_t Port,uint32_t Line)1628 __STATIC_INLINE void LL_EXTI_SetEXTISource(uint32_t Port, uint32_t Line)
1629 {
1630 MODIFY_REG(EXTI->EXTICR[Line & 0x03U], EXTI_EXTICR1_EXTI0 << (Line >> LL_EXTI_REGISTER_PINPOS_SHFT), \
1631 Port << (Line >> LL_EXTI_REGISTER_PINPOS_SHFT));
1632 }
1633
1634 /**
1635 * @brief Get the configured defined for specific EXTI Line
1636 * @rmtoll EXTI_EXTICR1 EXTI0 LL_EXTI_GetEXTISource\n
1637 * EXTI_EXTICR1 EXTI1 LL_EXTI_GetEXTISource\n
1638 * EXTI_EXTICR1 EXTI2 LL_EXTI_GetEXTISource\n
1639 * EXTI_EXTICR1 EXTI3 LL_EXTI_GetEXTISource\n
1640 * EXTI_EXTICR2 EXTI4 LL_EXTI_GetEXTISource\n
1641 * EXTI_EXTICR2 EXTI5 LL_EXTI_GetEXTISource\n
1642 * EXTI_EXTICR2 EXTI6 LL_EXTI_GetEXTISource\n
1643 * EXTI_EXTICR2 EXTI7 LL_EXTI_GetEXTISource\n
1644 * EXTI_EXTICR3 EXTI8 LL_EXTI_GetEXTISource\n
1645 * EXTI_EXTICR3 EXTI9 LL_EXTI_GetEXTISource\n
1646 * EXTI_EXTICR3 EXTI10 LL_EXTI_GetEXTISource\n
1647 * EXTI_EXTICR3 EXTI11 LL_EXTI_GetEXTISource\n
1648 * EXTI_EXTICR4 EXTI12 LL_EXTI_GetEXTISource\n
1649 * EXTI_EXTICR4 EXTI13 LL_EXTI_GetEXTISource\n
1650 * EXTI_EXTICR4 EXTI14 LL_EXTI_GetEXTISource\n
1651 * EXTI_EXTICR4 EXTI15 LL_EXTI_GetEXTISource
1652 * @param Line This parameter can be one of the following values:
1653 * @arg @ref LL_EXTI_EXTI_LINE0
1654 * @arg @ref LL_EXTI_EXTI_LINE1
1655 * @arg @ref LL_EXTI_EXTI_LINE2
1656 * @arg @ref LL_EXTI_EXTI_LINE3
1657 * @arg @ref LL_EXTI_EXTI_LINE4
1658 * @arg @ref LL_EXTI_EXTI_LINE5
1659 * @arg @ref LL_EXTI_EXTI_LINE6
1660 * @arg @ref LL_EXTI_EXTI_LINE7
1661 * @arg @ref LL_EXTI_EXTI_LINE8
1662 * @arg @ref LL_EXTI_EXTI_LINE9
1663 * @arg @ref LL_EXTI_EXTI_LINE10
1664 * @arg @ref LL_EXTI_EXTI_LINE11
1665 * @arg @ref LL_EXTI_EXTI_LINE12
1666 * @arg @ref LL_EXTI_EXTI_LINE13
1667 * @arg @ref LL_EXTI_EXTI_LINE14
1668 * @arg @ref LL_EXTI_EXTI_LINE15
1669 * @retval Returned value can be one of the following values:
1670 * @arg @ref LL_EXTI_EXTI_PORTA
1671 * @arg @ref LL_EXTI_EXTI_PORTB
1672 * @arg @ref LL_EXTI_EXTI_PORTC
1673 * @arg @ref LL_EXTI_EXTI_PORTD
1674 * @arg @ref LL_EXTI_EXTI_PORTE (*)
1675 * @arg @ref LL_EXTI_EXTI_PORTF (*)
1676 * @arg @ref LL_EXTI_EXTI_PORTG (*)
1677 * @arg @ref LL_EXTI_EXTI_PORTH
1678 * @arg @ref LL_EXTI_EXTI_PORTI (*)
1679 *
1680 * (*) value not defined in all devices
1681 */
LL_EXTI_GetEXTISource(uint32_t Line)1682 __STATIC_INLINE uint32_t LL_EXTI_GetEXTISource(uint32_t Line)
1683 {
1684 return (uint32_t)(READ_BIT(EXTI->EXTICR[Line & 0x03U],
1685 (EXTI_EXTICR1_EXTI0 << (Line >> LL_EXTI_REGISTER_PINPOS_SHFT))) >>
1686 (Line >> LL_EXTI_REGISTER_PINPOS_SHFT));
1687 }
1688 /**
1689 * @}
1690 */
1691
1692 /** @defgroup EXTI_LL_EF_Secure_Management Secure_Management
1693 * @{
1694 */
1695
1696 #if defined(__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U)
1697
1698 /**
1699 * @brief Enable ExtiLine Secure attribute for Lines in range 0 to 31
1700 * @rmtoll SECCFGR1 SECx LL_EXTI_EnableSecure_0_31
1701 * @param ExtiLine This parameter can be one of the following values:
1702 * @arg @ref LL_EXTI_LINE_0
1703 * @arg @ref LL_EXTI_LINE_1
1704 * @arg @ref LL_EXTI_LINE_2
1705 * @arg @ref LL_EXTI_LINE_3
1706 * @arg @ref LL_EXTI_LINE_4
1707 * @arg @ref LL_EXTI_LINE_5
1708 * @arg @ref LL_EXTI_LINE_6
1709 * @arg @ref LL_EXTI_LINE_7
1710 * @arg @ref LL_EXTI_LINE_8
1711 * @arg @ref LL_EXTI_LINE_9
1712 * @arg @ref LL_EXTI_LINE_10
1713 * @arg @ref LL_EXTI_LINE_11
1714 * @arg @ref LL_EXTI_LINE_12
1715 * @arg @ref LL_EXTI_LINE_13
1716 * @arg @ref LL_EXTI_LINE_14
1717 * @arg @ref LL_EXTI_LINE_15
1718 * @arg @ref LL_EXTI_LINE_16
1719 * @arg @ref LL_EXTI_LINE_17
1720 * @arg @ref LL_EXTI_LINE_18
1721 * @arg @ref LL_EXTI_LINE_19
1722 * @arg @ref LL_EXTI_LINE_20
1723 * @arg @ref LL_EXTI_LINE_21
1724 * @arg @ref LL_EXTI_LINE_22
1725 * @arg @ref LL_EXTI_LINE_23
1726 * @arg @ref LL_EXTI_LINE_24
1727 * @arg @ref LL_EXTI_LINE_25
1728 * @arg @ref LL_EXTI_LINE_26
1729 * @arg @ref LL_EXTI_LINE_27
1730 * @arg @ref LL_EXTI_LINE_28
1731 * @arg @ref LL_EXTI_LINE_29
1732 * @arg @ref LL_EXTI_LINE_30
1733 * @arg @ref LL_EXTI_LINE_31
1734 * @arg @ref LL_EXTI_LINE_ALL_0_31
1735 * @note Please check each device line mapping for EXTI Line availability
1736 * @retval None
1737 */
LL_EXTI_EnableSecure_0_31(uint32_t ExtiLine)1738 __STATIC_INLINE void LL_EXTI_EnableSecure_0_31(uint32_t ExtiLine)
1739 {
1740 SET_BIT(EXTI->SECCFGR1, ExtiLine);
1741 }
1742
1743 /**
1744 * @brief Enable ExtiLine Secure attribute for Lines in range 32 to 63
1745 * @rmtoll SECCFGR2 SECx LL_EXTI_EnableSecure_32_63
1746 * @param ExtiLine This parameter can be one of the following values:
1747 * @arg @ref LL_EXTI_LINE_32
1748 * @arg @ref LL_EXTI_LINE_33
1749 * @arg @ref LL_EXTI_LINE_34
1750 * @arg @ref LL_EXTI_LINE_35
1751 * @arg @ref LL_EXTI_LINE_36
1752 * @arg @ref LL_EXTI_LINE_37
1753 * @arg @ref LL_EXTI_LINE_38
1754 * @arg @ref LL_EXTI_LINE_39
1755 * @arg @ref LL_EXTI_LINE_40
1756 * @arg @ref LL_EXTI_LINE_41
1757 * @arg @ref LL_EXTI_LINE_42
1758 * @arg @ref LL_EXTI_LINE_43
1759 * @arg @ref LL_EXTI_LINE_44
1760 * @arg @ref LL_EXTI_LINE_46
1761 * @arg @ref LL_EXTI_LINE_47
1762 * @arg @ref LL_EXTI_LINE_48
1763 * @arg @ref LL_EXTI_LINE_49
1764 * @arg @ref LL_EXTI_LINE_50
1765 * @arg @ref LL_EXTI_LINE_51
1766 * @arg @ref LL_EXTI_LINE_52
1767 * @arg @ref LL_EXTI_LINE_53
1768 * @arg @ref LL_EXTI_LINE_54
1769 * @arg @ref LL_EXTI_LINE_55
1770 * @arg @ref LL_EXTI_LINE_56
1771 * @arg @ref LL_EXTI_LINE_57
1772 * @arg @ref LL_EXTI_LINE_58
1773 * @arg @ref LL_EXTI_LINE_ALL_32_63
1774 * @note Please check each device line mapping for EXTI Line availability
1775 * @retval None
1776 */
LL_EXTI_EnableSecure_32_63(uint32_t ExtiLine)1777 __STATIC_INLINE void LL_EXTI_EnableSecure_32_63(uint32_t ExtiLine)
1778 {
1779 SET_BIT(EXTI->SECCFGR2, ExtiLine);
1780 }
1781
1782 /**
1783 * @brief Disable ExtiLine Secure attribute for Lines in range 0 to 31
1784 * @rmtoll SECCFGR1 SECx LL_EXTI_DisableSecure_0_31
1785 * @param ExtiLine This parameter can be one of the following values:
1786 * @arg @ref LL_EXTI_LINE_0
1787 * @arg @ref LL_EXTI_LINE_1
1788 * @arg @ref LL_EXTI_LINE_2
1789 * @arg @ref LL_EXTI_LINE_3
1790 * @arg @ref LL_EXTI_LINE_4
1791 * @arg @ref LL_EXTI_LINE_5
1792 * @arg @ref LL_EXTI_LINE_6
1793 * @arg @ref LL_EXTI_LINE_7
1794 * @arg @ref LL_EXTI_LINE_8
1795 * @arg @ref LL_EXTI_LINE_9
1796 * @arg @ref LL_EXTI_LINE_10
1797 * @arg @ref LL_EXTI_LINE_11
1798 * @arg @ref LL_EXTI_LINE_12
1799 * @arg @ref LL_EXTI_LINE_13
1800 * @arg @ref LL_EXTI_LINE_14
1801 * @arg @ref LL_EXTI_LINE_15
1802 * @arg @ref LL_EXTI_LINE_16
1803 * @arg @ref LL_EXTI_LINE_17
1804 * @arg @ref LL_EXTI_LINE_18
1805 * @arg @ref LL_EXTI_LINE_19
1806 * @arg @ref LL_EXTI_LINE_20
1807 * @arg @ref LL_EXTI_LINE_21
1808 * @arg @ref LL_EXTI_LINE_22
1809 * @arg @ref LL_EXTI_LINE_23
1810 * @arg @ref LL_EXTI_LINE_24
1811 * @arg @ref LL_EXTI_LINE_25
1812 * @arg @ref LL_EXTI_LINE_26
1813 * @arg @ref LL_EXTI_LINE_27
1814 * @arg @ref LL_EXTI_LINE_28
1815 * @arg @ref LL_EXTI_LINE_29
1816 * @arg @ref LL_EXTI_LINE_30
1817 * @arg @ref LL_EXTI_LINE_31
1818 * @arg @ref LL_EXTI_LINE_ALL_0_31
1819 * @note Please check each device line mapping for EXTI Line availability
1820 * @retval None
1821 */
LL_EXTI_DisableSecure_0_31(uint32_t ExtiLine)1822 __STATIC_INLINE void LL_EXTI_DisableSecure_0_31(uint32_t ExtiLine)
1823 {
1824 CLEAR_BIT(EXTI->SECCFGR1, ExtiLine);
1825 }
1826
1827 /**
1828 * @brief Disable ExtiLine Secure attribute for Lines in range 32 to 63
1829 * @rmtoll SECCFGR2 SECx LL_EXTI_DisableSecure_32_63
1830 * @param ExtiLine This parameter can be one of the following values:
1831 * @arg @ref LL_EXTI_LINE_32
1832 * @arg @ref LL_EXTI_LINE_33
1833 * @arg @ref LL_EXTI_LINE_34
1834 * @arg @ref LL_EXTI_LINE_35
1835 * @arg @ref LL_EXTI_LINE_36
1836 * @arg @ref LL_EXTI_LINE_37
1837 * @arg @ref LL_EXTI_LINE_38
1838 * @arg @ref LL_EXTI_LINE_39
1839 * @arg @ref LL_EXTI_LINE_40
1840 * @arg @ref LL_EXTI_LINE_41
1841 * @arg @ref LL_EXTI_LINE_42
1842 * @arg @ref LL_EXTI_LINE_43
1843 * @arg @ref LL_EXTI_LINE_44
1844 * @arg @ref LL_EXTI_LINE_46
1845 * @arg @ref LL_EXTI_LINE_47
1846 * @arg @ref LL_EXTI_LINE_48
1847 * @arg @ref LL_EXTI_LINE_49
1848 * @arg @ref LL_EXTI_LINE_50
1849 * @arg @ref LL_EXTI_LINE_51
1850 * @arg @ref LL_EXTI_LINE_52
1851 * @arg @ref LL_EXTI_LINE_53
1852 * @arg @ref LL_EXTI_LINE_54
1853 * @arg @ref LL_EXTI_LINE_55
1854 * @arg @ref LL_EXTI_LINE_56
1855 * @arg @ref LL_EXTI_LINE_57
1856 * @arg @ref LL_EXTI_LINE_58
1857 * @arg @ref LL_EXTI_LINE_ALL_32_63
1858 * @note Please check each device line mapping for EXTI Line availability
1859 * @retval None
1860 */
LL_EXTI_DisableSecure_32_63(uint32_t ExtiLine)1861 __STATIC_INLINE void LL_EXTI_DisableSecure_32_63(uint32_t ExtiLine)
1862 {
1863 CLEAR_BIT(EXTI->SECCFGR2, ExtiLine);
1864 }
1865
1866 #endif /* __ARM_FEATURE_CMSE */
1867
1868 #if defined(EXTI_SECENR1_SEC0)
1869 /**
1870 * @brief Indicate if ExtiLine Secure attribute is enabled for Lines in range 0 to 31
1871 * @rmtoll SECCFGR1 SECx LL_EXTI_IsEnabledSecure_0_31
1872 * @param ExtiLine This parameter can be one of the following values:
1873 * @arg @ref LL_EXTI_LINE_0
1874 * @arg @ref LL_EXTI_LINE_1
1875 * @arg @ref LL_EXTI_LINE_2
1876 * @arg @ref LL_EXTI_LINE_3
1877 * @arg @ref LL_EXTI_LINE_4
1878 * @arg @ref LL_EXTI_LINE_5
1879 * @arg @ref LL_EXTI_LINE_6
1880 * @arg @ref LL_EXTI_LINE_7
1881 * @arg @ref LL_EXTI_LINE_8
1882 * @arg @ref LL_EXTI_LINE_9
1883 * @arg @ref LL_EXTI_LINE_10
1884 * @arg @ref LL_EXTI_LINE_11
1885 * @arg @ref LL_EXTI_LINE_12
1886 * @arg @ref LL_EXTI_LINE_13
1887 * @arg @ref LL_EXTI_LINE_14
1888 * @arg @ref LL_EXTI_LINE_15
1889 * @arg @ref LL_EXTI_LINE_16
1890 * @arg @ref LL_EXTI_LINE_17
1891 * @arg @ref LL_EXTI_LINE_18
1892 * @arg @ref LL_EXTI_LINE_19
1893 * @arg @ref LL_EXTI_LINE_20
1894 * @arg @ref LL_EXTI_LINE_21
1895 * @arg @ref LL_EXTI_LINE_22
1896 * @arg @ref LL_EXTI_LINE_23
1897 * @arg @ref LL_EXTI_LINE_24
1898 * @arg @ref LL_EXTI_LINE_25
1899 * @arg @ref LL_EXTI_LINE_26
1900 * @arg @ref LL_EXTI_LINE_27
1901 * @arg @ref LL_EXTI_LINE_28
1902 * @arg @ref LL_EXTI_LINE_29
1903 * @arg @ref LL_EXTI_LINE_30
1904 * @arg @ref LL_EXTI_LINE_31
1905 * @arg @ref LL_EXTI_LINE_ALL_0_31
1906 * @note Please check each device line mapping for EXTI Line availability
1907 * @retval State of bit (1 or 0).
1908 */
LL_EXTI_IsEnabledSecure_0_31(uint32_t ExtiLine)1909 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledSecure_0_31(uint32_t ExtiLine)
1910 {
1911 return ((READ_BIT(EXTI->SECCFGR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1912 }
1913
1914 /**
1915 * @brief Indicate if ExtiLine Secure attribute is enabled for Lines in range 32 to 63
1916 * @rmtoll SECCFGR2 SECx LL_EXTI_IsEnabledSecure_32_63
1917 * @param ExtiLine This parameter can be one of the following values:
1918 * @arg @ref LL_EXTI_LINE_32
1919 * @arg @ref LL_EXTI_LINE_33
1920 * @arg @ref LL_EXTI_LINE_34
1921 * @arg @ref LL_EXTI_LINE_35
1922 * @arg @ref LL_EXTI_LINE_36
1923 * @arg @ref LL_EXTI_LINE_37
1924 * @arg @ref LL_EXTI_LINE_38
1925 * @arg @ref LL_EXTI_LINE_39
1926 * @arg @ref LL_EXTI_LINE_40
1927 * @arg @ref LL_EXTI_LINE_41
1928 * @arg @ref LL_EXTI_LINE_42
1929 * @arg @ref LL_EXTI_LINE_43
1930 * @arg @ref LL_EXTI_LINE_44
1931 * @arg @ref LL_EXTI_LINE_46
1932 * @arg @ref LL_EXTI_LINE_47
1933 * @arg @ref LL_EXTI_LINE_48
1934 * @arg @ref LL_EXTI_LINE_49
1935 * @arg @ref LL_EXTI_LINE_50
1936 * @arg @ref LL_EXTI_LINE_51
1937 * @arg @ref LL_EXTI_LINE_52
1938 * @arg @ref LL_EXTI_LINE_53
1939 * @arg @ref LL_EXTI_LINE_54
1940 * @arg @ref LL_EXTI_LINE_55
1941 * @arg @ref LL_EXTI_LINE_56
1942 * @arg @ref LL_EXTI_LINE_57
1943 * @arg @ref LL_EXTI_LINE_58
1944 * @arg @ref LL_EXTI_LINE_ALL_32_63
1945 * @note Please check each device line mapping for EXTI Line availability
1946 * @retval State of bit (1 or 0).
1947 */
LL_EXTI_IsEnabledSecure_32_63(uint32_t ExtiLine)1948 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledSecure_32_63(uint32_t ExtiLine)
1949 {
1950 return ((READ_BIT(EXTI->SECCFGR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1951 }
1952 #endif /* EXTI_SECENR1_SEC0 */
1953
1954 /**
1955 * @}
1956 */
1957
1958 /** @defgroup EXTI_LL_EF_Privilege_Management Privilege_Management
1959 * @{
1960 */
1961
1962 /**
1963 * @brief Enable ExtiLine Privilege attribute for Lines in range 0 to 31
1964 * @rmtoll PRIVCFGR1 PRIVx LL_EXTI_EnablePrivilege_0_31
1965 * @param ExtiLine This parameter can be one of the following values:
1966 * @arg @ref LL_EXTI_LINE_0
1967 * @arg @ref LL_EXTI_LINE_1
1968 * @arg @ref LL_EXTI_LINE_2
1969 * @arg @ref LL_EXTI_LINE_3
1970 * @arg @ref LL_EXTI_LINE_4
1971 * @arg @ref LL_EXTI_LINE_5
1972 * @arg @ref LL_EXTI_LINE_6
1973 * @arg @ref LL_EXTI_LINE_7
1974 * @arg @ref LL_EXTI_LINE_8
1975 * @arg @ref LL_EXTI_LINE_9
1976 * @arg @ref LL_EXTI_LINE_10
1977 * @arg @ref LL_EXTI_LINE_11
1978 * @arg @ref LL_EXTI_LINE_12
1979 * @arg @ref LL_EXTI_LINE_13
1980 * @arg @ref LL_EXTI_LINE_14
1981 * @arg @ref LL_EXTI_LINE_15
1982 * @arg @ref LL_EXTI_LINE_16
1983 * @arg @ref LL_EXTI_LINE_17
1984 * @arg @ref LL_EXTI_LINE_18
1985 * @arg @ref LL_EXTI_LINE_19
1986 * @arg @ref LL_EXTI_LINE_20
1987 * @arg @ref LL_EXTI_LINE_21
1988 * @arg @ref LL_EXTI_LINE_22
1989 * @arg @ref LL_EXTI_LINE_23
1990 * @arg @ref LL_EXTI_LINE_24
1991 * @arg @ref LL_EXTI_LINE_25
1992 * @arg @ref LL_EXTI_LINE_26
1993 * @arg @ref LL_EXTI_LINE_27
1994 * @arg @ref LL_EXTI_LINE_28
1995 * @arg @ref LL_EXTI_LINE_29
1996 * @arg @ref LL_EXTI_LINE_30
1997 * @arg @ref LL_EXTI_LINE_31
1998 * @arg @ref LL_EXTI_LINE_ALL_0_31
1999 * @note Please check each device line mapping for EXTI Line availability
2000 * @retval None
2001 */
LL_EXTI_EnablePrivilege_0_31(uint32_t ExtiLine)2002 __STATIC_INLINE void LL_EXTI_EnablePrivilege_0_31(uint32_t ExtiLine)
2003 {
2004 SET_BIT(EXTI->PRIVCFGR1, ExtiLine);
2005 }
2006
2007 /**
2008 * @brief Enable ExtiLine Privilege attribute for Lines in range 32 to 63
2009 * @rmtoll PRIVCFGR2 PRIVx LL_EXTI_EnablePrivilege_32_63
2010 * @param ExtiLine This parameter can be one of the following values:
2011 * @arg @ref LL_EXTI_LINE_32
2012 * @arg @ref LL_EXTI_LINE_33
2013 * @arg @ref LL_EXTI_LINE_34
2014 * @arg @ref LL_EXTI_LINE_35
2015 * @arg @ref LL_EXTI_LINE_36
2016 * @arg @ref LL_EXTI_LINE_37
2017 * @arg @ref LL_EXTI_LINE_38
2018 * @arg @ref LL_EXTI_LINE_39
2019 * @arg @ref LL_EXTI_LINE_40
2020 * @arg @ref LL_EXTI_LINE_41
2021 * @arg @ref LL_EXTI_LINE_42
2022 * @arg @ref LL_EXTI_LINE_43
2023 * @arg @ref LL_EXTI_LINE_44
2024 * @arg @ref LL_EXTI_LINE_46
2025 * @arg @ref LL_EXTI_LINE_47
2026 * @arg @ref LL_EXTI_LINE_48
2027 * @arg @ref LL_EXTI_LINE_49
2028 * @arg @ref LL_EXTI_LINE_50
2029 * @arg @ref LL_EXTI_LINE_51
2030 * @arg @ref LL_EXTI_LINE_52
2031 * @arg @ref LL_EXTI_LINE_53
2032 * @arg @ref LL_EXTI_LINE_54
2033 * @arg @ref LL_EXTI_LINE_55
2034 * @arg @ref LL_EXTI_LINE_56
2035 * @arg @ref LL_EXTI_LINE_57
2036 * @arg @ref LL_EXTI_LINE_58
2037 * @arg @ref LL_EXTI_LINE_63
2038 * @arg @ref LL_EXTI_LINE_ALL_32_63
2039 * @note Please check each device line mapping for EXTI Line availability
2040 * @retval None
2041 */
LL_EXTI_EnablePrivilege_32_63(uint32_t ExtiLine)2042 __STATIC_INLINE void LL_EXTI_EnablePrivilege_32_63(uint32_t ExtiLine)
2043 {
2044 SET_BIT(EXTI->PRIVCFGR2, ExtiLine);
2045 }
2046
2047 /**
2048 * @brief Disable ExtiLine Privilege attribute for Lines in range 0 to 31
2049 * @rmtoll PRIVCFGR1 PRIVx LL_EXTI_DisablePrivilege_0_31
2050 * @param ExtiLine This parameter can be one of the following values:
2051 * @arg @ref LL_EXTI_LINE_0
2052 * @arg @ref LL_EXTI_LINE_1
2053 * @arg @ref LL_EXTI_LINE_2
2054 * @arg @ref LL_EXTI_LINE_3
2055 * @arg @ref LL_EXTI_LINE_4
2056 * @arg @ref LL_EXTI_LINE_5
2057 * @arg @ref LL_EXTI_LINE_6
2058 * @arg @ref LL_EXTI_LINE_7
2059 * @arg @ref LL_EXTI_LINE_8
2060 * @arg @ref LL_EXTI_LINE_9
2061 * @arg @ref LL_EXTI_LINE_10
2062 * @arg @ref LL_EXTI_LINE_11
2063 * @arg @ref LL_EXTI_LINE_12
2064 * @arg @ref LL_EXTI_LINE_13
2065 * @arg @ref LL_EXTI_LINE_14
2066 * @arg @ref LL_EXTI_LINE_15
2067 * @arg @ref LL_EXTI_LINE_16
2068 * @arg @ref LL_EXTI_LINE_17
2069 * @arg @ref LL_EXTI_LINE_18
2070 * @arg @ref LL_EXTI_LINE_19
2071 * @arg @ref LL_EXTI_LINE_20
2072 * @arg @ref LL_EXTI_LINE_21
2073 * @arg @ref LL_EXTI_LINE_22
2074 * @arg @ref LL_EXTI_LINE_23
2075 * @arg @ref LL_EXTI_LINE_24
2076 * @arg @ref LL_EXTI_LINE_25
2077 * @arg @ref LL_EXTI_LINE_26
2078 * @arg @ref LL_EXTI_LINE_27
2079 * @arg @ref LL_EXTI_LINE_28
2080 * @arg @ref LL_EXTI_LINE_29
2081 * @arg @ref LL_EXTI_LINE_30
2082 * @arg @ref LL_EXTI_LINE_31
2083 * @arg @ref LL_EXTI_LINE_ALL_0_31
2084 * @note Please check each device line mapping for EXTI Line availability
2085 * @retval None
2086 */
LL_EXTI_DisablePrivilege_0_31(uint32_t ExtiLine)2087 __STATIC_INLINE void LL_EXTI_DisablePrivilege_0_31(uint32_t ExtiLine)
2088 {
2089 CLEAR_BIT(EXTI->PRIVCFGR1, ExtiLine);
2090 }
2091
2092 /**
2093 * @brief Disable ExtiLine Privilege attribute for Lines in range 32 to 63
2094 * @rmtoll PRIVCFGR2 PRIVx LL_EXTI_DisablePrivilege_32_63
2095 * @param ExtiLine This parameter can be one of the following values:
2096 * @arg @ref LL_EXTI_LINE_32
2097 * @arg @ref LL_EXTI_LINE_33
2098 * @arg @ref LL_EXTI_LINE_34
2099 * @arg @ref LL_EXTI_LINE_35
2100 * @arg @ref LL_EXTI_LINE_36
2101 * @arg @ref LL_EXTI_LINE_37
2102 * @arg @ref LL_EXTI_LINE_38
2103 * @arg @ref LL_EXTI_LINE_39
2104 * @arg @ref LL_EXTI_LINE_40
2105 * @arg @ref LL_EXTI_LINE_41
2106 * @arg @ref LL_EXTI_LINE_42
2107 * @arg @ref LL_EXTI_LINE_43
2108 * @arg @ref LL_EXTI_LINE_44
2109 * @arg @ref LL_EXTI_LINE_46
2110 * @arg @ref LL_EXTI_LINE_47
2111 * @arg @ref LL_EXTI_LINE_48
2112 * @arg @ref LL_EXTI_LINE_49
2113 * @arg @ref LL_EXTI_LINE_50
2114 * @arg @ref LL_EXTI_LINE_51
2115 * @arg @ref LL_EXTI_LINE_52
2116 * @arg @ref LL_EXTI_LINE_53
2117 * @arg @ref LL_EXTI_LINE_54
2118 * @arg @ref LL_EXTI_LINE_55
2119 * @arg @ref LL_EXTI_LINE_56
2120 * @arg @ref LL_EXTI_LINE_57
2121 * @arg @ref LL_EXTI_LINE_58
2122 * @arg @ref LL_EXTI_LINE_ALL_32_63
2123 * @note Please check each device line mapping for EXTI Line availability
2124 * @retval None
2125 */
LL_EXTI_DisablePrivilege_32_63(uint32_t ExtiLine)2126 __STATIC_INLINE void LL_EXTI_DisablePrivilege_32_63(uint32_t ExtiLine)
2127 {
2128 CLEAR_BIT(EXTI->PRIVCFGR2, ExtiLine);
2129 }
2130
2131 /**
2132 * @brief Indicate if ExtiLine Privilege attribute is enabled for Lines in range 0 to 31
2133 * @rmtoll PRIVCFGR1 PRIVx LL_EXTI_IsEnabledPrivilege_0_31
2134 * @param ExtiLine This parameter can be one of the following values:
2135 * @arg @ref LL_EXTI_LINE_0
2136 * @arg @ref LL_EXTI_LINE_1
2137 * @arg @ref LL_EXTI_LINE_2
2138 * @arg @ref LL_EXTI_LINE_3
2139 * @arg @ref LL_EXTI_LINE_4
2140 * @arg @ref LL_EXTI_LINE_5
2141 * @arg @ref LL_EXTI_LINE_6
2142 * @arg @ref LL_EXTI_LINE_7
2143 * @arg @ref LL_EXTI_LINE_8
2144 * @arg @ref LL_EXTI_LINE_9
2145 * @arg @ref LL_EXTI_LINE_10
2146 * @arg @ref LL_EXTI_LINE_11
2147 * @arg @ref LL_EXTI_LINE_12
2148 * @arg @ref LL_EXTI_LINE_13
2149 * @arg @ref LL_EXTI_LINE_14
2150 * @arg @ref LL_EXTI_LINE_15
2151 * @arg @ref LL_EXTI_LINE_16
2152 * @arg @ref LL_EXTI_LINE_17
2153 * @arg @ref LL_EXTI_LINE_18
2154 * @arg @ref LL_EXTI_LINE_19
2155 * @arg @ref LL_EXTI_LINE_20
2156 * @arg @ref LL_EXTI_LINE_21
2157 * @arg @ref LL_EXTI_LINE_22
2158 * @arg @ref LL_EXTI_LINE_23
2159 * @arg @ref LL_EXTI_LINE_24
2160 * @arg @ref LL_EXTI_LINE_25
2161 * @arg @ref LL_EXTI_LINE_26
2162 * @arg @ref LL_EXTI_LINE_27
2163 * @arg @ref LL_EXTI_LINE_28
2164 * @arg @ref LL_EXTI_LINE_29
2165 * @arg @ref LL_EXTI_LINE_30
2166 * @arg @ref LL_EXTI_LINE_31
2167 * @arg @ref LL_EXTI_LINE_ALL_0_31
2168 * @note Please check each device line mapping for EXTI Line availability
2169 * @retval State of bit (1 or 0).
2170 */
LL_EXTI_IsEnabledPrivilege_0_31(uint32_t ExtiLine)2171 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledPrivilege_0_31(uint32_t ExtiLine)
2172 {
2173 return ((READ_BIT(EXTI->PRIVCFGR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
2174 }
2175
2176 /**
2177 * @brief Indicate if ExtiLine Privilege attribute is enabled for Lines in range 32 to 63
2178 * @rmtoll PRIVCFGR2 PRIVx LL_EXTI_IsEnabledPrivilege_32_63
2179 * @param ExtiLine This parameter can be one of the following values:
2180 * @arg @ref LL_EXTI_LINE_32
2181 * @arg @ref LL_EXTI_LINE_33
2182 * @arg @ref LL_EXTI_LINE_34
2183 * @arg @ref LL_EXTI_LINE_35
2184 * @arg @ref LL_EXTI_LINE_36
2185 * @arg @ref LL_EXTI_LINE_37
2186 * @arg @ref LL_EXTI_LINE_38
2187 * @arg @ref LL_EXTI_LINE_39
2188 * @arg @ref LL_EXTI_LINE_40
2189 * @arg @ref LL_EXTI_LINE_41
2190 * @arg @ref LL_EXTI_LINE_42
2191 * @arg @ref LL_EXTI_LINE_43
2192 * @arg @ref LL_EXTI_LINE_44
2193 * @arg @ref LL_EXTI_LINE_46
2194 * @arg @ref LL_EXTI_LINE_47
2195 * @arg @ref LL_EXTI_LINE_48
2196 * @arg @ref LL_EXTI_LINE_49
2197 * @arg @ref LL_EXTI_LINE_50
2198 * @arg @ref LL_EXTI_LINE_51
2199 * @arg @ref LL_EXTI_LINE_52
2200 * @arg @ref LL_EXTI_LINE_53
2201 * @arg @ref LL_EXTI_LINE_54
2202 * @arg @ref LL_EXTI_LINE_55
2203 * @arg @ref LL_EXTI_LINE_56
2204 * @arg @ref LL_EXTI_LINE_57
2205 * @arg @ref LL_EXTI_LINE_58
2206 * @arg @ref LL_EXTI_LINE_ALL_32_63
2207 * @note Please check each device line mapping for EXTI Line availability
2208 * @retval State of bit (1 or 0).
2209 */
LL_EXTI_IsEnabledPrivilege_32_63(uint32_t ExtiLine)2210 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledPrivilege_32_63(uint32_t ExtiLine)
2211 {
2212 return ((READ_BIT(EXTI->PRIVCFGR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
2213 }
2214
2215 #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2216 /**
2217 * @brief Enable the EXTI lock attributes.
2218 * @rmtoll LOCKR LOCK LL_EXTI_EnableLockAttribute
2219 * @retval None.
2220 */
LL_EXTI_EnableLockAttribute(void)2221 __STATIC_INLINE void LL_EXTI_EnableLockAttribute(void)
2222 {
2223 SET_BIT(EXTI->LOCKR, EXTI_LOCKR_LOCK);
2224 }
2225
2226 /**
2227 * @brief Check if EXTI attributes are locked.
2228 * @rmtoll LOCKR LOCK LL_EXTI_IsEnabledLockAttribute
2229 * @retval State of bit (1 or 0).
2230 */
LL_EXTI_IsEnabledLockAttribute(void)2231 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledLockAttribute(void)
2232 {
2233 return ((READ_BIT(EXTI->LOCKR, EXTI_LOCKR_LOCK) == EXTI_LOCKR_LOCK) ? 1UL : 0UL);
2234 }
2235 #endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
2236 /**
2237 * @}
2238 */
2239
2240 #if defined(USE_FULL_LL_DRIVER)
2241 /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
2242 * @{
2243 */
2244
2245 ErrorStatus LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct);
2246 ErrorStatus LL_EXTI_DeInit(void);
2247 void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct);
2248
2249
2250 /**
2251 * @}
2252 */
2253 #endif /* USE_FULL_LL_DRIVER */
2254
2255 /**
2256 * @}
2257 */
2258
2259 /**
2260 * @}
2261 */
2262
2263 #endif /* EXTI */
2264
2265 /**
2266 * @}
2267 */
2268
2269 #ifdef __cplusplus
2270 }
2271 #endif
2272
2273 #endif /* STM32H5xx_LL_EXTI_H */
2274