2 ******************************************************************************
3 * @file stm32g4xx_ll_exti.h
4 * @author MCD Application Team
5 * @brief Header file of EXTI LL module.
6 ******************************************************************************
9 * <h2><center>© Copyright (c) 2017 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
17 ******************************************************************************
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32G4xx_LL_EXTI_H
22 #define __STM32G4xx_LL_EXTI_H
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32g4xx.h"
31 /** @addtogroup STM32G4xx_LL_Driver
37 /** @defgroup EXTI_LL EXTI
41 /* Private types -------------------------------------------------------------*/
42 /* Private variables ---------------------------------------------------------*/
43 /* Private constants ---------------------------------------------------------*/
44 /* Private Macros ------------------------------------------------------------*/
45 #if defined(USE_FULL_LL_DRIVER)
46 /** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
52 #endif /*USE_FULL_LL_DRIVER*/
53 /* Exported types ------------------------------------------------------------*/
54 #if defined(USE_FULL_LL_DRIVER)
55 /** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
61 uint32_t Line_0_31
; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31
62 This parameter can be any combination of @ref EXTI_LL_EC_LINE */
64 uint32_t Line_32_63
; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 32 to 63
65 This parameter can be any combination of @ref EXTI_LL_EC_LINE */
67 FunctionalState LineCommand
; /*!< Specifies the new state of the selected EXTI lines.
68 This parameter can be set either to ENABLE or DISABLE */
70 uint8_t Mode
; /*!< Specifies the mode for the EXTI lines.
71 This parameter can be a value of @ref EXTI_LL_EC_MODE. */
73 uint8_t Trigger
; /*!< Specifies the trigger signal active edge for the EXTI lines.
74 This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
75 } LL_EXTI_InitTypeDef
;
80 #endif /*USE_FULL_LL_DRIVER*/
82 /* Exported constants --------------------------------------------------------*/
83 /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
87 /** @defgroup EXTI_LL_EC_LINE LINE
90 #define LL_EXTI_LINE_0 EXTI_IMR1_IM0 /*!< Extended line 0 */
91 #define LL_EXTI_LINE_1 EXTI_IMR1_IM1 /*!< Extended line 1 */
92 #define LL_EXTI_LINE_2 EXTI_IMR1_IM2 /*!< Extended line 2 */
93 #define LL_EXTI_LINE_3 EXTI_IMR1_IM3 /*!< Extended line 3 */
94 #define LL_EXTI_LINE_4 EXTI_IMR1_IM4 /*!< Extended line 4 */
95 #define LL_EXTI_LINE_5 EXTI_IMR1_IM5 /*!< Extended line 5 */
96 #define LL_EXTI_LINE_6 EXTI_IMR1_IM6 /*!< Extended line 6 */
97 #define LL_EXTI_LINE_7 EXTI_IMR1_IM7 /*!< Extended line 7 */
98 #define LL_EXTI_LINE_8 EXTI_IMR1_IM8 /*!< Extended line 8 */
99 #define LL_EXTI_LINE_9 EXTI_IMR1_IM9 /*!< Extended line 9 */
100 #define LL_EXTI_LINE_10 EXTI_IMR1_IM10 /*!< Extended line 10 */
101 #define LL_EXTI_LINE_11 EXTI_IMR1_IM11 /*!< Extended line 11 */
102 #define LL_EXTI_LINE_12 EXTI_IMR1_IM12 /*!< Extended line 12 */
103 #define LL_EXTI_LINE_13 EXTI_IMR1_IM13 /*!< Extended line 13 */
104 #define LL_EXTI_LINE_14 EXTI_IMR1_IM14 /*!< Extended line 14 */
105 #define LL_EXTI_LINE_15 EXTI_IMR1_IM15 /*!< Extended line 15 */
106 #if defined(EXTI_IMR1_IM16)
107 #define LL_EXTI_LINE_16 EXTI_IMR1_IM16 /*!< Extended line 16 */
108 #endif /* EXTI_IMR1_IM16 */
109 #define LL_EXTI_LINE_17 EXTI_IMR1_IM17 /*!< Extended line 17 */
110 #if defined(EXTI_IMR1_IM18)
111 #define LL_EXTI_LINE_18 EXTI_IMR1_IM18 /*!< Extended line 18 */
112 #endif /* EXTI_IMR1_IM18 */
113 #define LL_EXTI_LINE_19 EXTI_IMR1_IM19 /*!< Extended line 19 */
114 #if defined(EXTI_IMR1_IM20)
115 #define LL_EXTI_LINE_20 EXTI_IMR1_IM20 /*!< Extended line 20 */
116 #endif /* EXTI_IMR1_IM20 */
117 #if defined(EXTI_IMR1_IM21)
118 #define LL_EXTI_LINE_21 EXTI_IMR1_IM21 /*!< Extended line 21 */
119 #endif /* EXTI_IMR1_IM21 */
120 #if defined(EXTI_IMR1_IM22)
121 #define LL_EXTI_LINE_22 EXTI_IMR1_IM22 /*!< Extended line 22 */
122 #endif /* EXTI_IMR1_IM22 */
123 #define LL_EXTI_LINE_23 EXTI_IMR1_IM23 /*!< Extended line 23 */
124 #if defined(EXTI_IMR1_IM24)
125 #define LL_EXTI_LINE_24 EXTI_IMR1_IM24 /*!< Extended line 24 */
126 #endif /* EXTI_IMR1_IM24 */
127 #if defined(EXTI_IMR1_IM25)
128 #define LL_EXTI_LINE_25 EXTI_IMR1_IM25 /*!< Extended line 25 */
129 #endif /* EXTI_IMR1_IM25 */
130 #if defined(EXTI_IMR1_IM26)
131 #define LL_EXTI_LINE_26 EXTI_IMR1_IM26 /*!< Extended line 26 */
132 #endif /* EXTI_IMR1_IM26 */
133 #if defined(EXTI_IMR1_IM27)
134 #define LL_EXTI_LINE_27 EXTI_IMR1_IM27 /*!< Extended line 27 */
135 #endif /* EXTI_IMR1_IM27 */
136 #if defined(EXTI_IMR1_IM28)
137 #define LL_EXTI_LINE_28 EXTI_IMR1_IM28 /*!< Extended line 28 */
138 #endif /* EXTI_IMR1_IM28 */
139 #if defined(EXTI_IMR1_IM29)
140 #define LL_EXTI_LINE_29 EXTI_IMR1_IM29 /*!< Extended line 29 */
141 #endif /* EXTI_IMR1_IM29 */
142 #if defined(EXTI_IMR1_IM30)
143 #define LL_EXTI_LINE_30 EXTI_IMR1_IM30 /*!< Extended line 30 */
144 #endif /* EXTI_IMR1_IM30 */
145 #if defined(EXTI_IMR1_IM31)
146 #define LL_EXTI_LINE_31 EXTI_IMR1_IM31 /*!< Extended line 31 */
147 #endif /* EXTI_IMR1_IM31 */
148 #define LL_EXTI_LINE_ALL_0_31 EXTI_IMR1_IM /*!< All Extended line not reserved*/
150 #if defined(EXTI_IMR2_IM32)
151 #define LL_EXTI_LINE_32 EXTI_IMR2_IM32 /*!< Extended line 32 */
152 #endif /* EXTI_IMR2_IM32 */
153 #if defined(EXTI_IMR2_IM33)
154 #define LL_EXTI_LINE_33 EXTI_IMR2_IM33 /*!< Extended line 33 */
155 #endif /* EXTI_IMR2_IM33 */
156 #if defined(EXTI_IMR2_IM34)
157 #define LL_EXTI_LINE_34 EXTI_IMR2_IM34 /*!< Extended line 34 */
158 #endif /* EXTI_IMR2_IM34 */
159 #if defined(EXTI_IMR2_IM35)
160 #define LL_EXTI_LINE_35 EXTI_IMR2_IM35 /*!< Extended line 35 */
161 #endif /* EXTI_IMR2_IM35 */
162 #if defined(EXTI_IMR2_IM36)
163 #define LL_EXTI_LINE_36 EXTI_IMR2_IM36 /*!< Extended line 36 */
164 #endif /* EXTI_IMR2_IM36 */
165 #if defined(EXTI_IMR2_IM37)
166 #define LL_EXTI_LINE_37 EXTI_IMR2_IM37 /*!< Extended line 37 */
167 #endif /* EXTI_IMR2_IM37 */
168 #if defined(EXTI_IMR2_IM38)
169 #define LL_EXTI_LINE_38 EXTI_IMR2_IM38 /*!< Extended line 38 */
170 #endif /* EXTI_IMR2_IM38 */
171 #if defined(EXTI_IMR2_IM39)
172 #define LL_EXTI_LINE_39 EXTI_IMR2_IM39 /*!< Extended line 39 */
173 #endif /* EXTI_IMR2_IM39 */
174 #if defined(EXTI_IMR2_IM40)
175 #define LL_EXTI_LINE_40 EXTI_IMR2_IM40 /*!< Extended line 40 */
176 #endif /* EXTI_IMR2_IM40 */
177 #if defined(EXTI_IMR2_IM41)
178 #define LL_EXTI_LINE_41 EXTI_IMR2_IM41 /*!< Extended line 41 */
179 #endif /* EXTI_IMR2_IM41 */
180 #if defined(EXTI_IMR2_IM42)
181 #define LL_EXTI_LINE_42 EXTI_IMR2_IM42 /*!< Extended line 42 */
182 #endif /* EXTI_IMR2_IM42 */
183 #define LL_EXTI_LINE_ALL_32_63 EXTI_IMR2_IM /*!< All Extended line not reserved*/
186 #define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
188 #if defined(USE_FULL_LL_DRIVER)
189 #define LL_EXTI_LINE_NONE 0x00000000U /*!< None Extended line */
190 #endif /*USE_FULL_LL_DRIVER*/
195 #if defined(USE_FULL_LL_DRIVER)
197 /** @defgroup EXTI_LL_EC_MODE Mode
200 #define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */
201 #define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */
202 #define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
207 /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
210 #define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */
211 #define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */
212 #define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */
213 #define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
220 #endif /*USE_FULL_LL_DRIVER*/
227 /* Exported macro ------------------------------------------------------------*/
228 /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
232 /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
237 * @brief Write a value in EXTI register
238 * @param __REG__ Register to be written
239 * @param __VALUE__ Value to be written in the register
242 #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
245 * @brief Read a value in EXTI register
246 * @param __REG__ Register to be read
247 * @retval Register value
249 #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
261 /* Exported functions --------------------------------------------------------*/
262 /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
265 /** @defgroup EXTI_LL_EF_IT_Management IT_Management
270 * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31
271 * @note The reset value for the direct or internal lines (see RM)
272 * is set to 1 in order to enable the interrupt by default.
273 * Bits are set automatically at Power on.
274 * @rmtoll IMR1 IMx LL_EXTI_EnableIT_0_31
275 * @param ExtiLine This parameter can be one of the following values:
276 * @arg @ref LL_EXTI_LINE_0
277 * @arg @ref LL_EXTI_LINE_1
278 * @arg @ref LL_EXTI_LINE_2
279 * @arg @ref LL_EXTI_LINE_3
280 * @arg @ref LL_EXTI_LINE_4
281 * @arg @ref LL_EXTI_LINE_5
282 * @arg @ref LL_EXTI_LINE_6
283 * @arg @ref LL_EXTI_LINE_7
284 * @arg @ref LL_EXTI_LINE_8
285 * @arg @ref LL_EXTI_LINE_9
286 * @arg @ref LL_EXTI_LINE_10
287 * @arg @ref LL_EXTI_LINE_11
288 * @arg @ref LL_EXTI_LINE_12
289 * @arg @ref LL_EXTI_LINE_13
290 * @arg @ref LL_EXTI_LINE_14
291 * @arg @ref LL_EXTI_LINE_15
292 * @arg @ref LL_EXTI_LINE_16
293 * @arg @ref LL_EXTI_LINE_17
294 * @arg @ref LL_EXTI_LINE_18
295 * @arg @ref LL_EXTI_LINE_19
296 * @arg @ref LL_EXTI_LINE_20
297 * @arg @ref LL_EXTI_LINE_21
298 * @arg @ref LL_EXTI_LINE_22
299 * @arg @ref LL_EXTI_LINE_23
300 * @arg @ref LL_EXTI_LINE_24
301 * @arg @ref LL_EXTI_LINE_25
302 * @arg @ref LL_EXTI_LINE_26
303 * @arg @ref LL_EXTI_LINE_27
304 * @arg @ref LL_EXTI_LINE_28
305 * @arg @ref LL_EXTI_LINE_29
306 * @arg @ref LL_EXTI_LINE_30
307 * @arg @ref LL_EXTI_LINE_31 (*)
308 * @arg @ref LL_EXTI_LINE_ALL_0_31
309 * @note (*): Available in some devices
310 * @note Please check each device line mapping for EXTI Line availability
313 __STATIC_INLINE
void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine
)
315 SET_BIT(EXTI
->IMR1
, ExtiLine
);
318 * @brief Enable ExtiLine Interrupt request for Lines in range 32 to 63
319 * @note The reset value for the direct lines (lines from 32 to 34, line
320 * 39) is set to 1 in order to enable the interrupt by default.
321 * Bits are set automatically at Power on.
322 * @rmtoll IMR2 IMx LL_EXTI_EnableIT_32_63
323 * @param ExtiLine This parameter can be one of the following values:
324 * @arg @ref LL_EXTI_LINE_32 (*)
325 * @arg @ref LL_EXTI_LINE_33 (*)
326 * @arg @ref LL_EXTI_LINE_34
327 * @arg @ref LL_EXTI_LINE_35 (*)
328 * @arg @ref LL_EXTI_LINE_36
329 * @arg @ref LL_EXTI_LINE_37
330 * @arg @ref LL_EXTI_LINE_38
331 * @arg @ref LL_EXTI_LINE_39
332 * @arg @ref LL_EXTI_LINE_40
333 * @arg @ref LL_EXTI_LINE_41
334 * @arg @ref LL_EXTI_LINE_42(*)
335 * @arg @ref LL_EXTI_LINE_ALL_32_63
336 * @note (*): Available in some devices
339 __STATIC_INLINE
void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine
)
341 SET_BIT(EXTI
->IMR2
, ExtiLine
);
345 * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31
346 * @note The reset value for the direct or internal lines (see RM)
347 * is set to 1 in order to enable the interrupt by default.
348 * Bits are set automatically at Power on.
349 * @rmtoll IMR1 IMx LL_EXTI_DisableIT_0_31
350 * @param ExtiLine This parameter can be one of the following values:
351 * @arg @ref LL_EXTI_LINE_0
352 * @arg @ref LL_EXTI_LINE_1
353 * @arg @ref LL_EXTI_LINE_2
354 * @arg @ref LL_EXTI_LINE_3
355 * @arg @ref LL_EXTI_LINE_4
356 * @arg @ref LL_EXTI_LINE_5
357 * @arg @ref LL_EXTI_LINE_6
358 * @arg @ref LL_EXTI_LINE_7
359 * @arg @ref LL_EXTI_LINE_8
360 * @arg @ref LL_EXTI_LINE_9
361 * @arg @ref LL_EXTI_LINE_10
362 * @arg @ref LL_EXTI_LINE_11
363 * @arg @ref LL_EXTI_LINE_12
364 * @arg @ref LL_EXTI_LINE_13
365 * @arg @ref LL_EXTI_LINE_14
366 * @arg @ref LL_EXTI_LINE_15
367 * @arg @ref LL_EXTI_LINE_16
368 * @arg @ref LL_EXTI_LINE_17
369 * @arg @ref LL_EXTI_LINE_18
370 * @arg @ref LL_EXTI_LINE_19
371 * @arg @ref LL_EXTI_LINE_20
372 * @arg @ref LL_EXTI_LINE_21
373 * @arg @ref LL_EXTI_LINE_22
374 * @arg @ref LL_EXTI_LINE_23
375 * @arg @ref LL_EXTI_LINE_24
376 * @arg @ref LL_EXTI_LINE_25
377 * @arg @ref LL_EXTI_LINE_26
378 * @arg @ref LL_EXTI_LINE_27
379 * @arg @ref LL_EXTI_LINE_28
380 * @arg @ref LL_EXTI_LINE_29
381 * @arg @ref LL_EXTI_LINE_30
382 * @arg @ref LL_EXTI_LINE_31
383 * @arg @ref LL_EXTI_LINE_ALL_0_31 (*)
384 * @note (*): Available in some devices
385 * @note Please check each device line mapping for EXTI Line availability
388 __STATIC_INLINE
void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine
)
390 CLEAR_BIT(EXTI
->IMR1
, ExtiLine
);
394 * @brief Disable ExtiLine Interrupt request for Lines in range 32 to 63
395 * @note The reset value for the direct lines (lines from 32 to 34, line
396 * 39) is set to 1 in order to enable the interrupt by default.
397 * Bits are set automatically at Power on.
398 * @rmtoll IMR2 IMx LL_EXTI_DisableIT_32_63
399 * @param ExtiLine This parameter can be one of the following values:
400 * @arg @ref LL_EXTI_LINE_32 (*)
401 * @arg @ref LL_EXTI_LINE_33 (*)
402 * @arg @ref LL_EXTI_LINE_34
403 * @arg @ref LL_EXTI_LINE_35 (*)
404 * @arg @ref LL_EXTI_LINE_36
405 * @arg @ref LL_EXTI_LINE_37
406 * @arg @ref LL_EXTI_LINE_38
407 * @arg @ref LL_EXTI_LINE_39
408 * @arg @ref LL_EXTI_LINE_40
409 * @arg @ref LL_EXTI_LINE_41
410 * @arg @ref LL_EXTI_LINE_42(*)
411 * @arg @ref LL_EXTI_LINE_ALL_32_63
412 * @note (*): Available in some devices
415 __STATIC_INLINE
void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine
)
417 CLEAR_BIT(EXTI
->IMR2
, ExtiLine
);
421 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
422 * @note The reset value for the direct or internal lines (see RM)
423 * is set to 1 in order to enable the interrupt by default.
424 * Bits are set automatically at Power on.
425 * @rmtoll IMR1 IMx LL_EXTI_IsEnabledIT_0_31
426 * @param ExtiLine This parameter can be one of the following values:
427 * @arg @ref LL_EXTI_LINE_0
428 * @arg @ref LL_EXTI_LINE_1
429 * @arg @ref LL_EXTI_LINE_2
430 * @arg @ref LL_EXTI_LINE_3
431 * @arg @ref LL_EXTI_LINE_4
432 * @arg @ref LL_EXTI_LINE_5
433 * @arg @ref LL_EXTI_LINE_6
434 * @arg @ref LL_EXTI_LINE_7
435 * @arg @ref LL_EXTI_LINE_8
436 * @arg @ref LL_EXTI_LINE_9
437 * @arg @ref LL_EXTI_LINE_10
438 * @arg @ref LL_EXTI_LINE_11
439 * @arg @ref LL_EXTI_LINE_12
440 * @arg @ref LL_EXTI_LINE_13
441 * @arg @ref LL_EXTI_LINE_14
442 * @arg @ref LL_EXTI_LINE_15
443 * @arg @ref LL_EXTI_LINE_16
444 * @arg @ref LL_EXTI_LINE_17
445 * @arg @ref LL_EXTI_LINE_18
446 * @arg @ref LL_EXTI_LINE_19
447 * @arg @ref LL_EXTI_LINE_20
448 * @arg @ref LL_EXTI_LINE_21
449 * @arg @ref LL_EXTI_LINE_22
450 * @arg @ref LL_EXTI_LINE_23
451 * @arg @ref LL_EXTI_LINE_24
452 * @arg @ref LL_EXTI_LINE_25
453 * @arg @ref LL_EXTI_LINE_26
454 * @arg @ref LL_EXTI_LINE_27
455 * @arg @ref LL_EXTI_LINE_28
456 * @arg @ref LL_EXTI_LINE_29
457 * @arg @ref LL_EXTI_LINE_30
458 * @arg @ref LL_EXTI_LINE_31 (*)
459 * @arg @ref LL_EXTI_LINE_ALL_0_31
460 * @note (*): Available in some devices
461 * @note Please check each device line mapping for EXTI Line availability
462 * @retval State of bit (1 or 0).
464 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine
)
466 return ((READ_BIT(EXTI
->IMR1
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
470 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63
471 * @note The reset value for the direct lines (lines from 32 to 34, line
472 * 39) is set to 1 in order to enable the interrupt by default.
473 * Bits are set automatically at Power on.
474 * @rmtoll IMR2 IMx LL_EXTI_IsEnabledIT_32_63
475 * @param ExtiLine This parameter can be one of the following values:
476 * @arg @ref LL_EXTI_LINE_32 (*)
477 * @arg @ref LL_EXTI_LINE_33 (*)
478 * @arg @ref LL_EXTI_LINE_34
479 * @arg @ref LL_EXTI_LINE_35 (*)
480 * @arg @ref LL_EXTI_LINE_36
481 * @arg @ref LL_EXTI_LINE_37
482 * @arg @ref LL_EXTI_LINE_38
483 * @arg @ref LL_EXTI_LINE_39
484 * @arg @ref LL_EXTI_LINE_40
485 * @arg @ref LL_EXTI_LINE_41
486 * @arg @ref LL_EXTI_LINE_42(*)
487 * @arg @ref LL_EXTI_LINE_ALL_32_63
488 * @note (*): Available in some devices
489 * @retval State of bit (1 or 0).
491 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine
)
493 return ((READ_BIT(EXTI
->IMR2
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
500 /** @defgroup EXTI_LL_EF_Event_Management Event_Management
505 * @brief Enable ExtiLine Event request for Lines in range 0 to 31
506 * @rmtoll EMR1 EMx LL_EXTI_EnableEvent_0_31
507 * @param ExtiLine This parameter can be one of the following values:
508 * @arg @ref LL_EXTI_LINE_0
509 * @arg @ref LL_EXTI_LINE_1
510 * @arg @ref LL_EXTI_LINE_2
511 * @arg @ref LL_EXTI_LINE_3
512 * @arg @ref LL_EXTI_LINE_4
513 * @arg @ref LL_EXTI_LINE_5
514 * @arg @ref LL_EXTI_LINE_6
515 * @arg @ref LL_EXTI_LINE_7
516 * @arg @ref LL_EXTI_LINE_8
517 * @arg @ref LL_EXTI_LINE_9
518 * @arg @ref LL_EXTI_LINE_10
519 * @arg @ref LL_EXTI_LINE_11
520 * @arg @ref LL_EXTI_LINE_12
521 * @arg @ref LL_EXTI_LINE_13
522 * @arg @ref LL_EXTI_LINE_14
523 * @arg @ref LL_EXTI_LINE_15
524 * @arg @ref LL_EXTI_LINE_16
525 * @arg @ref LL_EXTI_LINE_17
526 * @arg @ref LL_EXTI_LINE_18
527 * @arg @ref LL_EXTI_LINE_19
528 * @arg @ref LL_EXTI_LINE_20
529 * @arg @ref LL_EXTI_LINE_21
530 * @arg @ref LL_EXTI_LINE_22
531 * @arg @ref LL_EXTI_LINE_23
532 * @arg @ref LL_EXTI_LINE_24
533 * @arg @ref LL_EXTI_LINE_25
534 * @arg @ref LL_EXTI_LINE_26
535 * @arg @ref LL_EXTI_LINE_27
536 * @arg @ref LL_EXTI_LINE_28
537 * @arg @ref LL_EXTI_LINE_29
538 * @arg @ref LL_EXTI_LINE_30
539 * @arg @ref LL_EXTI_LINE_31
540 * @arg @ref LL_EXTI_LINE_ALL_0_31 (*)
541 * @note (*): Available in some devices
542 * @note Please check each device line mapping for EXTI Line availability
545 __STATIC_INLINE
void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine
)
547 SET_BIT(EXTI
->EMR1
, ExtiLine
);
552 * @brief Enable ExtiLine Event request for Lines in range 32 to 63
553 * @rmtoll EMR2 EMx LL_EXTI_EnableEvent_32_63
554 * @param ExtiLine This parameter can be a combination of the following values:
555 * @arg @ref LL_EXTI_LINE_32 (*)
556 * @arg @ref LL_EXTI_LINE_33 (*)
557 * @arg @ref LL_EXTI_LINE_34
558 * @arg @ref LL_EXTI_LINE_35 (*)
559 * @arg @ref LL_EXTI_LINE_36
560 * @arg @ref LL_EXTI_LINE_37
561 * @arg @ref LL_EXTI_LINE_38
562 * @arg @ref LL_EXTI_LINE_39
563 * @arg @ref LL_EXTI_LINE_40
564 * @arg @ref LL_EXTI_LINE_41
565 * @arg @ref LL_EXTI_LINE_42(*)
566 * @arg @ref LL_EXTI_LINE_ALL_32_63
567 * @note (*): Available in some devices
570 __STATIC_INLINE
void LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine
)
572 SET_BIT(EXTI
->EMR2
, ExtiLine
);
576 * @brief Disable ExtiLine Event request for Lines in range 0 to 31
577 * @rmtoll EMR1 EMx LL_EXTI_DisableEvent_0_31
578 * @param ExtiLine This parameter can be one of the following values:
579 * @arg @ref LL_EXTI_LINE_0
580 * @arg @ref LL_EXTI_LINE_1
581 * @arg @ref LL_EXTI_LINE_2
582 * @arg @ref LL_EXTI_LINE_3
583 * @arg @ref LL_EXTI_LINE_4
584 * @arg @ref LL_EXTI_LINE_5
585 * @arg @ref LL_EXTI_LINE_6
586 * @arg @ref LL_EXTI_LINE_7
587 * @arg @ref LL_EXTI_LINE_8
588 * @arg @ref LL_EXTI_LINE_9
589 * @arg @ref LL_EXTI_LINE_10
590 * @arg @ref LL_EXTI_LINE_11
591 * @arg @ref LL_EXTI_LINE_12
592 * @arg @ref LL_EXTI_LINE_13
593 * @arg @ref LL_EXTI_LINE_14
594 * @arg @ref LL_EXTI_LINE_15
595 * @arg @ref LL_EXTI_LINE_16
596 * @arg @ref LL_EXTI_LINE_17
597 * @arg @ref LL_EXTI_LINE_18
598 * @arg @ref LL_EXTI_LINE_19
599 * @arg @ref LL_EXTI_LINE_20
600 * @arg @ref LL_EXTI_LINE_21
601 * @arg @ref LL_EXTI_LINE_22
602 * @arg @ref LL_EXTI_LINE_23
603 * @arg @ref LL_EXTI_LINE_24
604 * @arg @ref LL_EXTI_LINE_25
605 * @arg @ref LL_EXTI_LINE_26
606 * @arg @ref LL_EXTI_LINE_27
607 * @arg @ref LL_EXTI_LINE_28
608 * @arg @ref LL_EXTI_LINE_29
609 * @arg @ref LL_EXTI_LINE_30
610 * @arg @ref LL_EXTI_LINE_31 (*)
611 * @arg @ref LL_EXTI_LINE_ALL_0_31
612 * @note (*): Available in some devices
613 * @note Please check each device line mapping for EXTI Line availability
616 __STATIC_INLINE
void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine
)
618 CLEAR_BIT(EXTI
->EMR1
, ExtiLine
);
622 * @brief Disable ExtiLine Event request for Lines in range 32 to 63
623 * @rmtoll EMR2 EMx LL_EXTI_DisableEvent_32_63
624 * @param ExtiLine This parameter can be a combination of the following values:
625 * @arg @ref LL_EXTI_LINE_32 (*)
626 * @arg @ref LL_EXTI_LINE_33 (*)
627 * @arg @ref LL_EXTI_LINE_34
628 * @arg @ref LL_EXTI_LINE_35 (*)
629 * @arg @ref LL_EXTI_LINE_36
630 * @arg @ref LL_EXTI_LINE_37
631 * @arg @ref LL_EXTI_LINE_38
632 * @arg @ref LL_EXTI_LINE_39
633 * @arg @ref LL_EXTI_LINE_40
634 * @arg @ref LL_EXTI_LINE_41
635 * @arg @ref LL_EXTI_LINE_42(*)
636 * @arg @ref LL_EXTI_LINE_ALL_32_63
637 * @note (*): Available in some devices
640 __STATIC_INLINE
void LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine
)
642 CLEAR_BIT(EXTI
->EMR2
, ExtiLine
);
646 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
647 * @rmtoll EMR1 EMx LL_EXTI_IsEnabledEvent_0_31
648 * @param ExtiLine This parameter can be one of the following values:
649 * @arg @ref LL_EXTI_LINE_0
650 * @arg @ref LL_EXTI_LINE_1
651 * @arg @ref LL_EXTI_LINE_2
652 * @arg @ref LL_EXTI_LINE_3
653 * @arg @ref LL_EXTI_LINE_4
654 * @arg @ref LL_EXTI_LINE_5
655 * @arg @ref LL_EXTI_LINE_6
656 * @arg @ref LL_EXTI_LINE_7
657 * @arg @ref LL_EXTI_LINE_8
658 * @arg @ref LL_EXTI_LINE_9
659 * @arg @ref LL_EXTI_LINE_10
660 * @arg @ref LL_EXTI_LINE_11
661 * @arg @ref LL_EXTI_LINE_12
662 * @arg @ref LL_EXTI_LINE_13
663 * @arg @ref LL_EXTI_LINE_14
664 * @arg @ref LL_EXTI_LINE_15
665 * @arg @ref LL_EXTI_LINE_16
666 * @arg @ref LL_EXTI_LINE_17
667 * @arg @ref LL_EXTI_LINE_18
668 * @arg @ref LL_EXTI_LINE_19
669 * @arg @ref LL_EXTI_LINE_20
670 * @arg @ref LL_EXTI_LINE_21
671 * @arg @ref LL_EXTI_LINE_22
672 * @arg @ref LL_EXTI_LINE_23
673 * @arg @ref LL_EXTI_LINE_24
674 * @arg @ref LL_EXTI_LINE_25
675 * @arg @ref LL_EXTI_LINE_26
676 * @arg @ref LL_EXTI_LINE_27
677 * @arg @ref LL_EXTI_LINE_28
678 * @arg @ref LL_EXTI_LINE_29
679 * @arg @ref LL_EXTI_LINE_30
680 * @arg @ref LL_EXTI_LINE_31
681 * @arg @ref LL_EXTI_LINE_ALL_0_31 (*)
682 * @note (*): Available in some devices
683 * @note Please check each device line mapping for EXTI Line availability
684 * @retval State of bit (1 or 0).
686 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine
)
688 return ((READ_BIT(EXTI
->EMR1
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
693 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 32 to 63
694 * @rmtoll EMR2 EMx LL_EXTI_IsEnabledEvent_32_63
695 * @param ExtiLine This parameter can be a combination of the following values:
696 * @arg @ref LL_EXTI_LINE_32 (*)
697 * @arg @ref LL_EXTI_LINE_33 (*)
698 * @arg @ref LL_EXTI_LINE_34
699 * @arg @ref LL_EXTI_LINE_35 (*)
700 * @arg @ref LL_EXTI_LINE_36
701 * @arg @ref LL_EXTI_LINE_37
702 * @arg @ref LL_EXTI_LINE_38
703 * @arg @ref LL_EXTI_LINE_39
704 * @arg @ref LL_EXTI_LINE_40
705 * @arg @ref LL_EXTI_LINE_41
706 * @arg @ref LL_EXTI_LINE_42(*)
707 * @arg @ref LL_EXTI_LINE_ALL_32_63
708 * @note (*): Available in some devices
709 * @retval State of bit (1 or 0).
711 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine
)
713 return ((READ_BIT(EXTI
->EMR2
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
720 /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
725 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
726 * @note The configurable wakeup lines are edge-triggered. No glitch must be
727 * generated on these lines. If a rising edge on a configurable interrupt
728 * line occurs during a write operation in the EXTI_RTSR register, the
729 * pending bit is not set.
730 * Rising and falling edge triggers can be set for
731 * the same interrupt line. In this case, both generate a trigger
733 * @rmtoll RTSR1 RTx LL_EXTI_EnableRisingTrig_0_31
734 * @param ExtiLine This parameter can be a combination of the following values:
735 * @arg @ref LL_EXTI_LINE_0
736 * @arg @ref LL_EXTI_LINE_1
737 * @arg @ref LL_EXTI_LINE_2
738 * @arg @ref LL_EXTI_LINE_3
739 * @arg @ref LL_EXTI_LINE_4
740 * @arg @ref LL_EXTI_LINE_5
741 * @arg @ref LL_EXTI_LINE_6
742 * @arg @ref LL_EXTI_LINE_7
743 * @arg @ref LL_EXTI_LINE_8
744 * @arg @ref LL_EXTI_LINE_9
745 * @arg @ref LL_EXTI_LINE_10
746 * @arg @ref LL_EXTI_LINE_11
747 * @arg @ref LL_EXTI_LINE_12
748 * @arg @ref LL_EXTI_LINE_13
749 * @arg @ref LL_EXTI_LINE_14
750 * @arg @ref LL_EXTI_LINE_15
751 * @arg @ref LL_EXTI_LINE_16
752 * @arg @ref LL_EXTI_LINE_18
753 * @arg @ref LL_EXTI_LINE_19
754 * @arg @ref LL_EXTI_LINE_20
755 * @arg @ref LL_EXTI_LINE_21
756 * @arg @ref LL_EXTI_LINE_22
757 * @arg @ref LL_EXTI_LINE_29
758 * @arg @ref LL_EXTI_LINE_30
759 * @arg @ref LL_EXTI_LINE_31 (*)
760 * @note (*): Available in some devices
761 * @note Please check each device line mapping for EXTI Line availability
764 __STATIC_INLINE
void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine
)
766 SET_BIT(EXTI
->RTSR1
, ExtiLine
);
771 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
772 * @note The configurable wakeup lines are edge-triggered. No glitch must be
773 * generated on these lines. If a rising edge on a configurable interrupt
774 * line occurs during a write operation in the EXTI_RTSR register, the
775 * pending bit is not set.Rising and falling edge triggers can be set for
776 * the same interrupt line. In this case, both generate a trigger
778 * @rmtoll RTSR2 RTx LL_EXTI_EnableRisingTrig_32_63
779 * @param ExtiLine This parameter can be a combination of the following values:
780 * @arg @ref LL_EXTI_LINE_32 (*)
781 * @arg @ref LL_EXTI_LINE_33 (*)
782 * @arg @ref LL_EXTI_LINE_38
783 * @arg @ref LL_EXTI_LINE_39
784 * @arg @ref LL_EXTI_LINE_40
785 * @arg @ref LL_EXTI_LINE_41
786 * @note (*): Available in some devices
789 __STATIC_INLINE
void LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine
)
791 SET_BIT(EXTI
->RTSR2
, ExtiLine
);
795 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
796 * @note The configurable wakeup lines are edge-triggered. No glitch must be
797 * generated on these lines. If a rising edge on a configurable interrupt
798 * line occurs during a write operation in the EXTI_RTSR register, the
799 * pending bit is not set.
800 * Rising and falling edge triggers can be set for
801 * the same interrupt line. In this case, both generate a trigger
803 * @rmtoll RTSR1 RTx LL_EXTI_DisableRisingTrig_0_31
804 * @param ExtiLine This parameter can be a combination of the following values:
805 * @arg @ref LL_EXTI_LINE_0
806 * @arg @ref LL_EXTI_LINE_1
807 * @arg @ref LL_EXTI_LINE_2
808 * @arg @ref LL_EXTI_LINE_3
809 * @arg @ref LL_EXTI_LINE_4
810 * @arg @ref LL_EXTI_LINE_5
811 * @arg @ref LL_EXTI_LINE_6
812 * @arg @ref LL_EXTI_LINE_7
813 * @arg @ref LL_EXTI_LINE_8
814 * @arg @ref LL_EXTI_LINE_9
815 * @arg @ref LL_EXTI_LINE_10
816 * @arg @ref LL_EXTI_LINE_11
817 * @arg @ref LL_EXTI_LINE_12
818 * @arg @ref LL_EXTI_LINE_13
819 * @arg @ref LL_EXTI_LINE_14
820 * @arg @ref LL_EXTI_LINE_15
821 * @arg @ref LL_EXTI_LINE_16
822 * @arg @ref LL_EXTI_LINE_18
823 * @arg @ref LL_EXTI_LINE_19
824 * @arg @ref LL_EXTI_LINE_20
825 * @arg @ref LL_EXTI_LINE_21
826 * @arg @ref LL_EXTI_LINE_22
827 * @arg @ref LL_EXTI_LINE_29
828 * @arg @ref LL_EXTI_LINE_30
829 * @arg @ref LL_EXTI_LINE_31 (*)
830 * @note (*): Available in some devices
831 * @note Please check each device line mapping for EXTI Line availability
834 __STATIC_INLINE
void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine
)
836 CLEAR_BIT(EXTI
->RTSR1
, ExtiLine
);
841 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
842 * @note The configurable wakeup lines are edge-triggered. No glitch must be
843 * generated on these lines. If a rising edge on a configurable interrupt
844 * line occurs during a write operation in the EXTI_RTSR register, the
845 * pending bit is not set.
846 * Rising and falling edge triggers can be set for
847 * the same interrupt line. In this case, both generate a trigger
849 * @rmtoll RTSR2 RTx LL_EXTI_DisableRisingTrig_32_63
850 * @param ExtiLine This parameter can be a combination of the following values:
851 * @arg @ref LL_EXTI_LINE_32 (*)
852 * @arg @ref LL_EXTI_LINE_33 (*)
853 * @arg @ref LL_EXTI_LINE_38
854 * @arg @ref LL_EXTI_LINE_39
855 * @arg @ref LL_EXTI_LINE_40
856 * @arg @ref LL_EXTI_LINE_41
857 * @note (*): Available in some devices
860 __STATIC_INLINE
void LL_EXTI_DisableRisingTrig_32_63(uint32_t ExtiLine
)
862 CLEAR_BIT(EXTI
->RTSR2
, ExtiLine
);
866 * @brief Check if rising edge trigger is enabled for Lines in range 0 to 31
867 * @rmtoll RTSR1 RTx LL_EXTI_IsEnabledRisingTrig_0_31
868 * @param ExtiLine This parameter can be a combination of the following values:
869 * @arg @ref LL_EXTI_LINE_0
870 * @arg @ref LL_EXTI_LINE_1
871 * @arg @ref LL_EXTI_LINE_2
872 * @arg @ref LL_EXTI_LINE_3
873 * @arg @ref LL_EXTI_LINE_4
874 * @arg @ref LL_EXTI_LINE_5
875 * @arg @ref LL_EXTI_LINE_6
876 * @arg @ref LL_EXTI_LINE_7
877 * @arg @ref LL_EXTI_LINE_8
878 * @arg @ref LL_EXTI_LINE_9
879 * @arg @ref LL_EXTI_LINE_10
880 * @arg @ref LL_EXTI_LINE_11
881 * @arg @ref LL_EXTI_LINE_12
882 * @arg @ref LL_EXTI_LINE_13
883 * @arg @ref LL_EXTI_LINE_14
884 * @arg @ref LL_EXTI_LINE_15
885 * @arg @ref LL_EXTI_LINE_16
886 * @arg @ref LL_EXTI_LINE_18
887 * @arg @ref LL_EXTI_LINE_19
888 * @arg @ref LL_EXTI_LINE_20
889 * @arg @ref LL_EXTI_LINE_21
890 * @arg @ref LL_EXTI_LINE_22
891 * @arg @ref LL_EXTI_LINE_29
892 * @arg @ref LL_EXTI_LINE_30
893 * @arg @ref LL_EXTI_LINE_31 (*)
894 * @note (*): Available in some devices
895 * @note Please check each device line mapping for EXTI Line availability
896 * @retval State of bit (1 or 0).
898 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine
)
900 return ((READ_BIT(EXTI
->RTSR1
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
904 * @brief Check if rising edge trigger is enabled for Lines in range 32 to 63
905 * @rmtoll RTSR2 RTx LL_EXTI_IsEnabledRisingTrig_32_63
906 * @param ExtiLine This parameter can be a combination of the following values:
907 * @arg @ref LL_EXTI_LINE_32 (*)
908 * @arg @ref LL_EXTI_LINE_33 (*)
909 * @arg @ref LL_EXTI_LINE_38
910 * @arg @ref LL_EXTI_LINE_39
911 * @arg @ref LL_EXTI_LINE_40
912 * @arg @ref LL_EXTI_LINE_41
913 * @note (*): Available in some devices
914 * @retval State of bit (1 or 0).
916 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledRisingTrig_32_63(uint32_t ExtiLine
)
918 return ((READ_BIT(EXTI
->RTSR2
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
925 /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
930 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
931 * @note The configurable wakeup lines are edge-triggered. No glitch must be
932 * generated on these lines. If a falling edge on a configurable interrupt
933 * line occurs during a write operation in the EXTI_FTSR register, the
934 * pending bit is not set.
935 * Rising and falling edge triggers can be set for
936 * the same interrupt line. In this case, both generate a trigger
938 * @rmtoll FTSR1 FTx LL_EXTI_EnableFallingTrig_0_31
939 * @param ExtiLine This parameter can be a combination of the following values:
940 * @arg @ref LL_EXTI_LINE_0
941 * @arg @ref LL_EXTI_LINE_1
942 * @arg @ref LL_EXTI_LINE_2
943 * @arg @ref LL_EXTI_LINE_3
944 * @arg @ref LL_EXTI_LINE_4
945 * @arg @ref LL_EXTI_LINE_5
946 * @arg @ref LL_EXTI_LINE_6
947 * @arg @ref LL_EXTI_LINE_7
948 * @arg @ref LL_EXTI_LINE_8
949 * @arg @ref LL_EXTI_LINE_9
950 * @arg @ref LL_EXTI_LINE_10
951 * @arg @ref LL_EXTI_LINE_11
952 * @arg @ref LL_EXTI_LINE_12
953 * @arg @ref LL_EXTI_LINE_13
954 * @arg @ref LL_EXTI_LINE_14
955 * @arg @ref LL_EXTI_LINE_15
956 * @arg @ref LL_EXTI_LINE_16
957 * @arg @ref LL_EXTI_LINE_18
958 * @arg @ref LL_EXTI_LINE_19
959 * @arg @ref LL_EXTI_LINE_20
960 * @arg @ref LL_EXTI_LINE_21
961 * @arg @ref LL_EXTI_LINE_22
962 * @arg @ref LL_EXTI_LINE_29
963 * @arg @ref LL_EXTI_LINE_30
964 * @arg @ref LL_EXTI_LINE_31 (*)
965 * @note (*): Available in some devices
966 * @note Please check each device line mapping for EXTI Line availability
969 __STATIC_INLINE
void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine
)
971 SET_BIT(EXTI
->FTSR1
, ExtiLine
);
975 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
976 * @note The configurable wakeup lines are edge-triggered. No glitch must be
977 * generated on these lines. If a Falling edge on a configurable interrupt
978 * line occurs during a write operation in the EXTI_FTSR register, the
979 * pending bit is not set.
980 * Rising and falling edge triggers can be set for
981 * the same interrupt line. In this case, both generate a trigger
983 * @rmtoll FTSR2 FTx LL_EXTI_EnableFallingTrig_32_63
984 * @param ExtiLine This parameter can be a combination of the following values:
985 * @arg @ref LL_EXTI_LINE_32 (*)
986 * @arg @ref LL_EXTI_LINE_33 (*)
987 * @arg @ref LL_EXTI_LINE_38
988 * @arg @ref LL_EXTI_LINE_39
989 * @arg @ref LL_EXTI_LINE_40
990 * @arg @ref LL_EXTI_LINE_41
991 * @note (*): Available in some devices
994 __STATIC_INLINE
void LL_EXTI_EnableFallingTrig_32_63(uint32_t ExtiLine
)
996 SET_BIT(EXTI
->FTSR2
, ExtiLine
);
1000 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
1001 * @note The configurable wakeup lines are edge-triggered. No glitch must be
1002 * generated on these lines. If a Falling edge on a configurable interrupt
1003 * line occurs during a write operation in the EXTI_FTSR register, the
1004 * pending bit is not set.
1005 * Rising and falling edge triggers can be set for the same interrupt line.
1006 * In this case, both generate a trigger condition.
1007 * @rmtoll FTSR1 FTx LL_EXTI_DisableFallingTrig_0_31
1008 * @param ExtiLine This parameter can be a combination of the following values:
1009 * @arg @ref LL_EXTI_LINE_0
1010 * @arg @ref LL_EXTI_LINE_1
1011 * @arg @ref LL_EXTI_LINE_2
1012 * @arg @ref LL_EXTI_LINE_3
1013 * @arg @ref LL_EXTI_LINE_4
1014 * @arg @ref LL_EXTI_LINE_5
1015 * @arg @ref LL_EXTI_LINE_6
1016 * @arg @ref LL_EXTI_LINE_7
1017 * @arg @ref LL_EXTI_LINE_8
1018 * @arg @ref LL_EXTI_LINE_9
1019 * @arg @ref LL_EXTI_LINE_10
1020 * @arg @ref LL_EXTI_LINE_11
1021 * @arg @ref LL_EXTI_LINE_12
1022 * @arg @ref LL_EXTI_LINE_13
1023 * @arg @ref LL_EXTI_LINE_14
1024 * @arg @ref LL_EXTI_LINE_15
1025 * @arg @ref LL_EXTI_LINE_16
1026 * @arg @ref LL_EXTI_LINE_18
1027 * @arg @ref LL_EXTI_LINE_19
1028 * @arg @ref LL_EXTI_LINE_20
1029 * @arg @ref LL_EXTI_LINE_21
1030 * @arg @ref LL_EXTI_LINE_22
1031 * @arg @ref LL_EXTI_LINE_29
1032 * @arg @ref LL_EXTI_LINE_30
1033 * @arg @ref LL_EXTI_LINE_31 (*)
1034 * @note (*): Available in some devices
1035 * @note Please check each device line mapping for EXTI Line availability
1038 __STATIC_INLINE
void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine
)
1040 CLEAR_BIT(EXTI
->FTSR1
, ExtiLine
);
1044 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
1045 * @note The configurable wakeup lines are edge-triggered. No glitch must be
1046 * generated on these lines. If a Falling edge on a configurable interrupt
1047 * line occurs during a write operation in the EXTI_FTSR register, the
1048 * pending bit is not set.
1049 * Rising and falling edge triggers can be set for the same interrupt line.
1050 * In this case, both generate a trigger condition.
1051 * @rmtoll FTSR2 FTx LL_EXTI_DisableFallingTrig_32_63
1052 * @param ExtiLine This parameter can be a combination of the following values:
1053 * @arg @ref LL_EXTI_LINE_32 (*)
1054 * @arg @ref LL_EXTI_LINE_33 (*)
1055 * @arg @ref LL_EXTI_LINE_38
1056 * @arg @ref LL_EXTI_LINE_39
1057 * @arg @ref LL_EXTI_LINE_40
1058 * @arg @ref LL_EXTI_LINE_41
1059 * @note (*): Available in some devices
1062 __STATIC_INLINE
void LL_EXTI_DisableFallingTrig_32_63(uint32_t ExtiLine
)
1064 CLEAR_BIT(EXTI
->FTSR2
, ExtiLine
);
1068 * @brief Check if falling edge trigger is enabled for Lines in range 0 to 31
1069 * @rmtoll FTSR1 FTx LL_EXTI_IsEnabledFallingTrig_0_31
1070 * @param ExtiLine This parameter can be a combination of the following values:
1071 * @arg @ref LL_EXTI_LINE_0
1072 * @arg @ref LL_EXTI_LINE_1
1073 * @arg @ref LL_EXTI_LINE_2
1074 * @arg @ref LL_EXTI_LINE_3
1075 * @arg @ref LL_EXTI_LINE_4
1076 * @arg @ref LL_EXTI_LINE_5
1077 * @arg @ref LL_EXTI_LINE_6
1078 * @arg @ref LL_EXTI_LINE_7
1079 * @arg @ref LL_EXTI_LINE_8
1080 * @arg @ref LL_EXTI_LINE_9
1081 * @arg @ref LL_EXTI_LINE_10
1082 * @arg @ref LL_EXTI_LINE_11
1083 * @arg @ref LL_EXTI_LINE_12
1084 * @arg @ref LL_EXTI_LINE_13
1085 * @arg @ref LL_EXTI_LINE_14
1086 * @arg @ref LL_EXTI_LINE_15
1087 * @arg @ref LL_EXTI_LINE_16
1088 * @arg @ref LL_EXTI_LINE_18
1089 * @arg @ref LL_EXTI_LINE_19
1090 * @arg @ref LL_EXTI_LINE_20
1091 * @arg @ref LL_EXTI_LINE_21
1092 * @arg @ref LL_EXTI_LINE_22
1093 * @arg @ref LL_EXTI_LINE_29
1094 * @arg @ref LL_EXTI_LINE_30
1095 * @arg @ref LL_EXTI_LINE_31 (*)
1096 * @note (*): Available in some devices
1097 * @note Please check each device line mapping for EXTI Line availability
1098 * @retval State of bit (1 or 0).
1100 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine
)
1102 return ((READ_BIT(EXTI
->FTSR1
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
1106 * @brief Check if falling edge trigger is enabled for Lines in range 32 to 63
1107 * @rmtoll FTSR2 FTx LL_EXTI_IsEnabledFallingTrig_32_63
1108 * @param ExtiLine This parameter can be a combination of the following values:
1109 * @arg @ref LL_EXTI_LINE_32 (*)
1110 * @arg @ref LL_EXTI_LINE_33 (*)
1111 * @arg @ref LL_EXTI_LINE_38
1112 * @arg @ref LL_EXTI_LINE_39
1113 * @arg @ref LL_EXTI_LINE_40
1114 * @arg @ref LL_EXTI_LINE_41
1115 * @note (*): Available in some devices
1116 * @retval State of bit (1 or 0).
1118 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledFallingTrig_32_63(uint32_t ExtiLine
)
1120 return ((READ_BIT(EXTI
->FTSR2
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
1127 /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
1132 * @brief Generate a software Interrupt Event for Lines in range 0 to 31
1133 * @note If the interrupt is enabled on this line in the EXTI_IMR1, writing a 1 to
1134 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR1
1135 * resulting in an interrupt request generation.
1136 * This bit is cleared by clearing the corresponding bit in the EXTI_PR1
1137 * register (by writing a 1 into the bit)
1138 * @rmtoll SWIER1 SWIx LL_EXTI_GenerateSWI_0_31
1139 * @param ExtiLine This parameter can be a combination of the following values:
1140 * @arg @ref LL_EXTI_LINE_0
1141 * @arg @ref LL_EXTI_LINE_1
1142 * @arg @ref LL_EXTI_LINE_2
1143 * @arg @ref LL_EXTI_LINE_3
1144 * @arg @ref LL_EXTI_LINE_4
1145 * @arg @ref LL_EXTI_LINE_5
1146 * @arg @ref LL_EXTI_LINE_6
1147 * @arg @ref LL_EXTI_LINE_7
1148 * @arg @ref LL_EXTI_LINE_8
1149 * @arg @ref LL_EXTI_LINE_9
1150 * @arg @ref LL_EXTI_LINE_10
1151 * @arg @ref LL_EXTI_LINE_11
1152 * @arg @ref LL_EXTI_LINE_12
1153 * @arg @ref LL_EXTI_LINE_13
1154 * @arg @ref LL_EXTI_LINE_14
1155 * @arg @ref LL_EXTI_LINE_15
1156 * @arg @ref LL_EXTI_LINE_16
1157 * @arg @ref LL_EXTI_LINE_18
1158 * @arg @ref LL_EXTI_LINE_19
1159 * @arg @ref LL_EXTI_LINE_20
1160 * @arg @ref LL_EXTI_LINE_21
1161 * @arg @ref LL_EXTI_LINE_22
1162 * @arg @ref LL_EXTI_LINE_29
1163 * @arg @ref LL_EXTI_LINE_30
1164 * @arg @ref LL_EXTI_LINE_31 (*)
1165 * @note (*): Available in some devices
1166 * @note Please check each device line mapping for EXTI Line availability
1169 __STATIC_INLINE
void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine
)
1171 SET_BIT(EXTI
->SWIER1
, ExtiLine
);
1175 * @brief Generate a software Interrupt Event for Lines in range 32 to 63
1176 * @note If the interrupt is enabled on this line inthe EXTI_IMR2, writing a 1 to
1177 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR2
1178 * resulting in an interrupt request generation.
1179 * This bit is cleared by clearing the corresponding bit in the EXTI_PR2
1180 * register (by writing a 1 into the bit)
1181 * @rmtoll SWIER2 SWIx LL_EXTI_GenerateSWI_32_63
1182 * @param ExtiLine This parameter can be a combination of the following values:
1183 * @arg @ref LL_EXTI_LINE_32 (*)
1184 * @arg @ref LL_EXTI_LINE_33 (*)
1185 * @arg @ref LL_EXTI_LINE_38
1186 * @arg @ref LL_EXTI_LINE_39
1187 * @arg @ref LL_EXTI_LINE_40
1188 * @arg @ref LL_EXTI_LINE_41
1189 * @note (*): Available in some devices
1192 __STATIC_INLINE
void LL_EXTI_GenerateSWI_32_63(uint32_t ExtiLine
)
1194 SET_BIT(EXTI
->SWIER2
, ExtiLine
);
1201 /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
1206 * @brief Check if the ExtLine Flag is set or not for Lines in range 0 to 31
1207 * @note This bit is set when the selected edge event arrives on the interrupt
1208 * line. This bit is cleared by writing a 1 to the bit.
1209 * @rmtoll PR1 PIFx LL_EXTI_IsActiveFlag_0_31
1210 * @param ExtiLine This parameter can be a combination of the following values:
1211 * @arg @ref LL_EXTI_LINE_0
1212 * @arg @ref LL_EXTI_LINE_1
1213 * @arg @ref LL_EXTI_LINE_2
1214 * @arg @ref LL_EXTI_LINE_3
1215 * @arg @ref LL_EXTI_LINE_4
1216 * @arg @ref LL_EXTI_LINE_5
1217 * @arg @ref LL_EXTI_LINE_6
1218 * @arg @ref LL_EXTI_LINE_7
1219 * @arg @ref LL_EXTI_LINE_8
1220 * @arg @ref LL_EXTI_LINE_9
1221 * @arg @ref LL_EXTI_LINE_10
1222 * @arg @ref LL_EXTI_LINE_11
1223 * @arg @ref LL_EXTI_LINE_12
1224 * @arg @ref LL_EXTI_LINE_13
1225 * @arg @ref LL_EXTI_LINE_14
1226 * @arg @ref LL_EXTI_LINE_15
1227 * @arg @ref LL_EXTI_LINE_16
1228 * @arg @ref LL_EXTI_LINE_18
1229 * @arg @ref LL_EXTI_LINE_19
1230 * @arg @ref LL_EXTI_LINE_20
1231 * @arg @ref LL_EXTI_LINE_21
1232 * @arg @ref LL_EXTI_LINE_22
1233 * @arg @ref LL_EXTI_LINE_29
1234 * @arg @ref LL_EXTI_LINE_30
1235 * @arg @ref LL_EXTI_LINE_31 (*)
1236 * @note (*): Available in some devices
1237 * @note Please check each device line mapping for EXTI Line availability
1238 * @retval State of bit (1 or 0).
1240 __STATIC_INLINE
uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine
)
1242 return ((READ_BIT(EXTI
->PR1
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
1246 * @brief Check if the ExtLine Flag is set or not for Lines in range 32 to 63
1247 * @note This bit is set when the selected edge event arrives on the interrupt
1248 * line. This bit is cleared by writing a 1 to the bit.
1249 * @rmtoll PR2 PIFx LL_EXTI_IsActiveFlag_32_63
1250 * @param ExtiLine This parameter can be a combination of the following values:
1251 * @arg @ref LL_EXTI_LINE_32 (*)
1252 * @arg @ref LL_EXTI_LINE_33 (*)
1253 * @arg @ref LL_EXTI_LINE_38
1254 * @arg @ref LL_EXTI_LINE_39
1255 * @arg @ref LL_EXTI_LINE_40
1256 * @arg @ref LL_EXTI_LINE_41
1257 * @note (*): Available in some devices
1258 * @retval State of bit (1 or 0).
1260 __STATIC_INLINE
uint32_t LL_EXTI_IsActiveFlag_32_63(uint32_t ExtiLine
)
1262 return ((READ_BIT(EXTI
->PR2
, ExtiLine
) == (ExtiLine
)) ? 1UL : 0UL);
1266 * @brief Read ExtLine Combination Flag for Lines in range 0 to 31
1267 * @note This bit is set when the selected edge event arrives on the interrupt
1268 * line. This bit is cleared by writing a 1 to the bit.
1269 * @rmtoll PR1 PIFx LL_EXTI_ReadFlag_0_31
1270 * @param ExtiLine This parameter can be a combination of the following values:
1271 * @arg @ref LL_EXTI_LINE_0
1272 * @arg @ref LL_EXTI_LINE_1
1273 * @arg @ref LL_EXTI_LINE_2
1274 * @arg @ref LL_EXTI_LINE_3
1275 * @arg @ref LL_EXTI_LINE_4
1276 * @arg @ref LL_EXTI_LINE_5
1277 * @arg @ref LL_EXTI_LINE_6
1278 * @arg @ref LL_EXTI_LINE_7
1279 * @arg @ref LL_EXTI_LINE_8
1280 * @arg @ref LL_EXTI_LINE_9
1281 * @arg @ref LL_EXTI_LINE_10
1282 * @arg @ref LL_EXTI_LINE_11
1283 * @arg @ref LL_EXTI_LINE_12
1284 * @arg @ref LL_EXTI_LINE_13
1285 * @arg @ref LL_EXTI_LINE_14
1286 * @arg @ref LL_EXTI_LINE_15
1287 * @arg @ref LL_EXTI_LINE_16
1288 * @arg @ref LL_EXTI_LINE_18
1289 * @arg @ref LL_EXTI_LINE_19
1290 * @arg @ref LL_EXTI_LINE_20
1291 * @arg @ref LL_EXTI_LINE_21
1292 * @arg @ref LL_EXTI_LINE_22
1293 * @arg @ref LL_EXTI_LINE_29
1294 * @arg @ref LL_EXTI_LINE_30
1295 * @arg @ref LL_EXTI_LINE_31 (*)
1296 * @note (*): Available in some devices
1297 * @note Please check each device line mapping for EXTI Line availability
1298 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1300 __STATIC_INLINE
uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine
)
1302 return (uint32_t)(READ_BIT(EXTI
->PR1
, ExtiLine
));
1306 * @brief Read ExtLine Combination Flag for Lines in range 32 to 63
1307 * @note This bit is set when the selected edge event arrives on the interrupt
1308 * line. This bit is cleared by writing a 1 to the bit.
1309 * @rmtoll PR2 PIFx LL_EXTI_ReadFlag_32_63
1310 * @param ExtiLine This parameter can be a combination of the following values:
1311 * @arg @ref LL_EXTI_LINE_32 (*)
1312 * @arg @ref LL_EXTI_LINE_33 (*)
1313 * @arg @ref LL_EXTI_LINE_38
1314 * @arg @ref LL_EXTI_LINE_39
1315 * @arg @ref LL_EXTI_LINE_40
1316 * @arg @ref LL_EXTI_LINE_41
1317 * @note (*): Available in some devices
1318 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1320 __STATIC_INLINE
uint32_t LL_EXTI_ReadFlag_32_63(uint32_t ExtiLine
)
1322 return (uint32_t)(READ_BIT(EXTI
->PR2
, ExtiLine
));
1326 * @brief Clear ExtLine Flags for Lines in range 0 to 31
1327 * @note This bit is set when the selected edge event arrives on the interrupt
1328 * line. This bit is cleared by writing a 1 to the bit.
1329 * @rmtoll PR1 PIFx LL_EXTI_ClearFlag_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 * @arg @ref LL_EXTI_LINE_18
1349 * @arg @ref LL_EXTI_LINE_19
1350 * @arg @ref LL_EXTI_LINE_20
1351 * @arg @ref LL_EXTI_LINE_21
1352 * @arg @ref LL_EXTI_LINE_22
1353 * @arg @ref LL_EXTI_LINE_29
1354 * @arg @ref LL_EXTI_LINE_30
1355 * @arg @ref LL_EXTI_LINE_31 (*)
1356 * @note (*): Available in some devices
1357 * @note Please check each device line mapping for EXTI Line availability
1360 __STATIC_INLINE
void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine
)
1362 WRITE_REG(EXTI
->PR1
, ExtiLine
);
1366 * @brief Clear ExtLine Flags for Lines in range 32 to 63
1367 * @note This bit is set when the selected edge event arrives on the interrupt
1368 * line. This bit is cleared by writing a 1 to the bit.
1369 * @rmtoll PR2 PIFx LL_EXTI_ClearFlag_32_63
1370 * @param ExtiLine This parameter can be a combination of the following values:
1371 * @arg @ref LL_EXTI_LINE_32 (*)
1372 * @arg @ref LL_EXTI_LINE_33 (*)
1373 * @arg @ref LL_EXTI_LINE_38
1374 * @arg @ref LL_EXTI_LINE_39
1375 * @arg @ref LL_EXTI_LINE_40
1376 * @arg @ref LL_EXTI_LINE_41
1377 * @note (*): Available in some devices
1380 __STATIC_INLINE
void LL_EXTI_ClearFlag_32_63(uint32_t ExtiLine
)
1382 WRITE_REG(EXTI
->PR2
, ExtiLine
);
1389 #if defined(USE_FULL_LL_DRIVER)
1390 /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
1394 uint32_t LL_EXTI_Init(LL_EXTI_InitTypeDef
*EXTI_InitStruct
);
1395 uint32_t LL_EXTI_DeInit(void);
1396 void LL_EXTI_StructInit(LL_EXTI_InitTypeDef
*EXTI_InitStruct
);
1402 #endif /* USE_FULL_LL_DRIVER */
1422 #endif /* __STM32G4xx_LL_EXTI_H */
1424 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/