2 ******************************************************************************
3 * @file stm32f3xx_ll_exti.h
4 * @author MCD Application Team
5 * @brief Header file of EXTI LL module.
6 ******************************************************************************
9 * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
11 * Redistribution and use in source and binary forms, with or without modification,
12 * are permitted provided that the following conditions are met:
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 ******************************************************************************
36 /* Define to prevent recursive inclusion -------------------------------------*/
37 #ifndef __STM32F3xx_LL_EXTI_H
38 #define __STM32F3xx_LL_EXTI_H
44 /* Includes ------------------------------------------------------------------*/
45 #include "stm32f3xx.h"
47 /** @addtogroup STM32F3xx_LL_Driver
53 /** @defgroup EXTI_LL EXTI
57 /* Private types -------------------------------------------------------------*/
58 /* Private variables ---------------------------------------------------------*/
59 /* Private constants ---------------------------------------------------------*/
60 /* Private Macros ------------------------------------------------------------*/
61 #if defined(USE_FULL_LL_DRIVER)
62 /** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
68 #endif /*USE_FULL_LL_DRIVER*/
69 /* Exported types ------------------------------------------------------------*/
70 #if defined(USE_FULL_LL_DRIVER)
71 /** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
77 uint32_t Line_0_31
; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31
78 This parameter can be any combination of @ref EXTI_LL_EC_LINE */
79 #if defined(EXTI_32_63_SUPPORT)
81 uint32_t Line_32_63
; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 32 to 63
82 This parameter can be any combination of @ref EXTI_LL_EC_LINE */
85 FunctionalState LineCommand
; /*!< Specifies the new state of the selected EXTI lines.
86 This parameter can be set either to ENABLE or DISABLE */
88 uint8_t Mode
; /*!< Specifies the mode for the EXTI lines.
89 This parameter can be a value of @ref EXTI_LL_EC_MODE. */
91 uint8_t Trigger
; /*!< Specifies the trigger signal active edge for the EXTI lines.
92 This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
93 } LL_EXTI_InitTypeDef
;
98 #endif /*USE_FULL_LL_DRIVER*/
100 /* Exported constants --------------------------------------------------------*/
101 /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
105 /** @defgroup EXTI_LL_EC_LINE LINE
108 #define LL_EXTI_LINE_0 EXTI_IMR_IM0 /*!< Extended line 0 */
109 #define LL_EXTI_LINE_1 EXTI_IMR_IM1 /*!< Extended line 1 */
110 #define LL_EXTI_LINE_2 EXTI_IMR_IM2 /*!< Extended line 2 */
111 #define LL_EXTI_LINE_3 EXTI_IMR_IM3 /*!< Extended line 3 */
112 #define LL_EXTI_LINE_4 EXTI_IMR_IM4 /*!< Extended line 4 */
113 #define LL_EXTI_LINE_5 EXTI_IMR_IM5 /*!< Extended line 5 */
114 #define LL_EXTI_LINE_6 EXTI_IMR_IM6 /*!< Extended line 6 */
115 #define LL_EXTI_LINE_7 EXTI_IMR_IM7 /*!< Extended line 7 */
116 #define LL_EXTI_LINE_8 EXTI_IMR_IM8 /*!< Extended line 8 */
117 #define LL_EXTI_LINE_9 EXTI_IMR_IM9 /*!< Extended line 9 */
118 #define LL_EXTI_LINE_10 EXTI_IMR_IM10 /*!< Extended line 10 */
119 #define LL_EXTI_LINE_11 EXTI_IMR_IM11 /*!< Extended line 11 */
120 #define LL_EXTI_LINE_12 EXTI_IMR_IM12 /*!< Extended line 12 */
121 #define LL_EXTI_LINE_13 EXTI_IMR_IM13 /*!< Extended line 13 */
122 #define LL_EXTI_LINE_14 EXTI_IMR_IM14 /*!< Extended line 14 */
123 #define LL_EXTI_LINE_15 EXTI_IMR_IM15 /*!< Extended line 15 */
124 #if defined(EXTI_IMR_IM16)
125 #define LL_EXTI_LINE_16 EXTI_IMR_IM16 /*!< Extended line 16 */
127 #define LL_EXTI_LINE_17 EXTI_IMR_IM17 /*!< Extended line 17 */
128 #if defined(EXTI_IMR_IM18)
129 #define LL_EXTI_LINE_18 EXTI_IMR_IM18 /*!< Extended line 18 */
131 #define LL_EXTI_LINE_19 EXTI_IMR_IM19 /*!< Extended line 19 */
132 #if defined(EXTI_IMR_IM20)
133 #define LL_EXTI_LINE_20 EXTI_IMR_IM20 /*!< Extended line 20 */
135 #if defined(EXTI_IMR_IM21)
136 #define LL_EXTI_LINE_21 EXTI_IMR_IM21 /*!< Extended line 21 */
138 #if defined(EXTI_IMR_IM22)
139 #define LL_EXTI_LINE_22 EXTI_IMR_IM22 /*!< Extended line 22 */
141 #define LL_EXTI_LINE_23 EXTI_IMR_IM23 /*!< Extended line 23 */
142 #if defined(EXTI_IMR_IM24)
143 #define LL_EXTI_LINE_24 EXTI_IMR_IM24 /*!< Extended line 24 */
145 #if defined(EXTI_IMR_IM25)
146 #define LL_EXTI_LINE_25 EXTI_IMR_IM25 /*!< Extended line 25 */
148 #if defined(EXTI_IMR_IM26)
149 #define LL_EXTI_LINE_26 EXTI_IMR_IM26 /*!< Extended line 26 */
151 #if defined(EXTI_IMR_IM27)
152 #define LL_EXTI_LINE_27 EXTI_IMR_IM27 /*!< Extended line 27 */
154 #if defined(EXTI_IMR_IM28)
155 #define LL_EXTI_LINE_28 EXTI_IMR_IM28 /*!< Extended line 28 */
157 #if defined(EXTI_IMR_IM29)
158 #define LL_EXTI_LINE_29 EXTI_IMR_IM29 /*!< Extended line 29 */
160 #if defined(EXTI_IMR_IM30)
161 #define LL_EXTI_LINE_30 EXTI_IMR_IM30 /*!< Extended line 30 */
163 #if defined(EXTI_IMR_IM31)
164 #define LL_EXTI_LINE_31 EXTI_IMR_IM31 /*!< Extended line 31 */
166 #define LL_EXTI_LINE_ALL_0_31 EXTI_IMR_IM /*!< All Extended line not reserved*/
168 #if defined(EXTI_32_63_SUPPORT)
169 #define LL_EXTI_LINE_32 EXTI_IMR2_IM32 /*!< Extended line 32 */
170 #if defined(EXTI_IMR2_IM33)
171 #define LL_EXTI_LINE_33 EXTI_IMR2_IM33 /*!< Extended line 33 */
173 #if defined(EXTI_IMR2_IM34)
174 #define LL_EXTI_LINE_34 EXTI_IMR2_IM34 /*!< Extended line 34 */
176 #if defined(EXTI_IMR2_IM35)
177 #define LL_EXTI_LINE_35 EXTI_IMR2_IM35 /*!< Extended line 35 */
179 #if defined(EXTI_IMR2_IM36)
180 #define LL_EXTI_LINE_36 EXTI_IMR2_IM36 /*!< Extended line 36 */
182 #if defined(EXTI_IMR2_IM37)
183 #define LL_EXTI_LINE_37 EXTI_IMR2_IM37 /*!< Extended line 37 */
185 #if defined(EXTI_IMR2_IM38)
186 #define LL_EXTI_LINE_38 EXTI_IMR2_IM38 /*!< Extended line 38 */
188 #if defined(EXTI_IMR2_IM39)
189 #define LL_EXTI_LINE_39 EXTI_IMR2_IM39 /*!< Extended line 39 */
191 #if defined(EXTI_IMR2_IM40)
192 #define LL_EXTI_LINE_40 EXTI_IMR2_IM40 /*!< Extended line 40 */
194 #define LL_EXTI_LINE_ALL_32_63 EXTI_IMR2_IM /*!< All Extended line not reserved*/
198 #define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
200 #if defined(USE_FULL_LL_DRIVER)
201 #define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */
202 #endif /*USE_FULL_LL_DRIVER*/
207 #if defined(USE_FULL_LL_DRIVER)
209 /** @defgroup EXTI_LL_EC_MODE Mode
212 #define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */
213 #define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */
214 #define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
219 /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
222 #define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */
223 #define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */
224 #define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */
225 #define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
232 #endif /*USE_FULL_LL_DRIVER*/
239 /* Exported macro ------------------------------------------------------------*/
240 /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
244 /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
249 * @brief Write a value in EXTI register
250 * @param __REG__ Register to be written
251 * @param __VALUE__ Value to be written in the register
254 #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
257 * @brief Read a value in EXTI register
258 * @param __REG__ Register to be read
259 * @retval Register value
261 #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
273 /* Exported functions --------------------------------------------------------*/
274 /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
277 /** @defgroup EXTI_LL_EF_IT_Management IT_Management
282 * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31
283 * @note The reset value for the direct or internal lines (see RM)
284 * is set to 1 in order to enable the interrupt by default.
285 * Bits are set automatically at Power on.
286 * @rmtoll IMR IMx LL_EXTI_EnableIT_0_31
287 * @param ExtiLine This parameter can be one of the following values:
288 * @arg @ref LL_EXTI_LINE_0
289 * @arg @ref LL_EXTI_LINE_1
290 * @arg @ref LL_EXTI_LINE_2
291 * @arg @ref LL_EXTI_LINE_3
292 * @arg @ref LL_EXTI_LINE_4
293 * @arg @ref LL_EXTI_LINE_5
294 * @arg @ref LL_EXTI_LINE_6
295 * @arg @ref LL_EXTI_LINE_7
296 * @arg @ref LL_EXTI_LINE_8
297 * @arg @ref LL_EXTI_LINE_9
298 * @arg @ref LL_EXTI_LINE_10
299 * @arg @ref LL_EXTI_LINE_11
300 * @arg @ref LL_EXTI_LINE_12
301 * @arg @ref LL_EXTI_LINE_13
302 * @arg @ref LL_EXTI_LINE_14
303 * @arg @ref LL_EXTI_LINE_15
304 * @arg @ref LL_EXTI_LINE_16
305 * @arg @ref LL_EXTI_LINE_17
306 * @arg @ref LL_EXTI_LINE_18
307 * @arg @ref LL_EXTI_LINE_19
308 * @arg @ref LL_EXTI_LINE_20
309 * @arg @ref LL_EXTI_LINE_21
310 * @arg @ref LL_EXTI_LINE_22
311 * @arg @ref LL_EXTI_LINE_23
312 * @arg @ref LL_EXTI_LINE_24
313 * @arg @ref LL_EXTI_LINE_25
314 * @arg @ref LL_EXTI_LINE_26
315 * @arg @ref LL_EXTI_LINE_27
316 * @arg @ref LL_EXTI_LINE_28
317 * @arg @ref LL_EXTI_LINE_29
318 * @arg @ref LL_EXTI_LINE_30
319 * @arg @ref LL_EXTI_LINE_31
320 * @arg @ref LL_EXTI_LINE_ALL_0_31
321 * @note Please check each device line mapping for EXTI Line availability
324 __STATIC_INLINE
void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine
)
326 SET_BIT(EXTI
->IMR
, ExtiLine
);
328 #if defined(EXTI_32_63_SUPPORT)
330 * @brief Enable ExtiLine Interrupt request for Lines in range 32 to 63
331 * @note The reset value for the direct lines (lines from 32 to 34, line
332 * 39) is set to 1 in order to enable the interrupt by default.
333 * Bits are set automatically at Power on.
334 * @rmtoll IMR2 IMx LL_EXTI_EnableIT_32_63
335 * @param ExtiLine This parameter can be one of the following values:
336 * @arg @ref LL_EXTI_LINE_32
337 * @arg @ref LL_EXTI_LINE_33
338 * @arg @ref LL_EXTI_LINE_34
339 * @arg @ref LL_EXTI_LINE_35
340 * @arg @ref LL_EXTI_LINE_36
341 * @arg @ref LL_EXTI_LINE_37
342 * @arg @ref LL_EXTI_LINE_38
343 * @arg @ref LL_EXTI_LINE_39
344 * @arg @ref LL_EXTI_LINE_ALL_32_63
347 __STATIC_INLINE
void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine
)
349 SET_BIT(EXTI
->IMR2
, ExtiLine
);
354 * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31
355 * @note The reset value for the direct or internal lines (see RM)
356 * is set to 1 in order to enable the interrupt by default.
357 * Bits are set automatically at Power on.
358 * @rmtoll IMR IMx LL_EXTI_DisableIT_0_31
359 * @param ExtiLine This parameter can be one of the following values:
360 * @arg @ref LL_EXTI_LINE_0
361 * @arg @ref LL_EXTI_LINE_1
362 * @arg @ref LL_EXTI_LINE_2
363 * @arg @ref LL_EXTI_LINE_3
364 * @arg @ref LL_EXTI_LINE_4
365 * @arg @ref LL_EXTI_LINE_5
366 * @arg @ref LL_EXTI_LINE_6
367 * @arg @ref LL_EXTI_LINE_7
368 * @arg @ref LL_EXTI_LINE_8
369 * @arg @ref LL_EXTI_LINE_9
370 * @arg @ref LL_EXTI_LINE_10
371 * @arg @ref LL_EXTI_LINE_11
372 * @arg @ref LL_EXTI_LINE_12
373 * @arg @ref LL_EXTI_LINE_13
374 * @arg @ref LL_EXTI_LINE_14
375 * @arg @ref LL_EXTI_LINE_15
376 * @arg @ref LL_EXTI_LINE_16
377 * @arg @ref LL_EXTI_LINE_17
378 * @arg @ref LL_EXTI_LINE_18
379 * @arg @ref LL_EXTI_LINE_19
380 * @arg @ref LL_EXTI_LINE_20
381 * @arg @ref LL_EXTI_LINE_21
382 * @arg @ref LL_EXTI_LINE_22
383 * @arg @ref LL_EXTI_LINE_23
384 * @arg @ref LL_EXTI_LINE_24
385 * @arg @ref LL_EXTI_LINE_25
386 * @arg @ref LL_EXTI_LINE_26
387 * @arg @ref LL_EXTI_LINE_27
388 * @arg @ref LL_EXTI_LINE_28
389 * @arg @ref LL_EXTI_LINE_29
390 * @arg @ref LL_EXTI_LINE_30
391 * @arg @ref LL_EXTI_LINE_31
392 * @arg @ref LL_EXTI_LINE_ALL_0_31
393 * @note Please check each device line mapping for EXTI Line availability
396 __STATIC_INLINE
void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine
)
398 CLEAR_BIT(EXTI
->IMR
, ExtiLine
);
401 #if defined(EXTI_32_63_SUPPORT)
403 * @brief Disable ExtiLine Interrupt request for Lines in range 32 to 63
404 * @note The reset value for the direct lines (lines from 32 to 34, line
405 * 39) is set to 1 in order to enable the interrupt by default.
406 * Bits are set automatically at Power on.
407 * @rmtoll IMR2 IMx LL_EXTI_DisableIT_32_63
408 * @param ExtiLine This parameter can be one of the following values:
409 * @arg @ref LL_EXTI_LINE_32
410 * @arg @ref LL_EXTI_LINE_33
411 * @arg @ref LL_EXTI_LINE_34
412 * @arg @ref LL_EXTI_LINE_35
413 * @arg @ref LL_EXTI_LINE_36
414 * @arg @ref LL_EXTI_LINE_37
415 * @arg @ref LL_EXTI_LINE_38
416 * @arg @ref LL_EXTI_LINE_39
417 * @arg @ref LL_EXTI_LINE_ALL_32_63
420 __STATIC_INLINE
void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine
)
422 CLEAR_BIT(EXTI
->IMR2
, ExtiLine
);
427 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
428 * @note The reset value for the direct or internal lines (see RM)
429 * is set to 1 in order to enable the interrupt by default.
430 * Bits are set automatically at Power on.
431 * @rmtoll IMR IMx LL_EXTI_IsEnabledIT_0_31
432 * @param ExtiLine This parameter can be one of the following values:
433 * @arg @ref LL_EXTI_LINE_0
434 * @arg @ref LL_EXTI_LINE_1
435 * @arg @ref LL_EXTI_LINE_2
436 * @arg @ref LL_EXTI_LINE_3
437 * @arg @ref LL_EXTI_LINE_4
438 * @arg @ref LL_EXTI_LINE_5
439 * @arg @ref LL_EXTI_LINE_6
440 * @arg @ref LL_EXTI_LINE_7
441 * @arg @ref LL_EXTI_LINE_8
442 * @arg @ref LL_EXTI_LINE_9
443 * @arg @ref LL_EXTI_LINE_10
444 * @arg @ref LL_EXTI_LINE_11
445 * @arg @ref LL_EXTI_LINE_12
446 * @arg @ref LL_EXTI_LINE_13
447 * @arg @ref LL_EXTI_LINE_14
448 * @arg @ref LL_EXTI_LINE_15
449 * @arg @ref LL_EXTI_LINE_16
450 * @arg @ref LL_EXTI_LINE_17
451 * @arg @ref LL_EXTI_LINE_18
452 * @arg @ref LL_EXTI_LINE_19
453 * @arg @ref LL_EXTI_LINE_20
454 * @arg @ref LL_EXTI_LINE_21
455 * @arg @ref LL_EXTI_LINE_22
456 * @arg @ref LL_EXTI_LINE_23
457 * @arg @ref LL_EXTI_LINE_24
458 * @arg @ref LL_EXTI_LINE_25
459 * @arg @ref LL_EXTI_LINE_26
460 * @arg @ref LL_EXTI_LINE_27
461 * @arg @ref LL_EXTI_LINE_28
462 * @arg @ref LL_EXTI_LINE_29
463 * @arg @ref LL_EXTI_LINE_30
464 * @arg @ref LL_EXTI_LINE_31
465 * @arg @ref LL_EXTI_LINE_ALL_0_31
466 * @note Please check each device line mapping for EXTI Line availability
467 * @retval State of bit (1 or 0).
469 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine
)
471 return (READ_BIT(EXTI
->IMR
, ExtiLine
) == (ExtiLine
));
474 #if defined(EXTI_32_63_SUPPORT)
476 * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63
477 * @note The reset value for the direct lines (lines from 32 to 34, line
478 * 39) is set to 1 in order to enable the interrupt by default.
479 * Bits are set automatically at Power on.
480 * @rmtoll IMR2 IMx LL_EXTI_IsEnabledIT_32_63
481 * @param ExtiLine This parameter can be one of the following values:
482 * @arg @ref LL_EXTI_LINE_32
483 * @arg @ref LL_EXTI_LINE_33
484 * @arg @ref LL_EXTI_LINE_34
485 * @arg @ref LL_EXTI_LINE_35
486 * @arg @ref LL_EXTI_LINE_36
487 * @arg @ref LL_EXTI_LINE_37
488 * @arg @ref LL_EXTI_LINE_38
489 * @arg @ref LL_EXTI_LINE_39
490 * @arg @ref LL_EXTI_LINE_ALL_32_63
491 * @retval State of bit (1 or 0).
493 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine
)
495 return (READ_BIT(EXTI
->IMR2
, ExtiLine
) == (ExtiLine
));
503 /** @defgroup EXTI_LL_EF_Event_Management Event_Management
508 * @brief Enable ExtiLine Event request for Lines in range 0 to 31
509 * @rmtoll EMR EMx LL_EXTI_EnableEvent_0_31
510 * @param ExtiLine This parameter can be one of the following values:
511 * @arg @ref LL_EXTI_LINE_0
512 * @arg @ref LL_EXTI_LINE_1
513 * @arg @ref LL_EXTI_LINE_2
514 * @arg @ref LL_EXTI_LINE_3
515 * @arg @ref LL_EXTI_LINE_4
516 * @arg @ref LL_EXTI_LINE_5
517 * @arg @ref LL_EXTI_LINE_6
518 * @arg @ref LL_EXTI_LINE_7
519 * @arg @ref LL_EXTI_LINE_8
520 * @arg @ref LL_EXTI_LINE_9
521 * @arg @ref LL_EXTI_LINE_10
522 * @arg @ref LL_EXTI_LINE_11
523 * @arg @ref LL_EXTI_LINE_12
524 * @arg @ref LL_EXTI_LINE_13
525 * @arg @ref LL_EXTI_LINE_14
526 * @arg @ref LL_EXTI_LINE_15
527 * @arg @ref LL_EXTI_LINE_16
528 * @arg @ref LL_EXTI_LINE_17
529 * @arg @ref LL_EXTI_LINE_18
530 * @arg @ref LL_EXTI_LINE_19
531 * @arg @ref LL_EXTI_LINE_20
532 * @arg @ref LL_EXTI_LINE_21
533 * @arg @ref LL_EXTI_LINE_22
534 * @arg @ref LL_EXTI_LINE_23
535 * @arg @ref LL_EXTI_LINE_24
536 * @arg @ref LL_EXTI_LINE_25
537 * @arg @ref LL_EXTI_LINE_26
538 * @arg @ref LL_EXTI_LINE_27
539 * @arg @ref LL_EXTI_LINE_28
540 * @arg @ref LL_EXTI_LINE_29
541 * @arg @ref LL_EXTI_LINE_30
542 * @arg @ref LL_EXTI_LINE_31
543 * @arg @ref LL_EXTI_LINE_ALL_0_31
544 * @note Please check each device line mapping for EXTI Line availability
547 __STATIC_INLINE
void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine
)
549 SET_BIT(EXTI
->EMR
, ExtiLine
);
553 #if defined(EXTI_32_63_SUPPORT)
555 * @brief Enable ExtiLine Event request for Lines in range 32 to 63
556 * @rmtoll EMR2 EMx LL_EXTI_EnableEvent_32_63
557 * @param ExtiLine This parameter can be a combination of the following values:
558 * @arg @ref LL_EXTI_LINE_32
559 * @arg @ref LL_EXTI_LINE_33
560 * @arg @ref LL_EXTI_LINE_34
561 * @arg @ref LL_EXTI_LINE_35
562 * @arg @ref LL_EXTI_LINE_36
563 * @arg @ref LL_EXTI_LINE_37
564 * @arg @ref LL_EXTI_LINE_38
565 * @arg @ref LL_EXTI_LINE_39
566 * @arg @ref LL_EXTI_LINE_ALL_32_63
569 __STATIC_INLINE
void LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine
)
571 SET_BIT(EXTI
->EMR2
, ExtiLine
);
576 * @brief Disable ExtiLine Event request for Lines in range 0 to 31
577 * @rmtoll EMR 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 Please check each device line mapping for EXTI Line availability
615 __STATIC_INLINE
void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine
)
617 CLEAR_BIT(EXTI
->EMR
, ExtiLine
);
620 #if defined(EXTI_32_63_SUPPORT)
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_ALL_32_63
636 __STATIC_INLINE
void LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine
)
638 CLEAR_BIT(EXTI
->EMR2
, ExtiLine
);
643 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
644 * @rmtoll EMR EMx LL_EXTI_IsEnabledEvent_0_31
645 * @param ExtiLine This parameter can be one of the following values:
646 * @arg @ref LL_EXTI_LINE_0
647 * @arg @ref LL_EXTI_LINE_1
648 * @arg @ref LL_EXTI_LINE_2
649 * @arg @ref LL_EXTI_LINE_3
650 * @arg @ref LL_EXTI_LINE_4
651 * @arg @ref LL_EXTI_LINE_5
652 * @arg @ref LL_EXTI_LINE_6
653 * @arg @ref LL_EXTI_LINE_7
654 * @arg @ref LL_EXTI_LINE_8
655 * @arg @ref LL_EXTI_LINE_9
656 * @arg @ref LL_EXTI_LINE_10
657 * @arg @ref LL_EXTI_LINE_11
658 * @arg @ref LL_EXTI_LINE_12
659 * @arg @ref LL_EXTI_LINE_13
660 * @arg @ref LL_EXTI_LINE_14
661 * @arg @ref LL_EXTI_LINE_15
662 * @arg @ref LL_EXTI_LINE_16
663 * @arg @ref LL_EXTI_LINE_17
664 * @arg @ref LL_EXTI_LINE_18
665 * @arg @ref LL_EXTI_LINE_19
666 * @arg @ref LL_EXTI_LINE_20
667 * @arg @ref LL_EXTI_LINE_21
668 * @arg @ref LL_EXTI_LINE_22
669 * @arg @ref LL_EXTI_LINE_23
670 * @arg @ref LL_EXTI_LINE_24
671 * @arg @ref LL_EXTI_LINE_25
672 * @arg @ref LL_EXTI_LINE_26
673 * @arg @ref LL_EXTI_LINE_27
674 * @arg @ref LL_EXTI_LINE_28
675 * @arg @ref LL_EXTI_LINE_29
676 * @arg @ref LL_EXTI_LINE_30
677 * @arg @ref LL_EXTI_LINE_31
678 * @arg @ref LL_EXTI_LINE_ALL_0_31
679 * @note Please check each device line mapping for EXTI Line availability
680 * @retval State of bit (1 or 0).
682 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine
)
684 return (READ_BIT(EXTI
->EMR
, ExtiLine
) == (ExtiLine
));
688 #if defined(EXTI_32_63_SUPPORT)
690 * @brief Indicate if ExtiLine Event request is enabled for Lines in range 32 to 63
691 * @rmtoll EMR2 EMx LL_EXTI_IsEnabledEvent_32_63
692 * @param ExtiLine This parameter can be a combination of the following values:
693 * @arg @ref LL_EXTI_LINE_32
694 * @arg @ref LL_EXTI_LINE_33
695 * @arg @ref LL_EXTI_LINE_34
696 * @arg @ref LL_EXTI_LINE_35
697 * @arg @ref LL_EXTI_LINE_36
698 * @arg @ref LL_EXTI_LINE_37
699 * @arg @ref LL_EXTI_LINE_38
700 * @arg @ref LL_EXTI_LINE_39
701 * @arg @ref LL_EXTI_LINE_ALL_32_63
702 * @retval State of bit (1 or 0).
704 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine
)
706 return (READ_BIT(EXTI
->EMR2
, ExtiLine
) == (ExtiLine
));
714 /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
719 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
720 * @note The configurable wakeup lines are edge-triggered. No glitch must be
721 * generated on these lines. If a rising edge on a configurable interrupt
722 * line occurs during a write operation in the EXTI_RTSR register, the
723 * pending bit is not set.
724 * Rising and falling edge triggers can be set for
725 * the same interrupt line. In this case, both generate a trigger
727 * @rmtoll RTSR RTx LL_EXTI_EnableRisingTrig_0_31
728 * @param ExtiLine This parameter can be a combination of the following values:
729 * @arg @ref LL_EXTI_LINE_0
730 * @arg @ref LL_EXTI_LINE_1
731 * @arg @ref LL_EXTI_LINE_2
732 * @arg @ref LL_EXTI_LINE_3
733 * @arg @ref LL_EXTI_LINE_4
734 * @arg @ref LL_EXTI_LINE_5
735 * @arg @ref LL_EXTI_LINE_6
736 * @arg @ref LL_EXTI_LINE_7
737 * @arg @ref LL_EXTI_LINE_8
738 * @arg @ref LL_EXTI_LINE_9
739 * @arg @ref LL_EXTI_LINE_10
740 * @arg @ref LL_EXTI_LINE_11
741 * @arg @ref LL_EXTI_LINE_12
742 * @arg @ref LL_EXTI_LINE_13
743 * @arg @ref LL_EXTI_LINE_14
744 * @arg @ref LL_EXTI_LINE_15
745 * @arg @ref LL_EXTI_LINE_16
746 * @arg @ref LL_EXTI_LINE_18
747 * @arg @ref LL_EXTI_LINE_19
748 * @arg @ref LL_EXTI_LINE_20
749 * @arg @ref LL_EXTI_LINE_21
750 * @arg @ref LL_EXTI_LINE_22
751 * @arg @ref LL_EXTI_LINE_29
752 * @arg @ref LL_EXTI_LINE_30
753 * @arg @ref LL_EXTI_LINE_31
754 * @note Please check each device line mapping for EXTI Line availability
757 __STATIC_INLINE
void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine
)
759 SET_BIT(EXTI
->RTSR
, ExtiLine
);
763 #if defined(EXTI_32_63_SUPPORT)
765 * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
766 * @note The configurable wakeup lines are edge-triggered. No glitch must be
767 * generated on these lines. If a rising edge on a configurable interrupt
768 * line occurs during a write operation in the EXTI_RTSR register, the
769 * pending bit is not set.Rising and falling edge triggers can be set for
770 * the same interrupt line. In this case, both generate a trigger
772 * @rmtoll RTSR2 RTx LL_EXTI_EnableRisingTrig_32_63
773 * @param ExtiLine This parameter can be a combination of the following values:
774 * @arg @ref LL_EXTI_LINE_35
775 * @arg @ref LL_EXTI_LINE_36
776 * @arg @ref LL_EXTI_LINE_37
777 * @arg @ref LL_EXTI_LINE_38
780 __STATIC_INLINE
void LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine
)
782 SET_BIT(EXTI
->RTSR2
, ExtiLine
);
787 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
788 * @note The configurable wakeup lines are edge-triggered. No glitch must be
789 * generated on these lines. If a rising edge on a configurable interrupt
790 * line occurs during a write operation in the EXTI_RTSR register, the
791 * pending bit is not set.
792 * Rising and falling edge triggers can be set for
793 * the same interrupt line. In this case, both generate a trigger
795 * @rmtoll RTSR RTx LL_EXTI_DisableRisingTrig_0_31
796 * @param ExtiLine This parameter can be a combination of the following values:
797 * @arg @ref LL_EXTI_LINE_0
798 * @arg @ref LL_EXTI_LINE_1
799 * @arg @ref LL_EXTI_LINE_2
800 * @arg @ref LL_EXTI_LINE_3
801 * @arg @ref LL_EXTI_LINE_4
802 * @arg @ref LL_EXTI_LINE_5
803 * @arg @ref LL_EXTI_LINE_6
804 * @arg @ref LL_EXTI_LINE_7
805 * @arg @ref LL_EXTI_LINE_8
806 * @arg @ref LL_EXTI_LINE_9
807 * @arg @ref LL_EXTI_LINE_10
808 * @arg @ref LL_EXTI_LINE_11
809 * @arg @ref LL_EXTI_LINE_12
810 * @arg @ref LL_EXTI_LINE_13
811 * @arg @ref LL_EXTI_LINE_14
812 * @arg @ref LL_EXTI_LINE_15
813 * @arg @ref LL_EXTI_LINE_16
814 * @arg @ref LL_EXTI_LINE_18
815 * @arg @ref LL_EXTI_LINE_19
816 * @arg @ref LL_EXTI_LINE_20
817 * @arg @ref LL_EXTI_LINE_21
818 * @arg @ref LL_EXTI_LINE_22
819 * @arg @ref LL_EXTI_LINE_29
820 * @arg @ref LL_EXTI_LINE_30
821 * @arg @ref LL_EXTI_LINE_31
822 * @note Please check each device line mapping for EXTI Line availability
825 __STATIC_INLINE
void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine
)
827 CLEAR_BIT(EXTI
->RTSR
, ExtiLine
);
831 #if defined(EXTI_32_63_SUPPORT)
833 * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 32 to 63
834 * @note The configurable wakeup lines are edge-triggered. No glitch must be
835 * generated on these lines. If a rising edge on a configurable interrupt
836 * line occurs during a write operation in the EXTI_RTSR register, the
837 * pending bit is not set.
838 * Rising and falling edge triggers can be set for
839 * the same interrupt line. In this case, both generate a trigger
841 * @rmtoll RTSR2 RTx LL_EXTI_DisableRisingTrig_32_63
842 * @param ExtiLine This parameter can be a combination of the following values:
843 * @arg @ref LL_EXTI_LINE_35
844 * @arg @ref LL_EXTI_LINE_36
845 * @arg @ref LL_EXTI_LINE_37
846 * @arg @ref LL_EXTI_LINE_38
849 __STATIC_INLINE
void LL_EXTI_DisableRisingTrig_32_63(uint32_t ExtiLine
)
851 CLEAR_BIT(EXTI
->RTSR2
, ExtiLine
);
856 * @brief Check if rising edge trigger is enabled for Lines in range 0 to 31
857 * @rmtoll RTSR RTx LL_EXTI_IsEnabledRisingTrig_0_31
858 * @param ExtiLine This parameter can be a combination of the following values:
859 * @arg @ref LL_EXTI_LINE_0
860 * @arg @ref LL_EXTI_LINE_1
861 * @arg @ref LL_EXTI_LINE_2
862 * @arg @ref LL_EXTI_LINE_3
863 * @arg @ref LL_EXTI_LINE_4
864 * @arg @ref LL_EXTI_LINE_5
865 * @arg @ref LL_EXTI_LINE_6
866 * @arg @ref LL_EXTI_LINE_7
867 * @arg @ref LL_EXTI_LINE_8
868 * @arg @ref LL_EXTI_LINE_9
869 * @arg @ref LL_EXTI_LINE_10
870 * @arg @ref LL_EXTI_LINE_11
871 * @arg @ref LL_EXTI_LINE_12
872 * @arg @ref LL_EXTI_LINE_13
873 * @arg @ref LL_EXTI_LINE_14
874 * @arg @ref LL_EXTI_LINE_15
875 * @arg @ref LL_EXTI_LINE_16
876 * @arg @ref LL_EXTI_LINE_18
877 * @arg @ref LL_EXTI_LINE_19
878 * @arg @ref LL_EXTI_LINE_20
879 * @arg @ref LL_EXTI_LINE_21
880 * @arg @ref LL_EXTI_LINE_22
881 * @arg @ref LL_EXTI_LINE_29
882 * @arg @ref LL_EXTI_LINE_30
883 * @arg @ref LL_EXTI_LINE_31
884 * @note Please check each device line mapping for EXTI Line availability
885 * @retval State of bit (1 or 0).
887 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine
)
889 return (READ_BIT(EXTI
->RTSR
, ExtiLine
) == (ExtiLine
));
892 #if defined(EXTI_32_63_SUPPORT)
894 * @brief Check if rising edge trigger is enabled for Lines in range 32 to 63
895 * @rmtoll RTSR2 RTx LL_EXTI_IsEnabledRisingTrig_32_63
896 * @param ExtiLine This parameter can be a combination of the following values:
897 * @arg @ref LL_EXTI_LINE_35
898 * @arg @ref LL_EXTI_LINE_36
899 * @arg @ref LL_EXTI_LINE_37
900 * @arg @ref LL_EXTI_LINE_38
901 * @retval State of bit (1 or 0).
903 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledRisingTrig_32_63(uint32_t ExtiLine
)
905 return (READ_BIT(EXTI
->RTSR2
, ExtiLine
) == (ExtiLine
));
913 /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
918 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
919 * @note The configurable wakeup lines are edge-triggered. No glitch must be
920 * generated on these lines. If a falling edge on a configurable interrupt
921 * line occurs during a write operation in the EXTI_FTSR register, the
922 * pending bit is not set.
923 * Rising and falling edge triggers can be set for
924 * the same interrupt line. In this case, both generate a trigger
926 * @rmtoll FTSR FTx LL_EXTI_EnableFallingTrig_0_31
927 * @param ExtiLine This parameter can be a combination of the following values:
928 * @arg @ref LL_EXTI_LINE_0
929 * @arg @ref LL_EXTI_LINE_1
930 * @arg @ref LL_EXTI_LINE_2
931 * @arg @ref LL_EXTI_LINE_3
932 * @arg @ref LL_EXTI_LINE_4
933 * @arg @ref LL_EXTI_LINE_5
934 * @arg @ref LL_EXTI_LINE_6
935 * @arg @ref LL_EXTI_LINE_7
936 * @arg @ref LL_EXTI_LINE_8
937 * @arg @ref LL_EXTI_LINE_9
938 * @arg @ref LL_EXTI_LINE_10
939 * @arg @ref LL_EXTI_LINE_11
940 * @arg @ref LL_EXTI_LINE_12
941 * @arg @ref LL_EXTI_LINE_13
942 * @arg @ref LL_EXTI_LINE_14
943 * @arg @ref LL_EXTI_LINE_15
944 * @arg @ref LL_EXTI_LINE_16
945 * @arg @ref LL_EXTI_LINE_18
946 * @arg @ref LL_EXTI_LINE_19
947 * @arg @ref LL_EXTI_LINE_20
948 * @arg @ref LL_EXTI_LINE_21
949 * @arg @ref LL_EXTI_LINE_22
950 * @arg @ref LL_EXTI_LINE_29
951 * @arg @ref LL_EXTI_LINE_30
952 * @arg @ref LL_EXTI_LINE_31
953 * @note Please check each device line mapping for EXTI Line availability
956 __STATIC_INLINE
void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine
)
958 SET_BIT(EXTI
->FTSR
, ExtiLine
);
961 #if defined(EXTI_32_63_SUPPORT)
963 * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
964 * @note The configurable wakeup lines are edge-triggered. No glitch must be
965 * generated on these lines. If a Falling edge on a configurable interrupt
966 * line occurs during a write operation in the EXTI_FTSR register, the
967 * pending bit is not set.
968 * Rising and falling edge triggers can be set for
969 * the same interrupt line. In this case, both generate a trigger
971 * @rmtoll FTSR2 FTx LL_EXTI_EnableFallingTrig_32_63
972 * @param ExtiLine This parameter can be a combination of the following values:
973 * @arg @ref LL_EXTI_LINE_35
974 * @arg @ref LL_EXTI_LINE_36
975 * @arg @ref LL_EXTI_LINE_37
976 * @arg @ref LL_EXTI_LINE_38
979 __STATIC_INLINE
void LL_EXTI_EnableFallingTrig_32_63(uint32_t ExtiLine
)
981 SET_BIT(EXTI
->FTSR2
, ExtiLine
);
986 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
987 * @note The configurable wakeup lines are edge-triggered. No glitch must be
988 * generated on these lines. If a Falling edge on a configurable interrupt
989 * line occurs during a write operation in the EXTI_FTSR register, the
990 * pending bit is not set.
991 * Rising and falling edge triggers can be set for the same interrupt line.
992 * In this case, both generate a trigger condition.
993 * @rmtoll FTSR FTx LL_EXTI_DisableFallingTrig_0_31
994 * @param ExtiLine This parameter can be a combination of the following values:
995 * @arg @ref LL_EXTI_LINE_0
996 * @arg @ref LL_EXTI_LINE_1
997 * @arg @ref LL_EXTI_LINE_2
998 * @arg @ref LL_EXTI_LINE_3
999 * @arg @ref LL_EXTI_LINE_4
1000 * @arg @ref LL_EXTI_LINE_5
1001 * @arg @ref LL_EXTI_LINE_6
1002 * @arg @ref LL_EXTI_LINE_7
1003 * @arg @ref LL_EXTI_LINE_8
1004 * @arg @ref LL_EXTI_LINE_9
1005 * @arg @ref LL_EXTI_LINE_10
1006 * @arg @ref LL_EXTI_LINE_11
1007 * @arg @ref LL_EXTI_LINE_12
1008 * @arg @ref LL_EXTI_LINE_13
1009 * @arg @ref LL_EXTI_LINE_14
1010 * @arg @ref LL_EXTI_LINE_15
1011 * @arg @ref LL_EXTI_LINE_16
1012 * @arg @ref LL_EXTI_LINE_18
1013 * @arg @ref LL_EXTI_LINE_19
1014 * @arg @ref LL_EXTI_LINE_20
1015 * @arg @ref LL_EXTI_LINE_21
1016 * @arg @ref LL_EXTI_LINE_22
1017 * @arg @ref LL_EXTI_LINE_29
1018 * @arg @ref LL_EXTI_LINE_30
1019 * @arg @ref LL_EXTI_LINE_31
1020 * @note Please check each device line mapping for EXTI Line availability
1023 __STATIC_INLINE
void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine
)
1025 CLEAR_BIT(EXTI
->FTSR
, ExtiLine
);
1028 #if defined(EXTI_32_63_SUPPORT)
1030 * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 32 to 63
1031 * @note The configurable wakeup lines are edge-triggered. No glitch must be
1032 * generated on these lines. If a Falling edge on a configurable interrupt
1033 * line occurs during a write operation in the EXTI_FTSR register, the
1034 * pending bit is not set.
1035 * Rising and falling edge triggers can be set for the same interrupt line.
1036 * In this case, both generate a trigger condition.
1037 * @rmtoll FTSR2 FTx LL_EXTI_DisableFallingTrig_32_63
1038 * @param ExtiLine This parameter can be a combination of the following values:
1039 * @arg @ref LL_EXTI_LINE_35
1040 * @arg @ref LL_EXTI_LINE_36
1041 * @arg @ref LL_EXTI_LINE_37
1042 * @arg @ref LL_EXTI_LINE_38
1045 __STATIC_INLINE
void LL_EXTI_DisableFallingTrig_32_63(uint32_t ExtiLine
)
1047 CLEAR_BIT(EXTI
->FTSR2
, ExtiLine
);
1052 * @brief Check if falling edge trigger is enabled for Lines in range 0 to 31
1053 * @rmtoll FTSR FTx LL_EXTI_IsEnabledFallingTrig_0_31
1054 * @param ExtiLine This parameter can be a combination of the following values:
1055 * @arg @ref LL_EXTI_LINE_0
1056 * @arg @ref LL_EXTI_LINE_1
1057 * @arg @ref LL_EXTI_LINE_2
1058 * @arg @ref LL_EXTI_LINE_3
1059 * @arg @ref LL_EXTI_LINE_4
1060 * @arg @ref LL_EXTI_LINE_5
1061 * @arg @ref LL_EXTI_LINE_6
1062 * @arg @ref LL_EXTI_LINE_7
1063 * @arg @ref LL_EXTI_LINE_8
1064 * @arg @ref LL_EXTI_LINE_9
1065 * @arg @ref LL_EXTI_LINE_10
1066 * @arg @ref LL_EXTI_LINE_11
1067 * @arg @ref LL_EXTI_LINE_12
1068 * @arg @ref LL_EXTI_LINE_13
1069 * @arg @ref LL_EXTI_LINE_14
1070 * @arg @ref LL_EXTI_LINE_15
1071 * @arg @ref LL_EXTI_LINE_16
1072 * @arg @ref LL_EXTI_LINE_18
1073 * @arg @ref LL_EXTI_LINE_19
1074 * @arg @ref LL_EXTI_LINE_20
1075 * @arg @ref LL_EXTI_LINE_21
1076 * @arg @ref LL_EXTI_LINE_22
1077 * @arg @ref LL_EXTI_LINE_29
1078 * @arg @ref LL_EXTI_LINE_30
1079 * @arg @ref LL_EXTI_LINE_31
1080 * @note Please check each device line mapping for EXTI Line availability
1081 * @retval State of bit (1 or 0).
1083 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine
)
1085 return (READ_BIT(EXTI
->FTSR
, ExtiLine
) == (ExtiLine
));
1088 #if defined(EXTI_32_63_SUPPORT)
1090 * @brief Check if falling edge trigger is enabled for Lines in range 32 to 63
1091 * @rmtoll FTSR2 FTx LL_EXTI_IsEnabledFallingTrig_32_63
1092 * @param ExtiLine This parameter can be a combination of the following values:
1093 * @arg @ref LL_EXTI_LINE_35
1094 * @arg @ref LL_EXTI_LINE_36
1095 * @arg @ref LL_EXTI_LINE_37
1096 * @arg @ref LL_EXTI_LINE_38
1097 * @retval State of bit (1 or 0).
1099 __STATIC_INLINE
uint32_t LL_EXTI_IsEnabledFallingTrig_32_63(uint32_t ExtiLine
)
1101 return (READ_BIT(EXTI
->FTSR2
, ExtiLine
) == (ExtiLine
));
1109 /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
1114 * @brief Generate a software Interrupt Event for Lines in range 0 to 31
1115 * @note If the interrupt is enabled on this line in the EXTI_IMR, writing a 1 to
1116 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR
1117 * resulting in an interrupt request generation.
1118 * This bit is cleared by clearing the corresponding bit in the EXTI_PR
1119 * register (by writing a 1 into the bit)
1120 * @rmtoll SWIER SWIx LL_EXTI_GenerateSWI_0_31
1121 * @param ExtiLine This parameter can be a combination of the following values:
1122 * @arg @ref LL_EXTI_LINE_0
1123 * @arg @ref LL_EXTI_LINE_1
1124 * @arg @ref LL_EXTI_LINE_2
1125 * @arg @ref LL_EXTI_LINE_3
1126 * @arg @ref LL_EXTI_LINE_4
1127 * @arg @ref LL_EXTI_LINE_5
1128 * @arg @ref LL_EXTI_LINE_6
1129 * @arg @ref LL_EXTI_LINE_7
1130 * @arg @ref LL_EXTI_LINE_8
1131 * @arg @ref LL_EXTI_LINE_9
1132 * @arg @ref LL_EXTI_LINE_10
1133 * @arg @ref LL_EXTI_LINE_11
1134 * @arg @ref LL_EXTI_LINE_12
1135 * @arg @ref LL_EXTI_LINE_13
1136 * @arg @ref LL_EXTI_LINE_14
1137 * @arg @ref LL_EXTI_LINE_15
1138 * @arg @ref LL_EXTI_LINE_16
1139 * @arg @ref LL_EXTI_LINE_18
1140 * @arg @ref LL_EXTI_LINE_19
1141 * @arg @ref LL_EXTI_LINE_20
1142 * @arg @ref LL_EXTI_LINE_21
1143 * @arg @ref LL_EXTI_LINE_22
1144 * @arg @ref LL_EXTI_LINE_29
1145 * @arg @ref LL_EXTI_LINE_30
1146 * @arg @ref LL_EXTI_LINE_31
1147 * @note Please check each device line mapping for EXTI Line availability
1150 __STATIC_INLINE
void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine
)
1152 SET_BIT(EXTI
->SWIER
, ExtiLine
);
1155 #if defined(EXTI_32_63_SUPPORT)
1157 * @brief Generate a software Interrupt Event for Lines in range 32 to 63
1158 * @note If the interrupt is enabled on this line inthe EXTI_IMR2, writing a 1 to
1159 * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR2
1160 * resulting in an interrupt request generation.
1161 * This bit is cleared by clearing the corresponding bit in the EXTI_PR2
1162 * register (by writing a 1 into the bit)
1163 * @rmtoll SWIER2 SWIx LL_EXTI_GenerateSWI_32_63
1164 * @param ExtiLine This parameter can be a combination of the following values:
1165 * @arg @ref LL_EXTI_LINE_35
1166 * @arg @ref LL_EXTI_LINE_36
1167 * @arg @ref LL_EXTI_LINE_37
1168 * @arg @ref LL_EXTI_LINE_38
1171 __STATIC_INLINE
void LL_EXTI_GenerateSWI_32_63(uint32_t ExtiLine
)
1173 SET_BIT(EXTI
->SWIER2
, ExtiLine
);
1181 /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
1186 * @brief Check if the ExtLine Flag is set or not for Lines in range 0 to 31
1187 * @note This bit is set when the selected edge event arrives on the interrupt
1188 * line. This bit is cleared by writing a 1 to the bit.
1189 * @rmtoll PR PIFx LL_EXTI_IsActiveFlag_0_31
1190 * @param ExtiLine This parameter can be a combination of the following values:
1191 * @arg @ref LL_EXTI_LINE_0
1192 * @arg @ref LL_EXTI_LINE_1
1193 * @arg @ref LL_EXTI_LINE_2
1194 * @arg @ref LL_EXTI_LINE_3
1195 * @arg @ref LL_EXTI_LINE_4
1196 * @arg @ref LL_EXTI_LINE_5
1197 * @arg @ref LL_EXTI_LINE_6
1198 * @arg @ref LL_EXTI_LINE_7
1199 * @arg @ref LL_EXTI_LINE_8
1200 * @arg @ref LL_EXTI_LINE_9
1201 * @arg @ref LL_EXTI_LINE_10
1202 * @arg @ref LL_EXTI_LINE_11
1203 * @arg @ref LL_EXTI_LINE_12
1204 * @arg @ref LL_EXTI_LINE_13
1205 * @arg @ref LL_EXTI_LINE_14
1206 * @arg @ref LL_EXTI_LINE_15
1207 * @arg @ref LL_EXTI_LINE_16
1208 * @arg @ref LL_EXTI_LINE_18
1209 * @arg @ref LL_EXTI_LINE_19
1210 * @arg @ref LL_EXTI_LINE_20
1211 * @arg @ref LL_EXTI_LINE_21
1212 * @arg @ref LL_EXTI_LINE_22
1213 * @arg @ref LL_EXTI_LINE_29
1214 * @arg @ref LL_EXTI_LINE_30
1215 * @arg @ref LL_EXTI_LINE_31
1216 * @note Please check each device line mapping for EXTI Line availability
1217 * @retval State of bit (1 or 0).
1219 __STATIC_INLINE
uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine
)
1221 return (READ_BIT(EXTI
->PR
, ExtiLine
) == (ExtiLine
));
1224 #if defined(EXTI_32_63_SUPPORT)
1226 * @brief Check if the ExtLine Flag is set or not for Lines in range 32 to 63
1227 * @note This bit is set when the selected edge event arrives on the interrupt
1228 * line. This bit is cleared by writing a 1 to the bit.
1229 * @rmtoll PR2 PIFx LL_EXTI_IsActiveFlag_32_63
1230 * @param ExtiLine This parameter can be a combination of the following values:
1231 * @arg @ref LL_EXTI_LINE_35
1232 * @arg @ref LL_EXTI_LINE_36
1233 * @arg @ref LL_EXTI_LINE_37
1234 * @arg @ref LL_EXTI_LINE_38
1235 * @retval State of bit (1 or 0).
1237 __STATIC_INLINE
uint32_t LL_EXTI_IsActiveFlag_32_63(uint32_t ExtiLine
)
1239 return (READ_BIT(EXTI
->PR2
, ExtiLine
) == (ExtiLine
));
1244 * @brief Read ExtLine Combination Flag for Lines in range 0 to 31
1245 * @note This bit is set when the selected edge event arrives on the interrupt
1246 * line. This bit is cleared by writing a 1 to the bit.
1247 * @rmtoll PR PIFx LL_EXTI_ReadFlag_0_31
1248 * @param ExtiLine This parameter can be a combination of the following values:
1249 * @arg @ref LL_EXTI_LINE_0
1250 * @arg @ref LL_EXTI_LINE_1
1251 * @arg @ref LL_EXTI_LINE_2
1252 * @arg @ref LL_EXTI_LINE_3
1253 * @arg @ref LL_EXTI_LINE_4
1254 * @arg @ref LL_EXTI_LINE_5
1255 * @arg @ref LL_EXTI_LINE_6
1256 * @arg @ref LL_EXTI_LINE_7
1257 * @arg @ref LL_EXTI_LINE_8
1258 * @arg @ref LL_EXTI_LINE_9
1259 * @arg @ref LL_EXTI_LINE_10
1260 * @arg @ref LL_EXTI_LINE_11
1261 * @arg @ref LL_EXTI_LINE_12
1262 * @arg @ref LL_EXTI_LINE_13
1263 * @arg @ref LL_EXTI_LINE_14
1264 * @arg @ref LL_EXTI_LINE_15
1265 * @arg @ref LL_EXTI_LINE_16
1266 * @arg @ref LL_EXTI_LINE_18
1267 * @arg @ref LL_EXTI_LINE_19
1268 * @arg @ref LL_EXTI_LINE_20
1269 * @arg @ref LL_EXTI_LINE_21
1270 * @arg @ref LL_EXTI_LINE_22
1271 * @arg @ref LL_EXTI_LINE_29
1272 * @arg @ref LL_EXTI_LINE_30
1273 * @arg @ref LL_EXTI_LINE_31
1274 * @note Please check each device line mapping for EXTI Line availability
1275 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1277 __STATIC_INLINE
uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine
)
1279 return (uint32_t)(READ_BIT(EXTI
->PR
, ExtiLine
));
1282 #if defined(EXTI_32_63_SUPPORT)
1285 * @brief Read ExtLine Combination Flag for Lines in range 32 to 63
1286 * @note This bit is set when the selected edge event arrives on the interrupt
1287 * line. This bit is cleared by writing a 1 to the bit.
1288 * @rmtoll PR2 PIFx LL_EXTI_ReadFlag_32_63
1289 * @param ExtiLine This parameter can be a combination of the following values:
1290 * @arg @ref LL_EXTI_LINE_35
1291 * @arg @ref LL_EXTI_LINE_36
1292 * @arg @ref LL_EXTI_LINE_37
1293 * @arg @ref LL_EXTI_LINE_38
1294 * @retval @note This bit is set when the selected edge event arrives on the interrupt
1296 __STATIC_INLINE
uint32_t LL_EXTI_ReadFlag_32_63(uint32_t ExtiLine
)
1298 return (uint32_t)(READ_BIT(EXTI
->PR2
, ExtiLine
));
1303 * @brief Clear ExtLine Flags for Lines in range 0 to 31
1304 * @note This bit is set when the selected edge event arrives on the interrupt
1305 * line. This bit is cleared by writing a 1 to the bit.
1306 * @rmtoll PR PIFx LL_EXTI_ClearFlag_0_31
1307 * @param ExtiLine This parameter can be a combination of the following values:
1308 * @arg @ref LL_EXTI_LINE_0
1309 * @arg @ref LL_EXTI_LINE_1
1310 * @arg @ref LL_EXTI_LINE_2
1311 * @arg @ref LL_EXTI_LINE_3
1312 * @arg @ref LL_EXTI_LINE_4
1313 * @arg @ref LL_EXTI_LINE_5
1314 * @arg @ref LL_EXTI_LINE_6
1315 * @arg @ref LL_EXTI_LINE_7
1316 * @arg @ref LL_EXTI_LINE_8
1317 * @arg @ref LL_EXTI_LINE_9
1318 * @arg @ref LL_EXTI_LINE_10
1319 * @arg @ref LL_EXTI_LINE_11
1320 * @arg @ref LL_EXTI_LINE_12
1321 * @arg @ref LL_EXTI_LINE_13
1322 * @arg @ref LL_EXTI_LINE_14
1323 * @arg @ref LL_EXTI_LINE_15
1324 * @arg @ref LL_EXTI_LINE_16
1325 * @arg @ref LL_EXTI_LINE_18
1326 * @arg @ref LL_EXTI_LINE_19
1327 * @arg @ref LL_EXTI_LINE_20
1328 * @arg @ref LL_EXTI_LINE_21
1329 * @arg @ref LL_EXTI_LINE_22
1330 * @arg @ref LL_EXTI_LINE_29
1331 * @arg @ref LL_EXTI_LINE_30
1332 * @arg @ref LL_EXTI_LINE_31
1333 * @note Please check each device line mapping for EXTI Line availability
1336 __STATIC_INLINE
void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine
)
1338 WRITE_REG(EXTI
->PR
, ExtiLine
);
1341 #if defined(EXTI_32_63_SUPPORT)
1343 * @brief Clear ExtLine Flags for Lines in range 32 to 63
1344 * @note This bit is set when the selected edge event arrives on the interrupt
1345 * line. This bit is cleared by writing a 1 to the bit.
1346 * @rmtoll PR2 PIFx LL_EXTI_ClearFlag_32_63
1347 * @param ExtiLine This parameter can be a combination of the following values:
1348 * @arg @ref LL_EXTI_LINE_35
1349 * @arg @ref LL_EXTI_LINE_36
1350 * @arg @ref LL_EXTI_LINE_37
1351 * @arg @ref LL_EXTI_LINE_38
1354 __STATIC_INLINE
void LL_EXTI_ClearFlag_32_63(uint32_t ExtiLine
)
1356 WRITE_REG(EXTI
->PR2
, ExtiLine
);
1364 #if defined(USE_FULL_LL_DRIVER)
1365 /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
1369 uint32_t LL_EXTI_Init(LL_EXTI_InitTypeDef
*EXTI_InitStruct
);
1370 uint32_t LL_EXTI_DeInit(void);
1371 void LL_EXTI_StructInit(LL_EXTI_InitTypeDef
*EXTI_InitStruct
);
1377 #endif /* USE_FULL_LL_DRIVER */
1397 #endif /* __STM32F3xx_LL_EXTI_H */
1399 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/