2 ******************************************************************************
3 * @file stm32f7xx_ll_exti.h
4 * @author MCD Application Team
7 * @brief Header file of EXTI LL module.
8 ******************************************************************************
11 * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
13 * Redistribution and use in source and binary forms, with or without modification,
14 * are permitted provided that the following conditions are met:
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 ******************************************************************************
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __STM32F7xx_LL_EXTI_H
40 #define __STM32F7xx_LL_EXTI_H
46 /* Includes ------------------------------------------------------------------*/
47 #include "stm32f7xx.h"
49 /** @addtogroup STM32F7xx_LL_Driver
55 /** @defgroup EXTI_LL EXTI
59 /* Private types -------------------------------------------------------------*/
60 /* Private variables ---------------------------------------------------------*/
61 /* Private constants ---------------------------------------------------------*/
62 /* Private Macros ------------------------------------------------------------*/
63 #if defined(USE_FULL_LL_DRIVER)
64 /** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
70 #endif /*USE_FULL_LL_DRIVER*/
71 /* Exported types ------------------------------------------------------------*/
72 #if defined(USE_FULL_LL_DRIVER)
73 /** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
79 uint32_t Line_0_31
; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31
80 This parameter can be any combination of @ref EXTI_LL_EC_LINE */
82 FunctionalState LineCommand
; /*!< Specifies the new state of the selected EXTI lines.
83 This parameter can be set either to ENABLE or DISABLE */
85 uint8_t Mode
; /*!< Specifies the mode for the EXTI lines.
86 This parameter can be a value of @ref EXTI_LL_EC_MODE. */
88 uint8_t Trigger
; /*!< Specifies the trigger signal active edge for the EXTI lines.
89 This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
90 } LL_EXTI_InitTypeDef
;
95 #endif /*USE_FULL_LL_DRIVER*/
97 /* Exported constants --------------------------------------------------------*/
98 /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
102 /** @defgroup EXTI_LL_EC_LINE LINE
105 #define LL_EXTI_LINE_0 EXTI_IMR_IM0 /*!< Extended line 0 */
106 #define LL_EXTI_LINE_1 EXTI_IMR_IM1 /*!< Extended line 1 */
107 #define LL_EXTI_LINE_2 EXTI_IMR_IM2 /*!< Extended line 2 */
108 #define LL_EXTI_LINE_3 EXTI_IMR_IM3 /*!< Extended line 3 */
109 #define LL_EXTI_LINE_4 EXTI_IMR_IM4 /*!< Extended line 4 */
110 #define LL_EXTI_LINE_5 EXTI_IMR_IM5 /*!< Extended line 5 */
111 #define LL_EXTI_LINE_6 EXTI_IMR_IM6 /*!< Extended line 6 */
112 #define LL_EXTI_LINE_7 EXTI_IMR_IM7 /*!< Extended line 7 */
113 #define LL_EXTI_LINE_8 EXTI_IMR_IM8 /*!< Extended line 8 */
114 #define LL_EXTI_LINE_9 EXTI_IMR_IM9 /*!< Extended line 9 */
115 #define LL_EXTI_LINE_10 EXTI_IMR_IM10 /*!< Extended line 10 */
116 #define LL_EXTI_LINE_11 EXTI_IMR_IM11 /*!< Extended line 11 */
117 #define LL_EXTI_LINE_12 EXTI_IMR_IM12 /*!< Extended line 12 */
118 #define LL_EXTI_LINE_13 EXTI_IMR_IM13 /*!< Extended line 13 */
119 #define LL_EXTI_LINE_14 EXTI_IMR_IM14 /*!< Extended line 14 */
120 #define LL_EXTI_LINE_15 EXTI_IMR_IM15 /*!< Extended line 15 */
121 #if defined(EXTI_IMR_IM16)
122 #define LL_EXTI_LINE_16 EXTI_IMR_IM16 /*!< Extended line 16 */
124 #define LL_EXTI_LINE_17 EXTI_IMR_IM17 /*!< Extended line 17 */
125 #if defined(EXTI_IMR_IM18)
126 #define LL_EXTI_LINE_18 EXTI_IMR_IM18 /*!< Extended line 18 */
128 #define LL_EXTI_LINE_19 EXTI_IMR_IM19 /*!< Extended line 19 */
129 #if defined(EXTI_IMR_IM20)
130 #define LL_EXTI_LINE_20 EXTI_IMR_IM20 /*!< Extended line 20 */
132 #if defined(EXTI_IMR_IM21)
133 #define LL_EXTI_LINE_21 EXTI_IMR_IM21 /*!< Extended line 21 */
135 #if defined(EXTI_IMR_IM22)
136 #define LL_EXTI_LINE_22 EXTI_IMR_IM22 /*!< Extended line 22 */
138 #define LL_EXTI_LINE_23 EXTI_IMR_IM23 /*!< Extended line 23 */
139 #if defined(EXTI_IMR_IM24)
140 #define LL_EXTI_LINE_24 EXTI_IMR_IM24 /*!< Extended line 24 */
142 #if defined(EXTI_IMR_IM25)
143 #define LL_EXTI_LINE_25 EXTI_IMR_IM25 /*!< Extended line 25 */
145 #if defined(EXTI_IMR_IM26)
146 #define LL_EXTI_LINE_26 EXTI_IMR_IM26 /*!< Extended line 26 */
148 #if defined(EXTI_IMR_IM27)
149 #define LL_EXTI_LINE_27 EXTI_IMR_IM27 /*!< Extended line 27 */
151 #if defined(EXTI_IMR_IM28)
152 #define LL_EXTI_LINE_28 EXTI_IMR_IM28 /*!< Extended line 28 */
154 #if defined(EXTI_IMR_IM29)
155 #define LL_EXTI_LINE_29 EXTI_IMR_IM29 /*!< Extended line 29 */
157 #if defined(EXTI_IMR_IM30)
158 #define LL_EXTI_LINE_30 EXTI_IMR_IM30 /*!< Extended line 30 */
160 #if defined(EXTI_IMR_IM31)
161 #define LL_EXTI_LINE_31 EXTI_IMR_IM31 /*!< Extended line 31 */
163 #define LL_EXTI_LINE_ALL_0_31 EXTI_IMR_IM /*!< All Extended line not reserved*/
166 #define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
168 #if defined(USE_FULL_LL_DRIVER)
169 #define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */
170 #endif /*USE_FULL_LL_DRIVER*/
175 #if defined(USE_FULL_LL_DRIVER)
177 /** @defgroup EXTI_LL_EC_MODE Mode
180 #define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */
181 #define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */
182 #define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
187 /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
190 #define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */
191 #define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */
192 #define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */
193 #define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
200 #endif /*USE_FULL_LL_DRIVER*/
207 /* Exported macro ------------------------------------------------------------*/
208 /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
212 /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
217 * @brief Write a value in EXTI register
218 * @param __REG__ Register to be written
219 * @param __VALUE__ Value to be written in the register
222 #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
225 * @brief Read a value in EXTI register
226 * @param __REG__ Register to be read
227 * @retval Register value
229 #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
241 /* Exported functions --------------------------------------------------------*/
242 /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
245 /** @defgroup EXTI_LL_EF_IT_Management IT_Management
250 * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31
251 * @note The reset value for the direct or internal lines (see RM)
252 * is set to 1 in order to enable the interrupt by default.
253 * Bits are set automatically at Power on.
254 * @rmtoll IMR IMx LL_EXTI_EnableIT_0_31
255 * @param ExtiLine This parameter can be one of the following values:
256 * @arg @ref LL_EXTI_LINE_0
257 * @arg @ref LL_EXTI_LINE_1
258 * @arg @ref LL_EXTI_LINE_2
259 * @arg @ref LL_EXTI_LINE_3
260 * @arg @ref LL_EXTI_LINE_4
261 * @arg @ref LL_EXTI_LINE_5
262 * @arg @ref LL_EXTI_LINE_6
263 * @arg @ref LL_EXTI_LINE_7
264 * @arg @ref LL_EXTI_LINE_8
265 * @arg @ref LL_EXTI_LINE_9
266 * @arg @ref LL_EXTI_LINE_10
267 * @arg @ref LL_EXTI_LINE_11
268 * @arg @ref LL_EXTI_LINE_12
269 * @arg @ref LL_EXTI_LINE_13
270 * @arg @ref LL_EXTI_LINE_14
271 * @arg @ref LL_EXTI_LINE_15
272 * @arg @ref LL_EXTI_LINE_16
273 * @arg @ref LL_EXTI_LINE_17
274 * @arg @ref LL_EXTI_LINE_18
275 * @arg @ref LL_EXTI_LINE_19
276 * @arg @ref LL_EXTI_LINE_20
277 * @arg @ref LL_EXTI_LINE_21
278 * @arg @ref LL_EXTI_LINE_22
279 * @arg @ref LL_EXTI_LINE_23
280 * @arg @ref LL_EXTI_LINE_24(*)
281 * @arg @ref LL_EXTI_LINE_ALL_0_31
282 * @note (*): Available in some devices
283 * @note Please check each device line mapping for EXTI Line availability
286 __STATIC_INLINE
void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine
)
288 SET_BIT(EXTI
->IMR
, ExtiLine
);
292 * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31
293 * @note The reset value for the direct or internal lines (see RM)
294 * is set to 1 in order to enable the interrupt by default.
295 * Bits are set automatically at Power on.
296 * @rmtoll IMR IMx LL_EXTI_DisableIT_0_31
297 * @param ExtiLine This parameter can be one of the following values:
298 * @arg @ref LL_EXTI_LINE_0
299 * @arg @ref LL_EXTI_LINE_1
300 * @arg @ref LL_EXTI_LINE_2
301 * @arg @ref LL_EXTI_LINE_3
302 * @arg @ref LL_EXTI_LINE_4
303 * @arg @ref LL_EXTI_LINE_5
304 * @arg @ref LL_EXTI_LINE_6
305 * @arg @ref LL_EXTI_LINE_7
306 * @arg @ref LL_EXTI_LINE_8
307 * @arg @ref LL_EXTI_LINE_9
308 * @arg @ref LL_EXTI_LINE_10
309 * @arg @ref LL_EXTI_LINE_11
310 * @arg @ref LL_EXTI_LINE_12
311 * @arg @ref LL_EXTI_LINE_13
312 * @arg @ref LL_EXTI_LINE_14
313 * @arg @ref LL_EXTI_LINE_15
314 * @arg @ref LL_EXTI_LINE_16
315 * @arg @ref LL_EXTI_LINE_17
316 * @arg @ref LL_EXTI_LINE_18
317 * @arg @ref LL_EXTI_LINE_19
318 * @arg @ref LL_EXTI_LINE_20
319 * @arg @ref LL_EXTI_LINE_21
320 * @arg @ref LL_EXTI_LINE_22
321 * @arg @ref LL_EXTI_LINE_23
322 * @arg @ref LL_EXTI_LINE_24(*)
323 * @arg @ref LL_EXTI_LINE_ALL_0_31
324 * @note (*): Available in some devices
325 * @note Please check each device line mapping for EXTI Line availability
328 __STATIC_INLINE
void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine
)
330 CLEAR_BIT(EXTI
->IMR
, ExtiLine
);
335 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
336 * @note The reset value for the direct or internal lines (see RM)
337 * is set to 1 in order to enable the interrupt by default.
338 * Bits are set automatically at Power on.
339 * @rmtoll IMR IMx LL_EXTI_IsEnabledIT_0_31
340 * @param ExtiLine This parameter can be one of the following values:
341 * @arg @ref LL_EXTI_LINE_0
342 * @arg @ref LL_EXTI_LINE_1
343 * @arg @ref LL_EXTI_LINE_2
344 * @arg @ref LL_EXTI_LINE_3
345 * @arg @ref LL_EXTI_LINE_4
346 * @arg @ref LL_EXTI_LINE_5
347 * @arg @ref LL_EXTI_LINE_6
348 * @arg @ref LL_EXTI_LINE_7
349 * @arg @ref LL_EXTI_LINE_8
350 * @arg @ref LL_EXTI_LINE_9
351 * @arg @ref LL_EXTI_LINE_10
352 * @arg @ref LL_EXTI_LINE_11
353 * @arg @ref LL_EXTI_LINE_12
354 * @arg @ref LL_EXTI_LINE_13
355 * @arg @ref LL_EXTI_LINE_14
356 * @arg @ref LL_EXTI_LINE_15
357 * @arg @ref LL_EXTI_LINE_16
358 * @arg @ref LL_EXTI_LINE_17
359 * @arg @ref LL_EXTI_LINE_18
360 * @arg @ref LL_EXTI_LINE_19
361 * @arg @ref LL_EXTI_LINE_20
362 * @arg @ref LL_EXTI_LINE_21
363 * @arg @ref LL_EXTI_LINE_22
364 * @arg @ref LL_EXTI_LINE_23
365 * @arg @ref LL_EXTI_LINE_24(*)
366 * @arg @ref LL_EXTI_LINE_ALL_0_31
367 * @note (*): Available in some devices
368 * @note Please check each device line mapping for EXTI Line availability
369 * @retval State of bit (1 or 0).
371 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine
)
373 return (READ_BIT(EXTI
->IMR
, ExtiLine
) == (ExtiLine
));
381 /** @defgroup EXTI_LL_EF_Event_Management Event_Management
386 * @brief Enable ExtiLine Event request for Lines in range 0 to 31
387 * @rmtoll EMR EMx LL_EXTI_EnableEvent_0_31
388 * @param ExtiLine This parameter can be one of the following values:
389 * @arg @ref LL_EXTI_LINE_0
390 * @arg @ref LL_EXTI_LINE_1
391 * @arg @ref LL_EXTI_LINE_2
392 * @arg @ref LL_EXTI_LINE_3
393 * @arg @ref LL_EXTI_LINE_4
394 * @arg @ref LL_EXTI_LINE_5
395 * @arg @ref LL_EXTI_LINE_6
396 * @arg @ref LL_EXTI_LINE_7
397 * @arg @ref LL_EXTI_LINE_8
398 * @arg @ref LL_EXTI_LINE_9
399 * @arg @ref LL_EXTI_LINE_10
400 * @arg @ref LL_EXTI_LINE_11
401 * @arg @ref LL_EXTI_LINE_12
402 * @arg @ref LL_EXTI_LINE_13
403 * @arg @ref LL_EXTI_LINE_14
404 * @arg @ref LL_EXTI_LINE_15
405 * @arg @ref LL_EXTI_LINE_16
406 * @arg @ref LL_EXTI_LINE_17
407 * @arg @ref LL_EXTI_LINE_18
408 * @arg @ref LL_EXTI_LINE_19
409 * @arg @ref LL_EXTI_LINE_20
410 * @arg @ref LL_EXTI_LINE_21
411 * @arg @ref LL_EXTI_LINE_22
412 * @arg @ref LL_EXTI_LINE_23
413 * @arg @ref LL_EXTI_LINE_24(*)
414 * @arg @ref LL_EXTI_LINE_ALL_0_31
415 * @note (*): Available in some devices
416 * @note Please check each device line mapping for EXTI Line availability
419 __STATIC_INLINE
void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine
)
421 SET_BIT(EXTI
->EMR
, ExtiLine
);
427 * @brief Disable ExtiLine Event request for Lines in range 0 to 31
428 * @rmtoll EMR EMx LL_EXTI_DisableEvent_0_31
429 * @param ExtiLine This parameter can be one of the following values:
430 * @arg @ref LL_EXTI_LINE_0
431 * @arg @ref LL_EXTI_LINE_1
432 * @arg @ref LL_EXTI_LINE_2
433 * @arg @ref LL_EXTI_LINE_3
434 * @arg @ref LL_EXTI_LINE_4
435 * @arg @ref LL_EXTI_LINE_5
436 * @arg @ref LL_EXTI_LINE_6
437 * @arg @ref LL_EXTI_LINE_7
438 * @arg @ref LL_EXTI_LINE_8
439 * @arg @ref LL_EXTI_LINE_9
440 * @arg @ref LL_EXTI_LINE_10
441 * @arg @ref LL_EXTI_LINE_11
442 * @arg @ref LL_EXTI_LINE_12
443 * @arg @ref LL_EXTI_LINE_13
444 * @arg @ref LL_EXTI_LINE_14
445 * @arg @ref LL_EXTI_LINE_15
446 * @arg @ref LL_EXTI_LINE_16
447 * @arg @ref LL_EXTI_LINE_17
448 * @arg @ref LL_EXTI_LINE_18
449 * @arg @ref LL_EXTI_LINE_19
450 * @arg @ref LL_EXTI_LINE_20
451 * @arg @ref LL_EXTI_LINE_21
452 * @arg @ref LL_EXTI_LINE_22
453 * @arg @ref LL_EXTI_LINE_23
454 * @arg @ref LL_EXTI_LINE_24(*)
455 * @arg @ref LL_EXTI_LINE_ALL_0_31
456 * @note (*): Available in some devices
457 * @note Please check each device line mapping for EXTI Line availability
460 __STATIC_INLINE
void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine
)
462 CLEAR_BIT(EXTI
->EMR
, ExtiLine
);
467 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
468 * @rmtoll EMR EMx LL_EXTI_IsEnabledEvent_0_31
469 * @param ExtiLine This parameter can be one of the following values:
470 * @arg @ref LL_EXTI_LINE_0
471 * @arg @ref LL_EXTI_LINE_1
472 * @arg @ref LL_EXTI_LINE_2
473 * @arg @ref LL_EXTI_LINE_3
474 * @arg @ref LL_EXTI_LINE_4
475 * @arg @ref LL_EXTI_LINE_5
476 * @arg @ref LL_EXTI_LINE_6
477 * @arg @ref LL_EXTI_LINE_7
478 * @arg @ref LL_EXTI_LINE_8
479 * @arg @ref LL_EXTI_LINE_9
480 * @arg @ref LL_EXTI_LINE_10
481 * @arg @ref LL_EXTI_LINE_11
482 * @arg @ref LL_EXTI_LINE_12
483 * @arg @ref LL_EXTI_LINE_13
484 * @arg @ref LL_EXTI_LINE_14
485 * @arg @ref LL_EXTI_LINE_15
486 * @arg @ref LL_EXTI_LINE_16
487 * @arg @ref LL_EXTI_LINE_17
488 * @arg @ref LL_EXTI_LINE_18
489 * @arg @ref LL_EXTI_LINE_19
490 * @arg @ref LL_EXTI_LINE_20
491 * @arg @ref LL_EXTI_LINE_21
492 * @arg @ref LL_EXTI_LINE_22
493 * @arg @ref LL_EXTI_LINE_23
494 * @arg @ref LL_EXTI_LINE_24(*)
495 * @arg @ref LL_EXTI_LINE_ALL_0_31
496 * @note (*): Available in some devices
497 * @note Please check each device line mapping for EXTI Line availability
498 * @retval State of bit (1 or 0).
500 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine
)
502 return (READ_BIT(EXTI
->EMR
, ExtiLine
) == (ExtiLine
));
511 /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
516 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
517 * @note The configurable wakeup lines are edge-triggered. No glitch must be
518 * generated on these lines. If a rising edge on a configurable interrupt
519 * line occurs during a write operation in the EXTI_RTSR register, the
520 * pending bit is not set.
521 * Rising and falling edge triggers can be set for
522 * the same interrupt line. In this case, both generate a trigger
524 * @rmtoll RTSR RTx LL_EXTI_EnableRisingTrig_0_31
525 * @param ExtiLine This parameter can be a combination of the following values:
526 * @arg @ref LL_EXTI_LINE_0
527 * @arg @ref LL_EXTI_LINE_1
528 * @arg @ref LL_EXTI_LINE_2
529 * @arg @ref LL_EXTI_LINE_3
530 * @arg @ref LL_EXTI_LINE_4
531 * @arg @ref LL_EXTI_LINE_5
532 * @arg @ref LL_EXTI_LINE_6
533 * @arg @ref LL_EXTI_LINE_7
534 * @arg @ref LL_EXTI_LINE_8
535 * @arg @ref LL_EXTI_LINE_9
536 * @arg @ref LL_EXTI_LINE_10
537 * @arg @ref LL_EXTI_LINE_11
538 * @arg @ref LL_EXTI_LINE_12
539 * @arg @ref LL_EXTI_LINE_13
540 * @arg @ref LL_EXTI_LINE_14
541 * @arg @ref LL_EXTI_LINE_15
542 * @arg @ref LL_EXTI_LINE_16
543 * @arg @ref LL_EXTI_LINE_18
544 * @arg @ref LL_EXTI_LINE_19
545 * @arg @ref LL_EXTI_LINE_20
546 * @arg @ref LL_EXTI_LINE_21
547 * @arg @ref LL_EXTI_LINE_22
548 * @note Please check each device line mapping for EXTI Line availability
551 __STATIC_INLINE
void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine
)
553 SET_BIT(EXTI
->RTSR
, ExtiLine
);
559 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
560 * @note The configurable wakeup lines are edge-triggered. No glitch must be
561 * generated on these lines. If a rising edge on a configurable interrupt
562 * line occurs during a write operation in the EXTI_RTSR register, the
563 * pending bit is not set.
564 * Rising and falling edge triggers can be set for
565 * the same interrupt line. In this case, both generate a trigger
567 * @rmtoll RTSR RTx LL_EXTI_DisableRisingTrig_0_31
568 * @param ExtiLine This parameter can be a combination of the following values:
569 * @arg @ref LL_EXTI_LINE_0
570 * @arg @ref LL_EXTI_LINE_1
571 * @arg @ref LL_EXTI_LINE_2
572 * @arg @ref LL_EXTI_LINE_3
573 * @arg @ref LL_EXTI_LINE_4
574 * @arg @ref LL_EXTI_LINE_5
575 * @arg @ref LL_EXTI_LINE_6
576 * @arg @ref LL_EXTI_LINE_7
577 * @arg @ref LL_EXTI_LINE_8
578 * @arg @ref LL_EXTI_LINE_9
579 * @arg @ref LL_EXTI_LINE_10
580 * @arg @ref LL_EXTI_LINE_11
581 * @arg @ref LL_EXTI_LINE_12
582 * @arg @ref LL_EXTI_LINE_13
583 * @arg @ref LL_EXTI_LINE_14
584 * @arg @ref LL_EXTI_LINE_15
585 * @arg @ref LL_EXTI_LINE_16
586 * @arg @ref LL_EXTI_LINE_18
587 * @arg @ref LL_EXTI_LINE_19
588 * @arg @ref LL_EXTI_LINE_20
589 * @arg @ref LL_EXTI_LINE_21
590 * @arg @ref LL_EXTI_LINE_22
591 * @note Please check each device line mapping for EXTI Line availability
594 __STATIC_INLINE
void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine
)
596 CLEAR_BIT(EXTI
->RTSR
, ExtiLine
);
602 * @brief Check if rising edge trigger is enabled for Lines in range 0 to 31
603 * @rmtoll RTSR RTx LL_EXTI_IsEnabledRisingTrig_0_31
604 * @param ExtiLine This parameter can be a combination of the following values:
605 * @arg @ref LL_EXTI_LINE_0
606 * @arg @ref LL_EXTI_LINE_1
607 * @arg @ref LL_EXTI_LINE_2
608 * @arg @ref LL_EXTI_LINE_3
609 * @arg @ref LL_EXTI_LINE_4
610 * @arg @ref LL_EXTI_LINE_5
611 * @arg @ref LL_EXTI_LINE_6
612 * @arg @ref LL_EXTI_LINE_7
613 * @arg @ref LL_EXTI_LINE_8
614 * @arg @ref LL_EXTI_LINE_9
615 * @arg @ref LL_EXTI_LINE_10
616 * @arg @ref LL_EXTI_LINE_11
617 * @arg @ref LL_EXTI_LINE_12
618 * @arg @ref LL_EXTI_LINE_13
619 * @arg @ref LL_EXTI_LINE_14
620 * @arg @ref LL_EXTI_LINE_15
621 * @arg @ref LL_EXTI_LINE_16
622 * @arg @ref LL_EXTI_LINE_18
623 * @arg @ref LL_EXTI_LINE_19
624 * @arg @ref LL_EXTI_LINE_20
625 * @arg @ref LL_EXTI_LINE_21
626 * @arg @ref LL_EXTI_LINE_22
627 * @note Please check each device line mapping for EXTI Line availability
628 * @retval State of bit (1 or 0).
630 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine
)
632 return (READ_BIT(EXTI
->RTSR
, ExtiLine
) == (ExtiLine
));
640 /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
645 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
646 * @note The configurable wakeup lines are edge-triggered. No glitch must be
647 * generated on these lines. If a falling edge on a configurable interrupt
648 * line occurs during a write operation in the EXTI_FTSR register, the
649 * pending bit is not set.
650 * Rising and falling edge triggers can be set for
651 * the same interrupt line. In this case, both generate a trigger
653 * @rmtoll FTSR FTx LL_EXTI_EnableFallingTrig_0_31
654 * @param ExtiLine This parameter can be a combination of the following values:
655 * @arg @ref LL_EXTI_LINE_0
656 * @arg @ref LL_EXTI_LINE_1
657 * @arg @ref LL_EXTI_LINE_2
658 * @arg @ref LL_EXTI_LINE_3
659 * @arg @ref LL_EXTI_LINE_4
660 * @arg @ref LL_EXTI_LINE_5
661 * @arg @ref LL_EXTI_LINE_6
662 * @arg @ref LL_EXTI_LINE_7
663 * @arg @ref LL_EXTI_LINE_8
664 * @arg @ref LL_EXTI_LINE_9
665 * @arg @ref LL_EXTI_LINE_10
666 * @arg @ref LL_EXTI_LINE_11
667 * @arg @ref LL_EXTI_LINE_12
668 * @arg @ref LL_EXTI_LINE_13
669 * @arg @ref LL_EXTI_LINE_14
670 * @arg @ref LL_EXTI_LINE_15
671 * @arg @ref LL_EXTI_LINE_16
672 * @arg @ref LL_EXTI_LINE_18
673 * @arg @ref LL_EXTI_LINE_19
674 * @arg @ref LL_EXTI_LINE_20
675 * @arg @ref LL_EXTI_LINE_21
676 * @arg @ref LL_EXTI_LINE_22
677 * @note Please check each device line mapping for EXTI Line availability
680 __STATIC_INLINE
void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine
)
682 SET_BIT(EXTI
->FTSR
, ExtiLine
);
687 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
688 * @note The configurable wakeup lines are edge-triggered. No glitch must be
689 * generated on these lines. If a Falling edge on a configurable interrupt
690 * line occurs during a write operation in the EXTI_FTSR register, the
691 * pending bit is not set.
692 * Rising and falling edge triggers can be set for the same interrupt line.
693 * In this case, both generate a trigger condition.
694 * @rmtoll FTSR FTx LL_EXTI_DisableFallingTrig_0_31
695 * @param ExtiLine This parameter can be a combination of the following values:
696 * @arg @ref LL_EXTI_LINE_0
697 * @arg @ref LL_EXTI_LINE_1
698 * @arg @ref LL_EXTI_LINE_2
699 * @arg @ref LL_EXTI_LINE_3
700 * @arg @ref LL_EXTI_LINE_4
701 * @arg @ref LL_EXTI_LINE_5
702 * @arg @ref LL_EXTI_LINE_6
703 * @arg @ref LL_EXTI_LINE_7
704 * @arg @ref LL_EXTI_LINE_8
705 * @arg @ref LL_EXTI_LINE_9
706 * @arg @ref LL_EXTI_LINE_10
707 * @arg @ref LL_EXTI_LINE_11
708 * @arg @ref LL_EXTI_LINE_12
709 * @arg @ref LL_EXTI_LINE_13
710 * @arg @ref LL_EXTI_LINE_14
711 * @arg @ref LL_EXTI_LINE_15
712 * @arg @ref LL_EXTI_LINE_16
713 * @arg @ref LL_EXTI_LINE_18
714 * @arg @ref LL_EXTI_LINE_19
715 * @arg @ref LL_EXTI_LINE_20
716 * @arg @ref LL_EXTI_LINE_21
717 * @arg @ref LL_EXTI_LINE_22
718 * @note Please check each device line mapping for EXTI Line availability
721 __STATIC_INLINE
void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine
)
723 CLEAR_BIT(EXTI
->FTSR
, ExtiLine
);
728 * @brief Check if falling edge trigger is enabled for Lines in range 0 to 31
729 * @rmtoll FTSR FTx LL_EXTI_IsEnabledFallingTrig_0_31
730 * @param ExtiLine This parameter can be a combination of the following values:
731 * @arg @ref LL_EXTI_LINE_0
732 * @arg @ref LL_EXTI_LINE_1
733 * @arg @ref LL_EXTI_LINE_2
734 * @arg @ref LL_EXTI_LINE_3
735 * @arg @ref LL_EXTI_LINE_4
736 * @arg @ref LL_EXTI_LINE_5
737 * @arg @ref LL_EXTI_LINE_6
738 * @arg @ref LL_EXTI_LINE_7
739 * @arg @ref LL_EXTI_LINE_8
740 * @arg @ref LL_EXTI_LINE_9
741 * @arg @ref LL_EXTI_LINE_10
742 * @arg @ref LL_EXTI_LINE_11
743 * @arg @ref LL_EXTI_LINE_12
744 * @arg @ref LL_EXTI_LINE_13
745 * @arg @ref LL_EXTI_LINE_14
746 * @arg @ref LL_EXTI_LINE_15
747 * @arg @ref LL_EXTI_LINE_16
748 * @arg @ref LL_EXTI_LINE_18
749 * @arg @ref LL_EXTI_LINE_19
750 * @arg @ref LL_EXTI_LINE_20
751 * @arg @ref LL_EXTI_LINE_21
752 * @arg @ref LL_EXTI_LINE_22
753 * @note Please check each device line mapping for EXTI Line availability
754 * @retval State of bit (1 or 0).
756 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine
)
758 return (READ_BIT(EXTI
->FTSR
, ExtiLine
) == (ExtiLine
));
766 /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
771 * @brief Generate a software Interrupt Event for Lines in range 0 to 31
772 * @note If the interrupt is enabled on this line in the EXTI_IMR, writing a 1 to
773 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR
774 * resulting in an interrupt request generation.
775 * This bit is cleared by clearing the corresponding bit in the EXTI_PR
776 * register (by writing a 1 into the bit)
777 * @rmtoll SWIER SWIx LL_EXTI_GenerateSWI_0_31
778 * @param ExtiLine This parameter can be a combination 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_18
797 * @arg @ref LL_EXTI_LINE_19
798 * @arg @ref LL_EXTI_LINE_20
799 * @arg @ref LL_EXTI_LINE_21
800 * @arg @ref LL_EXTI_LINE_22
801 * @note Please check each device line mapping for EXTI Line availability
804 __STATIC_INLINE
void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine
)
806 SET_BIT(EXTI
->SWIER
, ExtiLine
);
814 /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
819 * @brief Check if the ExtLine Flag is set or not for Lines in range 0 to 31
820 * @note This bit is set when the selected edge event arrives on the interrupt
821 * line. This bit is cleared by writing a 1 to the bit.
822 * @rmtoll PR PIFx LL_EXTI_IsActiveFlag_0_31
823 * @param ExtiLine This parameter can be a combination of the following values:
824 * @arg @ref LL_EXTI_LINE_0
825 * @arg @ref LL_EXTI_LINE_1
826 * @arg @ref LL_EXTI_LINE_2
827 * @arg @ref LL_EXTI_LINE_3
828 * @arg @ref LL_EXTI_LINE_4
829 * @arg @ref LL_EXTI_LINE_5
830 * @arg @ref LL_EXTI_LINE_6
831 * @arg @ref LL_EXTI_LINE_7
832 * @arg @ref LL_EXTI_LINE_8
833 * @arg @ref LL_EXTI_LINE_9
834 * @arg @ref LL_EXTI_LINE_10
835 * @arg @ref LL_EXTI_LINE_11
836 * @arg @ref LL_EXTI_LINE_12
837 * @arg @ref LL_EXTI_LINE_13
838 * @arg @ref LL_EXTI_LINE_14
839 * @arg @ref LL_EXTI_LINE_15
840 * @arg @ref LL_EXTI_LINE_16
841 * @arg @ref LL_EXTI_LINE_18
842 * @arg @ref LL_EXTI_LINE_19
843 * @arg @ref LL_EXTI_LINE_20
844 * @arg @ref LL_EXTI_LINE_21
845 * @arg @ref LL_EXTI_LINE_22
846 * @note Please check each device line mapping for EXTI Line availability
847 * @retval State of bit (1 or 0).
849 __STATIC_INLINE
uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine
)
851 return (READ_BIT(EXTI
->PR
, ExtiLine
) == (ExtiLine
));
856 * @brief Read ExtLine Combination Flag for Lines in range 0 to 31
857 * @note This bit is set when the selected edge event arrives on the interrupt
858 * line. This bit is cleared by writing a 1 to the bit.
859 * @rmtoll PR PIFx LL_EXTI_ReadFlag_0_31
860 * @param ExtiLine This parameter can be a combination of the following values:
861 * @arg @ref LL_EXTI_LINE_0
862 * @arg @ref LL_EXTI_LINE_1
863 * @arg @ref LL_EXTI_LINE_2
864 * @arg @ref LL_EXTI_LINE_3
865 * @arg @ref LL_EXTI_LINE_4
866 * @arg @ref LL_EXTI_LINE_5
867 * @arg @ref LL_EXTI_LINE_6
868 * @arg @ref LL_EXTI_LINE_7
869 * @arg @ref LL_EXTI_LINE_8
870 * @arg @ref LL_EXTI_LINE_9
871 * @arg @ref LL_EXTI_LINE_10
872 * @arg @ref LL_EXTI_LINE_11
873 * @arg @ref LL_EXTI_LINE_12
874 * @arg @ref LL_EXTI_LINE_13
875 * @arg @ref LL_EXTI_LINE_14
876 * @arg @ref LL_EXTI_LINE_15
877 * @arg @ref LL_EXTI_LINE_16
878 * @arg @ref LL_EXTI_LINE_18
879 * @arg @ref LL_EXTI_LINE_19
880 * @arg @ref LL_EXTI_LINE_20
881 * @arg @ref LL_EXTI_LINE_21
882 * @arg @ref LL_EXTI_LINE_22
883 * @note Please check each device line mapping for EXTI Line availability
884 * @retval @note This bit is set when the selected edge event arrives on the interrupt
886 __STATIC_INLINE
uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine
)
888 return (uint32_t)(READ_BIT(EXTI
->PR
, ExtiLine
));
893 * @brief Clear ExtLine Flags for Lines in range 0 to 31
894 * @note This bit is set when the selected edge event arrives on the interrupt
895 * line. This bit is cleared by writing a 1 to the bit.
896 * @rmtoll PR PIFx LL_EXTI_ClearFlag_0_31
897 * @param ExtiLine This parameter can be a combination of the following values:
898 * @arg @ref LL_EXTI_LINE_0
899 * @arg @ref LL_EXTI_LINE_1
900 * @arg @ref LL_EXTI_LINE_2
901 * @arg @ref LL_EXTI_LINE_3
902 * @arg @ref LL_EXTI_LINE_4
903 * @arg @ref LL_EXTI_LINE_5
904 * @arg @ref LL_EXTI_LINE_6
905 * @arg @ref LL_EXTI_LINE_7
906 * @arg @ref LL_EXTI_LINE_8
907 * @arg @ref LL_EXTI_LINE_9
908 * @arg @ref LL_EXTI_LINE_10
909 * @arg @ref LL_EXTI_LINE_11
910 * @arg @ref LL_EXTI_LINE_12
911 * @arg @ref LL_EXTI_LINE_13
912 * @arg @ref LL_EXTI_LINE_14
913 * @arg @ref LL_EXTI_LINE_15
914 * @arg @ref LL_EXTI_LINE_16
915 * @arg @ref LL_EXTI_LINE_18
916 * @arg @ref LL_EXTI_LINE_19
917 * @arg @ref LL_EXTI_LINE_20
918 * @arg @ref LL_EXTI_LINE_21
919 * @arg @ref LL_EXTI_LINE_22
920 * @note Please check each device line mapping for EXTI Line availability
923 __STATIC_INLINE
void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine
)
925 WRITE_REG(EXTI
->PR
, ExtiLine
);
933 #if defined(USE_FULL_LL_DRIVER)
934 /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
938 uint32_t LL_EXTI_Init(LL_EXTI_InitTypeDef
*EXTI_InitStruct
);
939 uint32_t LL_EXTI_DeInit(void);
940 void LL_EXTI_StructInit(LL_EXTI_InitTypeDef
*EXTI_InitStruct
);
946 #endif /* USE_FULL_LL_DRIVER */
966 #endif /* __STM32F7xx_LL_EXTI_H */
968 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/