Moved IO_GPIOPortIdx to platform (#14127)
[betaflight.git] / lib / main / STM32F7 / Drivers / STM32F7xx_HAL_Driver / Inc / stm32f7xx_ll_exti.h
blob23ffcefa33a339ceab35ccbba34727023d37cce5
1 /**
2 ******************************************************************************
3 * @file stm32f7xx_ll_exti.h
4 * @author MCD Application Team
5 * @brief Header file of EXTI LL module.
6 ******************************************************************************
7 * @attention
9 * <h2><center>&copy; 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 __STM32F7xx_LL_EXTI_H
22 #define __STM32F7xx_LL_EXTI_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx.h"
31 /** @addtogroup STM32F7xx_LL_Driver
32 * @{
35 #if defined (EXTI)
37 /** @defgroup EXTI_LL EXTI
38 * @{
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
47 * @{
49 /**
50 * @}
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
56 * @{
58 typedef struct
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 FunctionalState LineCommand; /*!< Specifies the new state of the selected EXTI lines.
65 This parameter can be set either to ENABLE or DISABLE */
67 uint8_t Mode; /*!< Specifies the mode for the EXTI lines.
68 This parameter can be a value of @ref EXTI_LL_EC_MODE. */
70 uint8_t Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
71 This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
72 } LL_EXTI_InitTypeDef;
74 /**
75 * @}
77 #endif /*USE_FULL_LL_DRIVER*/
79 /* Exported constants --------------------------------------------------------*/
80 /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
81 * @{
84 /** @defgroup EXTI_LL_EC_LINE LINE
85 * @{
87 #define LL_EXTI_LINE_0 EXTI_IMR_IM0 /*!< Extended line 0 */
88 #define LL_EXTI_LINE_1 EXTI_IMR_IM1 /*!< Extended line 1 */
89 #define LL_EXTI_LINE_2 EXTI_IMR_IM2 /*!< Extended line 2 */
90 #define LL_EXTI_LINE_3 EXTI_IMR_IM3 /*!< Extended line 3 */
91 #define LL_EXTI_LINE_4 EXTI_IMR_IM4 /*!< Extended line 4 */
92 #define LL_EXTI_LINE_5 EXTI_IMR_IM5 /*!< Extended line 5 */
93 #define LL_EXTI_LINE_6 EXTI_IMR_IM6 /*!< Extended line 6 */
94 #define LL_EXTI_LINE_7 EXTI_IMR_IM7 /*!< Extended line 7 */
95 #define LL_EXTI_LINE_8 EXTI_IMR_IM8 /*!< Extended line 8 */
96 #define LL_EXTI_LINE_9 EXTI_IMR_IM9 /*!< Extended line 9 */
97 #define LL_EXTI_LINE_10 EXTI_IMR_IM10 /*!< Extended line 10 */
98 #define LL_EXTI_LINE_11 EXTI_IMR_IM11 /*!< Extended line 11 */
99 #define LL_EXTI_LINE_12 EXTI_IMR_IM12 /*!< Extended line 12 */
100 #define LL_EXTI_LINE_13 EXTI_IMR_IM13 /*!< Extended line 13 */
101 #define LL_EXTI_LINE_14 EXTI_IMR_IM14 /*!< Extended line 14 */
102 #define LL_EXTI_LINE_15 EXTI_IMR_IM15 /*!< Extended line 15 */
103 #if defined(EXTI_IMR_IM16)
104 #define LL_EXTI_LINE_16 EXTI_IMR_IM16 /*!< Extended line 16 */
105 #endif
106 #define LL_EXTI_LINE_17 EXTI_IMR_IM17 /*!< Extended line 17 */
107 #if defined(EXTI_IMR_IM18)
108 #define LL_EXTI_LINE_18 EXTI_IMR_IM18 /*!< Extended line 18 */
109 #endif
110 #define LL_EXTI_LINE_19 EXTI_IMR_IM19 /*!< Extended line 19 */
111 #if defined(EXTI_IMR_IM20)
112 #define LL_EXTI_LINE_20 EXTI_IMR_IM20 /*!< Extended line 20 */
113 #endif
114 #if defined(EXTI_IMR_IM21)
115 #define LL_EXTI_LINE_21 EXTI_IMR_IM21 /*!< Extended line 21 */
116 #endif
117 #if defined(EXTI_IMR_IM22)
118 #define LL_EXTI_LINE_22 EXTI_IMR_IM22 /*!< Extended line 22 */
119 #endif
120 #define LL_EXTI_LINE_23 EXTI_IMR_IM23 /*!< Extended line 23 */
121 #if defined(EXTI_IMR_IM24)
122 #define LL_EXTI_LINE_24 EXTI_IMR_IM24 /*!< Extended line 24 */
123 #endif
124 #if defined(EXTI_IMR_IM25)
125 #define LL_EXTI_LINE_25 EXTI_IMR_IM25 /*!< Extended line 25 */
126 #endif
127 #if defined(EXTI_IMR_IM26)
128 #define LL_EXTI_LINE_26 EXTI_IMR_IM26 /*!< Extended line 26 */
129 #endif
130 #if defined(EXTI_IMR_IM27)
131 #define LL_EXTI_LINE_27 EXTI_IMR_IM27 /*!< Extended line 27 */
132 #endif
133 #if defined(EXTI_IMR_IM28)
134 #define LL_EXTI_LINE_28 EXTI_IMR_IM28 /*!< Extended line 28 */
135 #endif
136 #if defined(EXTI_IMR_IM29)
137 #define LL_EXTI_LINE_29 EXTI_IMR_IM29 /*!< Extended line 29 */
138 #endif
139 #if defined(EXTI_IMR_IM30)
140 #define LL_EXTI_LINE_30 EXTI_IMR_IM30 /*!< Extended line 30 */
141 #endif
142 #if defined(EXTI_IMR_IM31)
143 #define LL_EXTI_LINE_31 EXTI_IMR_IM31 /*!< Extended line 31 */
144 #endif
145 #define LL_EXTI_LINE_ALL_0_31 EXTI_IMR_IM /*!< All Extended line not reserved*/
148 #define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
150 #if defined(USE_FULL_LL_DRIVER)
151 #define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */
152 #endif /*USE_FULL_LL_DRIVER*/
155 * @}
157 #if defined(USE_FULL_LL_DRIVER)
159 /** @defgroup EXTI_LL_EC_MODE Mode
160 * @{
162 #define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */
163 #define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */
164 #define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
166 * @}
169 /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
170 * @{
172 #define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */
173 #define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */
174 #define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */
175 #define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
178 * @}
182 #endif /*USE_FULL_LL_DRIVER*/
186 * @}
189 /* Exported macro ------------------------------------------------------------*/
190 /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
191 * @{
194 /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
195 * @{
199 * @brief Write a value in EXTI register
200 * @param __REG__ Register to be written
201 * @param __VALUE__ Value to be written in the register
202 * @retval None
204 #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
207 * @brief Read a value in EXTI register
208 * @param __REG__ Register to be read
209 * @retval Register value
211 #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
213 * @}
218 * @}
223 /* Exported functions --------------------------------------------------------*/
224 /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
225 * @{
227 /** @defgroup EXTI_LL_EF_IT_Management IT_Management
228 * @{
232 * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31
233 * @note The reset value for the direct or internal lines (see RM)
234 * is set to 1 in order to enable the interrupt by default.
235 * Bits are set automatically at Power on.
236 * @rmtoll IMR IMx LL_EXTI_EnableIT_0_31
237 * @param ExtiLine This parameter can be one of the following values:
238 * @arg @ref LL_EXTI_LINE_0
239 * @arg @ref LL_EXTI_LINE_1
240 * @arg @ref LL_EXTI_LINE_2
241 * @arg @ref LL_EXTI_LINE_3
242 * @arg @ref LL_EXTI_LINE_4
243 * @arg @ref LL_EXTI_LINE_5
244 * @arg @ref LL_EXTI_LINE_6
245 * @arg @ref LL_EXTI_LINE_7
246 * @arg @ref LL_EXTI_LINE_8
247 * @arg @ref LL_EXTI_LINE_9
248 * @arg @ref LL_EXTI_LINE_10
249 * @arg @ref LL_EXTI_LINE_11
250 * @arg @ref LL_EXTI_LINE_12
251 * @arg @ref LL_EXTI_LINE_13
252 * @arg @ref LL_EXTI_LINE_14
253 * @arg @ref LL_EXTI_LINE_15
254 * @arg @ref LL_EXTI_LINE_16
255 * @arg @ref LL_EXTI_LINE_17
256 * @arg @ref LL_EXTI_LINE_18
257 * @arg @ref LL_EXTI_LINE_19
258 * @arg @ref LL_EXTI_LINE_20
259 * @arg @ref LL_EXTI_LINE_21
260 * @arg @ref LL_EXTI_LINE_22
261 * @arg @ref LL_EXTI_LINE_23
262 * @arg @ref LL_EXTI_LINE_24(*)
263 * @arg @ref LL_EXTI_LINE_ALL_0_31
264 * @note (*): Available in some devices
265 * @note Please check each device line mapping for EXTI Line availability
266 * @retval None
268 __STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)
270 SET_BIT(EXTI->IMR, ExtiLine);
274 * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31
275 * @note The reset value for the direct or internal lines (see RM)
276 * is set to 1 in order to enable the interrupt by default.
277 * Bits are set automatically at Power on.
278 * @rmtoll IMR IMx LL_EXTI_DisableIT_0_31
279 * @param ExtiLine This parameter can be one of the following values:
280 * @arg @ref LL_EXTI_LINE_0
281 * @arg @ref LL_EXTI_LINE_1
282 * @arg @ref LL_EXTI_LINE_2
283 * @arg @ref LL_EXTI_LINE_3
284 * @arg @ref LL_EXTI_LINE_4
285 * @arg @ref LL_EXTI_LINE_5
286 * @arg @ref LL_EXTI_LINE_6
287 * @arg @ref LL_EXTI_LINE_7
288 * @arg @ref LL_EXTI_LINE_8
289 * @arg @ref LL_EXTI_LINE_9
290 * @arg @ref LL_EXTI_LINE_10
291 * @arg @ref LL_EXTI_LINE_11
292 * @arg @ref LL_EXTI_LINE_12
293 * @arg @ref LL_EXTI_LINE_13
294 * @arg @ref LL_EXTI_LINE_14
295 * @arg @ref LL_EXTI_LINE_15
296 * @arg @ref LL_EXTI_LINE_16
297 * @arg @ref LL_EXTI_LINE_17
298 * @arg @ref LL_EXTI_LINE_18
299 * @arg @ref LL_EXTI_LINE_19
300 * @arg @ref LL_EXTI_LINE_20
301 * @arg @ref LL_EXTI_LINE_21
302 * @arg @ref LL_EXTI_LINE_22
303 * @arg @ref LL_EXTI_LINE_23
304 * @arg @ref LL_EXTI_LINE_24(*)
305 * @arg @ref LL_EXTI_LINE_ALL_0_31
306 * @note (*): Available in some devices
307 * @note Please check each device line mapping for EXTI Line availability
308 * @retval None
310 __STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)
312 CLEAR_BIT(EXTI->IMR, ExtiLine);
317 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
318 * @note The reset value for the direct or internal lines (see RM)
319 * is set to 1 in order to enable the interrupt by default.
320 * Bits are set automatically at Power on.
321 * @rmtoll IMR IMx LL_EXTI_IsEnabledIT_0_31
322 * @param ExtiLine This parameter can be one of the following values:
323 * @arg @ref LL_EXTI_LINE_0
324 * @arg @ref LL_EXTI_LINE_1
325 * @arg @ref LL_EXTI_LINE_2
326 * @arg @ref LL_EXTI_LINE_3
327 * @arg @ref LL_EXTI_LINE_4
328 * @arg @ref LL_EXTI_LINE_5
329 * @arg @ref LL_EXTI_LINE_6
330 * @arg @ref LL_EXTI_LINE_7
331 * @arg @ref LL_EXTI_LINE_8
332 * @arg @ref LL_EXTI_LINE_9
333 * @arg @ref LL_EXTI_LINE_10
334 * @arg @ref LL_EXTI_LINE_11
335 * @arg @ref LL_EXTI_LINE_12
336 * @arg @ref LL_EXTI_LINE_13
337 * @arg @ref LL_EXTI_LINE_14
338 * @arg @ref LL_EXTI_LINE_15
339 * @arg @ref LL_EXTI_LINE_16
340 * @arg @ref LL_EXTI_LINE_17
341 * @arg @ref LL_EXTI_LINE_18
342 * @arg @ref LL_EXTI_LINE_19
343 * @arg @ref LL_EXTI_LINE_20
344 * @arg @ref LL_EXTI_LINE_21
345 * @arg @ref LL_EXTI_LINE_22
346 * @arg @ref LL_EXTI_LINE_23
347 * @arg @ref LL_EXTI_LINE_24(*)
348 * @arg @ref LL_EXTI_LINE_ALL_0_31
349 * @note (*): Available in some devices
350 * @note Please check each device line mapping for EXTI Line availability
351 * @retval State of bit (1 or 0).
353 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)
355 return (READ_BIT(EXTI->IMR, ExtiLine) == (ExtiLine));
360 * @}
363 /** @defgroup EXTI_LL_EF_Event_Management Event_Management
364 * @{
368 * @brief Enable ExtiLine Event request for Lines in range 0 to 31
369 * @rmtoll EMR EMx LL_EXTI_EnableEvent_0_31
370 * @param ExtiLine This parameter can be one of the following values:
371 * @arg @ref LL_EXTI_LINE_0
372 * @arg @ref LL_EXTI_LINE_1
373 * @arg @ref LL_EXTI_LINE_2
374 * @arg @ref LL_EXTI_LINE_3
375 * @arg @ref LL_EXTI_LINE_4
376 * @arg @ref LL_EXTI_LINE_5
377 * @arg @ref LL_EXTI_LINE_6
378 * @arg @ref LL_EXTI_LINE_7
379 * @arg @ref LL_EXTI_LINE_8
380 * @arg @ref LL_EXTI_LINE_9
381 * @arg @ref LL_EXTI_LINE_10
382 * @arg @ref LL_EXTI_LINE_11
383 * @arg @ref LL_EXTI_LINE_12
384 * @arg @ref LL_EXTI_LINE_13
385 * @arg @ref LL_EXTI_LINE_14
386 * @arg @ref LL_EXTI_LINE_15
387 * @arg @ref LL_EXTI_LINE_16
388 * @arg @ref LL_EXTI_LINE_17
389 * @arg @ref LL_EXTI_LINE_18
390 * @arg @ref LL_EXTI_LINE_19
391 * @arg @ref LL_EXTI_LINE_20
392 * @arg @ref LL_EXTI_LINE_21
393 * @arg @ref LL_EXTI_LINE_22
394 * @arg @ref LL_EXTI_LINE_23
395 * @arg @ref LL_EXTI_LINE_24(*)
396 * @arg @ref LL_EXTI_LINE_ALL_0_31
397 * @note (*): Available in some devices
398 * @note Please check each device line mapping for EXTI Line availability
399 * @retval None
401 __STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)
403 SET_BIT(EXTI->EMR, ExtiLine);
409 * @brief Disable ExtiLine Event request for Lines in range 0 to 31
410 * @rmtoll EMR EMx LL_EXTI_DisableEvent_0_31
411 * @param ExtiLine This parameter can be one of the following values:
412 * @arg @ref LL_EXTI_LINE_0
413 * @arg @ref LL_EXTI_LINE_1
414 * @arg @ref LL_EXTI_LINE_2
415 * @arg @ref LL_EXTI_LINE_3
416 * @arg @ref LL_EXTI_LINE_4
417 * @arg @ref LL_EXTI_LINE_5
418 * @arg @ref LL_EXTI_LINE_6
419 * @arg @ref LL_EXTI_LINE_7
420 * @arg @ref LL_EXTI_LINE_8
421 * @arg @ref LL_EXTI_LINE_9
422 * @arg @ref LL_EXTI_LINE_10
423 * @arg @ref LL_EXTI_LINE_11
424 * @arg @ref LL_EXTI_LINE_12
425 * @arg @ref LL_EXTI_LINE_13
426 * @arg @ref LL_EXTI_LINE_14
427 * @arg @ref LL_EXTI_LINE_15
428 * @arg @ref LL_EXTI_LINE_16
429 * @arg @ref LL_EXTI_LINE_17
430 * @arg @ref LL_EXTI_LINE_18
431 * @arg @ref LL_EXTI_LINE_19
432 * @arg @ref LL_EXTI_LINE_20
433 * @arg @ref LL_EXTI_LINE_21
434 * @arg @ref LL_EXTI_LINE_22
435 * @arg @ref LL_EXTI_LINE_23
436 * @arg @ref LL_EXTI_LINE_24(*)
437 * @arg @ref LL_EXTI_LINE_ALL_0_31
438 * @note (*): Available in some devices
439 * @note Please check each device line mapping for EXTI Line availability
440 * @retval None
442 __STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)
444 CLEAR_BIT(EXTI->EMR, ExtiLine);
449 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
450 * @rmtoll EMR EMx LL_EXTI_IsEnabledEvent_0_31
451 * @param ExtiLine This parameter can be one of the following values:
452 * @arg @ref LL_EXTI_LINE_0
453 * @arg @ref LL_EXTI_LINE_1
454 * @arg @ref LL_EXTI_LINE_2
455 * @arg @ref LL_EXTI_LINE_3
456 * @arg @ref LL_EXTI_LINE_4
457 * @arg @ref LL_EXTI_LINE_5
458 * @arg @ref LL_EXTI_LINE_6
459 * @arg @ref LL_EXTI_LINE_7
460 * @arg @ref LL_EXTI_LINE_8
461 * @arg @ref LL_EXTI_LINE_9
462 * @arg @ref LL_EXTI_LINE_10
463 * @arg @ref LL_EXTI_LINE_11
464 * @arg @ref LL_EXTI_LINE_12
465 * @arg @ref LL_EXTI_LINE_13
466 * @arg @ref LL_EXTI_LINE_14
467 * @arg @ref LL_EXTI_LINE_15
468 * @arg @ref LL_EXTI_LINE_16
469 * @arg @ref LL_EXTI_LINE_17
470 * @arg @ref LL_EXTI_LINE_18
471 * @arg @ref LL_EXTI_LINE_19
472 * @arg @ref LL_EXTI_LINE_20
473 * @arg @ref LL_EXTI_LINE_21
474 * @arg @ref LL_EXTI_LINE_22
475 * @arg @ref LL_EXTI_LINE_23
476 * @arg @ref LL_EXTI_LINE_24(*)
477 * @arg @ref LL_EXTI_LINE_ALL_0_31
478 * @note (*): Available in some devices
479 * @note Please check each device line mapping for EXTI Line availability
480 * @retval State of bit (1 or 0).
482 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)
484 return (READ_BIT(EXTI->EMR, ExtiLine) == (ExtiLine));
490 * @}
493 /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
494 * @{
498 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
499 * @note The configurable wakeup lines are edge-triggered. No glitch must be
500 * generated on these lines. If a rising edge on a configurable interrupt
501 * line occurs during a write operation in the EXTI_RTSR register, the
502 * pending bit is not set.
503 * Rising and falling edge triggers can be set for
504 * the same interrupt line. In this case, both generate a trigger
505 * condition.
506 * @rmtoll RTSR RTx LL_EXTI_EnableRisingTrig_0_31
507 * @param ExtiLine This parameter can be a combination 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_18
526 * @arg @ref LL_EXTI_LINE_19
527 * @arg @ref LL_EXTI_LINE_20
528 * @arg @ref LL_EXTI_LINE_21
529 * @arg @ref LL_EXTI_LINE_22
530 * @note Please check each device line mapping for EXTI Line availability
531 * @retval None
533 __STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)
535 SET_BIT(EXTI->RTSR, ExtiLine);
541 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
542 * @note The configurable wakeup lines are edge-triggered. No glitch must be
543 * generated on these lines. If a rising edge on a configurable interrupt
544 * line occurs during a write operation in the EXTI_RTSR register, the
545 * pending bit is not set.
546 * Rising and falling edge triggers can be set for
547 * the same interrupt line. In this case, both generate a trigger
548 * condition.
549 * @rmtoll RTSR RTx LL_EXTI_DisableRisingTrig_0_31
550 * @param ExtiLine This parameter can be a combination of the following values:
551 * @arg @ref LL_EXTI_LINE_0
552 * @arg @ref LL_EXTI_LINE_1
553 * @arg @ref LL_EXTI_LINE_2
554 * @arg @ref LL_EXTI_LINE_3
555 * @arg @ref LL_EXTI_LINE_4
556 * @arg @ref LL_EXTI_LINE_5
557 * @arg @ref LL_EXTI_LINE_6
558 * @arg @ref LL_EXTI_LINE_7
559 * @arg @ref LL_EXTI_LINE_8
560 * @arg @ref LL_EXTI_LINE_9
561 * @arg @ref LL_EXTI_LINE_10
562 * @arg @ref LL_EXTI_LINE_11
563 * @arg @ref LL_EXTI_LINE_12
564 * @arg @ref LL_EXTI_LINE_13
565 * @arg @ref LL_EXTI_LINE_14
566 * @arg @ref LL_EXTI_LINE_15
567 * @arg @ref LL_EXTI_LINE_16
568 * @arg @ref LL_EXTI_LINE_18
569 * @arg @ref LL_EXTI_LINE_19
570 * @arg @ref LL_EXTI_LINE_20
571 * @arg @ref LL_EXTI_LINE_21
572 * @arg @ref LL_EXTI_LINE_22
573 * @note Please check each device line mapping for EXTI Line availability
574 * @retval None
576 __STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)
578 CLEAR_BIT(EXTI->RTSR, ExtiLine);
584 * @brief Check if rising edge trigger is enabled for Lines in range 0 to 31
585 * @rmtoll RTSR RTx LL_EXTI_IsEnabledRisingTrig_0_31
586 * @param ExtiLine This parameter can be a combination of the following values:
587 * @arg @ref LL_EXTI_LINE_0
588 * @arg @ref LL_EXTI_LINE_1
589 * @arg @ref LL_EXTI_LINE_2
590 * @arg @ref LL_EXTI_LINE_3
591 * @arg @ref LL_EXTI_LINE_4
592 * @arg @ref LL_EXTI_LINE_5
593 * @arg @ref LL_EXTI_LINE_6
594 * @arg @ref LL_EXTI_LINE_7
595 * @arg @ref LL_EXTI_LINE_8
596 * @arg @ref LL_EXTI_LINE_9
597 * @arg @ref LL_EXTI_LINE_10
598 * @arg @ref LL_EXTI_LINE_11
599 * @arg @ref LL_EXTI_LINE_12
600 * @arg @ref LL_EXTI_LINE_13
601 * @arg @ref LL_EXTI_LINE_14
602 * @arg @ref LL_EXTI_LINE_15
603 * @arg @ref LL_EXTI_LINE_16
604 * @arg @ref LL_EXTI_LINE_18
605 * @arg @ref LL_EXTI_LINE_19
606 * @arg @ref LL_EXTI_LINE_20
607 * @arg @ref LL_EXTI_LINE_21
608 * @arg @ref LL_EXTI_LINE_22
609 * @note Please check each device line mapping for EXTI Line availability
610 * @retval State of bit (1 or 0).
612 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)
614 return (READ_BIT(EXTI->RTSR, ExtiLine) == (ExtiLine));
619 * @}
622 /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
623 * @{
627 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
628 * @note The configurable wakeup lines are edge-triggered. No glitch must be
629 * generated on these lines. If a falling edge on a configurable interrupt
630 * line occurs during a write operation in the EXTI_FTSR register, the
631 * pending bit is not set.
632 * Rising and falling edge triggers can be set for
633 * the same interrupt line. In this case, both generate a trigger
634 * condition.
635 * @rmtoll FTSR FTx LL_EXTI_EnableFallingTrig_0_31
636 * @param ExtiLine This parameter can be a combination of the following values:
637 * @arg @ref LL_EXTI_LINE_0
638 * @arg @ref LL_EXTI_LINE_1
639 * @arg @ref LL_EXTI_LINE_2
640 * @arg @ref LL_EXTI_LINE_3
641 * @arg @ref LL_EXTI_LINE_4
642 * @arg @ref LL_EXTI_LINE_5
643 * @arg @ref LL_EXTI_LINE_6
644 * @arg @ref LL_EXTI_LINE_7
645 * @arg @ref LL_EXTI_LINE_8
646 * @arg @ref LL_EXTI_LINE_9
647 * @arg @ref LL_EXTI_LINE_10
648 * @arg @ref LL_EXTI_LINE_11
649 * @arg @ref LL_EXTI_LINE_12
650 * @arg @ref LL_EXTI_LINE_13
651 * @arg @ref LL_EXTI_LINE_14
652 * @arg @ref LL_EXTI_LINE_15
653 * @arg @ref LL_EXTI_LINE_16
654 * @arg @ref LL_EXTI_LINE_18
655 * @arg @ref LL_EXTI_LINE_19
656 * @arg @ref LL_EXTI_LINE_20
657 * @arg @ref LL_EXTI_LINE_21
658 * @arg @ref LL_EXTI_LINE_22
659 * @note Please check each device line mapping for EXTI Line availability
660 * @retval None
662 __STATIC_INLINE void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)
664 SET_BIT(EXTI->FTSR, ExtiLine);
669 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
670 * @note The configurable wakeup lines are edge-triggered. No glitch must be
671 * generated on these lines. If a Falling edge on a configurable interrupt
672 * line occurs during a write operation in the EXTI_FTSR register, the
673 * pending bit is not set.
674 * Rising and falling edge triggers can be set for the same interrupt line.
675 * In this case, both generate a trigger condition.
676 * @rmtoll FTSR FTx LL_EXTI_DisableFallingTrig_0_31
677 * @param ExtiLine This parameter can be a combination of the following values:
678 * @arg @ref LL_EXTI_LINE_0
679 * @arg @ref LL_EXTI_LINE_1
680 * @arg @ref LL_EXTI_LINE_2
681 * @arg @ref LL_EXTI_LINE_3
682 * @arg @ref LL_EXTI_LINE_4
683 * @arg @ref LL_EXTI_LINE_5
684 * @arg @ref LL_EXTI_LINE_6
685 * @arg @ref LL_EXTI_LINE_7
686 * @arg @ref LL_EXTI_LINE_8
687 * @arg @ref LL_EXTI_LINE_9
688 * @arg @ref LL_EXTI_LINE_10
689 * @arg @ref LL_EXTI_LINE_11
690 * @arg @ref LL_EXTI_LINE_12
691 * @arg @ref LL_EXTI_LINE_13
692 * @arg @ref LL_EXTI_LINE_14
693 * @arg @ref LL_EXTI_LINE_15
694 * @arg @ref LL_EXTI_LINE_16
695 * @arg @ref LL_EXTI_LINE_18
696 * @arg @ref LL_EXTI_LINE_19
697 * @arg @ref LL_EXTI_LINE_20
698 * @arg @ref LL_EXTI_LINE_21
699 * @arg @ref LL_EXTI_LINE_22
700 * @note Please check each device line mapping for EXTI Line availability
701 * @retval None
703 __STATIC_INLINE void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)
705 CLEAR_BIT(EXTI->FTSR, ExtiLine);
710 * @brief Check if falling edge trigger is enabled for Lines in range 0 to 31
711 * @rmtoll FTSR FTx LL_EXTI_IsEnabledFallingTrig_0_31
712 * @param ExtiLine This parameter can be a combination of the following values:
713 * @arg @ref LL_EXTI_LINE_0
714 * @arg @ref LL_EXTI_LINE_1
715 * @arg @ref LL_EXTI_LINE_2
716 * @arg @ref LL_EXTI_LINE_3
717 * @arg @ref LL_EXTI_LINE_4
718 * @arg @ref LL_EXTI_LINE_5
719 * @arg @ref LL_EXTI_LINE_6
720 * @arg @ref LL_EXTI_LINE_7
721 * @arg @ref LL_EXTI_LINE_8
722 * @arg @ref LL_EXTI_LINE_9
723 * @arg @ref LL_EXTI_LINE_10
724 * @arg @ref LL_EXTI_LINE_11
725 * @arg @ref LL_EXTI_LINE_12
726 * @arg @ref LL_EXTI_LINE_13
727 * @arg @ref LL_EXTI_LINE_14
728 * @arg @ref LL_EXTI_LINE_15
729 * @arg @ref LL_EXTI_LINE_16
730 * @arg @ref LL_EXTI_LINE_18
731 * @arg @ref LL_EXTI_LINE_19
732 * @arg @ref LL_EXTI_LINE_20
733 * @arg @ref LL_EXTI_LINE_21
734 * @arg @ref LL_EXTI_LINE_22
735 * @note Please check each device line mapping for EXTI Line availability
736 * @retval State of bit (1 or 0).
738 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine)
740 return (READ_BIT(EXTI->FTSR, ExtiLine) == (ExtiLine));
745 * @}
748 /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
749 * @{
753 * @brief Generate a software Interrupt Event for Lines in range 0 to 31
754 * @note If the interrupt is enabled on this line in the EXTI_IMR, writing a 1 to
755 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR
756 * resulting in an interrupt request generation.
757 * This bit is cleared by clearing the corresponding bit in the EXTI_PR
758 * register (by writing a 1 into the bit)
759 * @rmtoll SWIER SWIx LL_EXTI_GenerateSWI_0_31
760 * @param ExtiLine This parameter can be a combination of the following values:
761 * @arg @ref LL_EXTI_LINE_0
762 * @arg @ref LL_EXTI_LINE_1
763 * @arg @ref LL_EXTI_LINE_2
764 * @arg @ref LL_EXTI_LINE_3
765 * @arg @ref LL_EXTI_LINE_4
766 * @arg @ref LL_EXTI_LINE_5
767 * @arg @ref LL_EXTI_LINE_6
768 * @arg @ref LL_EXTI_LINE_7
769 * @arg @ref LL_EXTI_LINE_8
770 * @arg @ref LL_EXTI_LINE_9
771 * @arg @ref LL_EXTI_LINE_10
772 * @arg @ref LL_EXTI_LINE_11
773 * @arg @ref LL_EXTI_LINE_12
774 * @arg @ref LL_EXTI_LINE_13
775 * @arg @ref LL_EXTI_LINE_14
776 * @arg @ref LL_EXTI_LINE_15
777 * @arg @ref LL_EXTI_LINE_16
778 * @arg @ref LL_EXTI_LINE_18
779 * @arg @ref LL_EXTI_LINE_19
780 * @arg @ref LL_EXTI_LINE_20
781 * @arg @ref LL_EXTI_LINE_21
782 * @arg @ref LL_EXTI_LINE_22
783 * @note Please check each device line mapping for EXTI Line availability
784 * @retval None
786 __STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)
788 SET_BIT(EXTI->SWIER, ExtiLine);
793 * @}
796 /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
797 * @{
801 * @brief Check if the ExtLine Flag is set or not for Lines in range 0 to 31
802 * @note This bit is set when the selected edge event arrives on the interrupt
803 * line. This bit is cleared by writing a 1 to the bit.
804 * @rmtoll PR PIFx LL_EXTI_IsActiveFlag_0_31
805 * @param ExtiLine This parameter can be a combination of the following values:
806 * @arg @ref LL_EXTI_LINE_0
807 * @arg @ref LL_EXTI_LINE_1
808 * @arg @ref LL_EXTI_LINE_2
809 * @arg @ref LL_EXTI_LINE_3
810 * @arg @ref LL_EXTI_LINE_4
811 * @arg @ref LL_EXTI_LINE_5
812 * @arg @ref LL_EXTI_LINE_6
813 * @arg @ref LL_EXTI_LINE_7
814 * @arg @ref LL_EXTI_LINE_8
815 * @arg @ref LL_EXTI_LINE_9
816 * @arg @ref LL_EXTI_LINE_10
817 * @arg @ref LL_EXTI_LINE_11
818 * @arg @ref LL_EXTI_LINE_12
819 * @arg @ref LL_EXTI_LINE_13
820 * @arg @ref LL_EXTI_LINE_14
821 * @arg @ref LL_EXTI_LINE_15
822 * @arg @ref LL_EXTI_LINE_16
823 * @arg @ref LL_EXTI_LINE_18
824 * @arg @ref LL_EXTI_LINE_19
825 * @arg @ref LL_EXTI_LINE_20
826 * @arg @ref LL_EXTI_LINE_21
827 * @arg @ref LL_EXTI_LINE_22
828 * @note Please check each device line mapping for EXTI Line availability
829 * @retval State of bit (1 or 0).
831 __STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine)
833 return (READ_BIT(EXTI->PR, ExtiLine) == (ExtiLine));
838 * @brief Read ExtLine Combination Flag for Lines in range 0 to 31
839 * @note This bit is set when the selected edge event arrives on the interrupt
840 * line. This bit is cleared by writing a 1 to the bit.
841 * @rmtoll PR PIFx LL_EXTI_ReadFlag_0_31
842 * @param ExtiLine This parameter can be a combination of the following values:
843 * @arg @ref LL_EXTI_LINE_0
844 * @arg @ref LL_EXTI_LINE_1
845 * @arg @ref LL_EXTI_LINE_2
846 * @arg @ref LL_EXTI_LINE_3
847 * @arg @ref LL_EXTI_LINE_4
848 * @arg @ref LL_EXTI_LINE_5
849 * @arg @ref LL_EXTI_LINE_6
850 * @arg @ref LL_EXTI_LINE_7
851 * @arg @ref LL_EXTI_LINE_8
852 * @arg @ref LL_EXTI_LINE_9
853 * @arg @ref LL_EXTI_LINE_10
854 * @arg @ref LL_EXTI_LINE_11
855 * @arg @ref LL_EXTI_LINE_12
856 * @arg @ref LL_EXTI_LINE_13
857 * @arg @ref LL_EXTI_LINE_14
858 * @arg @ref LL_EXTI_LINE_15
859 * @arg @ref LL_EXTI_LINE_16
860 * @arg @ref LL_EXTI_LINE_18
861 * @arg @ref LL_EXTI_LINE_19
862 * @arg @ref LL_EXTI_LINE_20
863 * @arg @ref LL_EXTI_LINE_21
864 * @arg @ref LL_EXTI_LINE_22
865 * @note Please check each device line mapping for EXTI Line availability
866 * @retval @note This bit is set when the selected edge event arrives on the interrupt
868 __STATIC_INLINE uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine)
870 return (uint32_t)(READ_BIT(EXTI->PR, ExtiLine));
875 * @brief Clear ExtLine Flags for Lines in range 0 to 31
876 * @note This bit is set when the selected edge event arrives on the interrupt
877 * line. This bit is cleared by writing a 1 to the bit.
878 * @rmtoll PR PIFx LL_EXTI_ClearFlag_0_31
879 * @param ExtiLine This parameter can be a combination of the following values:
880 * @arg @ref LL_EXTI_LINE_0
881 * @arg @ref LL_EXTI_LINE_1
882 * @arg @ref LL_EXTI_LINE_2
883 * @arg @ref LL_EXTI_LINE_3
884 * @arg @ref LL_EXTI_LINE_4
885 * @arg @ref LL_EXTI_LINE_5
886 * @arg @ref LL_EXTI_LINE_6
887 * @arg @ref LL_EXTI_LINE_7
888 * @arg @ref LL_EXTI_LINE_8
889 * @arg @ref LL_EXTI_LINE_9
890 * @arg @ref LL_EXTI_LINE_10
891 * @arg @ref LL_EXTI_LINE_11
892 * @arg @ref LL_EXTI_LINE_12
893 * @arg @ref LL_EXTI_LINE_13
894 * @arg @ref LL_EXTI_LINE_14
895 * @arg @ref LL_EXTI_LINE_15
896 * @arg @ref LL_EXTI_LINE_16
897 * @arg @ref LL_EXTI_LINE_18
898 * @arg @ref LL_EXTI_LINE_19
899 * @arg @ref LL_EXTI_LINE_20
900 * @arg @ref LL_EXTI_LINE_21
901 * @arg @ref LL_EXTI_LINE_22
902 * @note Please check each device line mapping for EXTI Line availability
903 * @retval None
905 __STATIC_INLINE void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine)
907 WRITE_REG(EXTI->PR, ExtiLine);
912 * @}
915 #if defined(USE_FULL_LL_DRIVER)
916 /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
917 * @{
920 uint32_t LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct);
921 uint32_t LL_EXTI_DeInit(void);
922 void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct);
926 * @}
928 #endif /* USE_FULL_LL_DRIVER */
931 * @}
935 * @}
938 #endif /* EXTI */
941 * @}
944 #ifdef __cplusplus
946 #endif
948 #endif /* __STM32F7xx_LL_EXTI_H */
950 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/