1 /**
2   ******************************************************************************
3   * @file    stm32mp1xx_ll_exti.h
4   * @author  MCD Application Team
5   * @brief   Header file of EXTI LL module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2019 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef STM32MP1xx_LL_EXTI_H
21 #define STM32MP1xx_LL_EXTI_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32mp1xx.h"
29 
30 /** @addtogroup STM32MP1xx_LL_Driver
31   * @{
32   */
33 
34 #if defined (EXTI)
35 
36 /** @defgroup EXTI_LL EXTI
37   * @{
38   */
39 
40 /* Private types -------------------------------------------------------------*/
41 /* Private variables ---------------------------------------------------------*/
42 /* Private constants ---------------------------------------------------------*/
43 #define LL_EXTI_REGISTER_PINPOS_SHFT        16u   /*!< Define used to shift pin position in EXTICR register */
44 
45 /* Private Macros ------------------------------------------------------------*/
46 #if defined(USE_FULL_LL_DRIVER)
47 /** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
48   * @{
49   */
50 /**
51   * @}
52   */
53 #endif /*USE_FULL_LL_DRIVER*/
54 /* Exported types ------------------------------------------------------------*/
55 #if defined(USE_FULL_LL_DRIVER)
56 /** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
57   * @{
58   */
59 typedef struct
60 {
61 
62   uint32_t Line_0_31;           /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31
63                                      This parameter can be any combination of @ref EXTI_LL_EC_LINE */
64 
65   uint32_t Line_32_63;          /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 32 to 63
66                                      This parameter can be any combination of @ref EXTI_LL_EC_LINE */
67 
68   uint32_t Line_64_95;          /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 64 to 95
69                                      This parameter can be any combination of @ref EXTI_LL_EC_LINE */
70 
71   FunctionalState LineCommand;  /*!< Specifies the new state of the selected EXTI lines.
72                                      This parameter can be set either to ENABLE or DISABLE */
73 
74   uint8_t Mode;                 /*!< Specifies the mode for the EXTI lines.
75                                      This parameter can be a value of @ref EXTI_LL_EC_MODE. */
76 
77   uint8_t Trigger;              /*!< Specifies the trigger signal active edge for the EXTI lines.
78                                      This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
79 } LL_EXTI_InitTypeDef;
80 
81 /**
82   * @}
83   */
84 #endif /*USE_FULL_LL_DRIVER*/
85 
86 /* Exported constants --------------------------------------------------------*/
87 /** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
88   * @{
89   */
90 
91 /** @defgroup EXTI_LL_EC_LINE LINE
92   * @{
93   */
94 #define LL_EXTI_LINE_0                 EXTI_IMR1_IM0           /*!< Extended line 0 */
95 #define LL_EXTI_LINE_1                 EXTI_IMR1_IM1           /*!< Extended line 1 */
96 #define LL_EXTI_LINE_2                 EXTI_IMR1_IM2           /*!< Extended line 2 */
97 #define LL_EXTI_LINE_3                 EXTI_IMR1_IM3           /*!< Extended line 3 */
98 #define LL_EXTI_LINE_4                 EXTI_IMR1_IM4           /*!< Extended line 4 */
99 #define LL_EXTI_LINE_5                 EXTI_IMR1_IM5           /*!< Extended line 5 */
100 #define LL_EXTI_LINE_6                 EXTI_IMR1_IM6           /*!< Extended line 6 */
101 #define LL_EXTI_LINE_7                 EXTI_IMR1_IM7           /*!< Extended line 7 */
102 #define LL_EXTI_LINE_8                 EXTI_IMR1_IM8           /*!< Extended line 8 */
103 #define LL_EXTI_LINE_9                 EXTI_IMR1_IM9           /*!< Extended line 9 */
104 #define LL_EXTI_LINE_10                EXTI_IMR1_IM10          /*!< Extended line 10 */
105 #define LL_EXTI_LINE_11                EXTI_IMR1_IM11          /*!< Extended line 11 */
106 #define LL_EXTI_LINE_12                EXTI_IMR1_IM12          /*!< Extended line 12 */
107 #define LL_EXTI_LINE_13                EXTI_IMR1_IM13          /*!< Extended line 13 */
108 #define LL_EXTI_LINE_14                EXTI_IMR1_IM14          /*!< Extended line 14 */
109 #define LL_EXTI_LINE_15                EXTI_IMR1_IM15          /*!< Extended line 15 */
110 #define LL_EXTI_LINE_16                EXTI_IMR1_IM16          /*!< Extended line 16 */
111 #define LL_EXTI_LINE_17                EXTI_IMR1_IM17          /*!< Extended line 17 */
112 #define LL_EXTI_LINE_18                EXTI_IMR1_IM18          /*!< Extended line 18 */
113 #define LL_EXTI_LINE_19                EXTI_IMR1_IM19          /*!< Extended line 19 */
114 
115 #define LL_EXTI_LINE_21                EXTI_IMR1_IM21          /*!< Extended line 21 */
116 #define LL_EXTI_LINE_22                EXTI_IMR1_IM22          /*!< Extended line 22 */
117 #define LL_EXTI_LINE_23                EXTI_IMR1_IM23          /*!< Extended line 23 */
118 #define LL_EXTI_LINE_24                EXTI_IMR1_IM24          /*!< Extended line 24 */
119 #define LL_EXTI_LINE_25                EXTI_IMR1_IM25          /*!< Extended line 25 */
120 #define LL_EXTI_LINE_26                EXTI_IMR1_IM26          /*!< Extended line 26 */
121 #define LL_EXTI_LINE_27                EXTI_IMR1_IM27          /*!< Extended line 27 */
122 #define LL_EXTI_LINE_28                EXTI_IMR1_IM28          /*!< Extended line 28 */
123 #define LL_EXTI_LINE_29                EXTI_IMR1_IM29          /*!< Extended line 29 */
124 #define LL_EXTI_LINE_30                EXTI_IMR1_IM30          /*!< Extended line 30 */
125 #define LL_EXTI_LINE_31                EXTI_IMR1_IM31          /*!< Extended line 31 */
126 #define LL_EXTI_LINE_ALL_0_31          0xFFEFFFFFU             /*!< All Extended line not reserved*/
127 
128 #define LL_EXTI_LINE_32                EXTI_IMR2_IM32          /*!< Extended line 32 */
129 #define LL_EXTI_LINE_33                EXTI_IMR2_IM33          /*!< Extended line 33 */
130 
131 #define LL_EXTI_LINE_36                EXTI_IMR2_IM36          /*!< Extended line 36 */
132 #define LL_EXTI_LINE_37                EXTI_IMR2_IM37          /*!< Extended line 37 */
133 #define LL_EXTI_LINE_38                EXTI_IMR2_IM38          /*!< Extended line 38 */
134 #define LL_EXTI_LINE_39                EXTI_IMR2_IM39          /*!< Extended line 39 */
135 #define LL_EXTI_LINE_40                EXTI_IMR2_IM40          /*!< Extended line 40 */
136 #define LL_EXTI_LINE_41                EXTI_IMR2_IM41          /*!< Extended line 41 */
137 #define LL_EXTI_LINE_42                EXTI_IMR2_IM42          /*!< Extended line 42 */
138 #define LL_EXTI_LINE_43                EXTI_IMR2_IM43          /*!< Extended line 43 */
139 #define LL_EXTI_LINE_44                EXTI_IMR2_IM44          /*!< Extended line 44 */
140 
141 #define LL_EXTI_LINE_47                EXTI_IMR2_IM47          /*!< Extended line 47 */
142 #define LL_EXTI_LINE_48                EXTI_IMR2_IM48          /*!< Extended line 48 */
143 
144 #define LL_EXTI_LINE_50                EXTI_IMR2_IM50          /*!< Extended line 50 */
145 
146 #define LL_EXTI_LINE_52                EXTI_IMR2_IM52          /*!< Extended line 52 */
147 #define LL_EXTI_LINE_53                EXTI_IMR2_IM53          /*!< Extended line 53 */
148 #define LL_EXTI_LINE_54                EXTI_IMR2_IM54          /*!< Extended line 54 */
149 #define LL_EXTI_LINE_55                EXTI_IMR2_IM55          /*!< Extended line 55 */
150 #define LL_EXTI_LINE_56                EXTI_IMR2_IM56          /*!< Extended line 56 */
151 #define LL_EXTI_LINE_57                EXTI_IMR2_IM57          /*!< Extended line 57 */
152 #define LL_EXTI_LINE_58                EXTI_IMR2_IM58          /*!< Extended line 58 */
153 #define LL_EXTI_LINE_59                EXTI_IMR2_IM59          /*!< Extended line 59 */
154 #define LL_EXTI_LINE_60                EXTI_IMR2_IM60          /*!< Extended line 60 */
155 #define LL_EXTI_LINE_61                EXTI_IMR2_IM61          /*!< Extended line 61 */
156 #define LL_EXTI_LINE_62                EXTI_IMR2_IM62          /*!< Extended line 62 */
157 #define LL_EXTI_LINE_63                EXTI_IMR2_IM63          /*!< Extended line 63 */
158 #define LL_EXTI_LINE_ALL_32_63         0xFFF5FFF3U            /*!< All Extended line not reserved*/
159 
160 #define LL_EXTI_LINE_64                EXTI_IMR3_IM64          /*!< Extended line 64 */
161 #define LL_EXTI_LINE_65                EXTI_IMR3_IM65          /*!< Extended line 65 */
162 #define LL_EXTI_LINE_66                EXTI_IMR3_IM66          /*!< Extended line 66 */
163 
164 #define LL_EXTI_LINE_68                EXTI_IMR3_IM68          /*!< Extended line 68 */
165 #define LL_EXTI_LINE_69                EXTI_IMR3_IM69          /*!< Extended line 69 */
166 #define LL_EXTI_LINE_70                EXTI_IMR3_IM70          /*!< Extended line 70 */
167 #define LL_EXTI_LINE_71                EXTI_IMR3_IM71          /*!< Extended line 71 */
168 #define LL_EXTI_LINE_72                EXTI_IMR3_IM72          /*!< Extended line 72 */
169 #define LL_EXTI_LINE_73                EXTI_IMR3_IM73          /*!< Extended line 73 */
170 
171 #define LL_EXTI_LINE_75                EXTI_IMR3_IM75          /*!< Extended line 75 */
172 #define LL_EXTI_LINE_ALL_64_95         0xBF7U                  /*!< All Extended line not reserved*/
173 
174 
175 #define LL_EXTI_LINE_ALL               (0xFFFFFFFFU)  /*!< All Extended line */
176 
177 #if defined(USE_FULL_LL_DRIVER)
178 #define LL_EXTI_LINE_NONE              (0x00000000U)  /*!< None Extended line */
179 #endif /*USE_FULL_LL_DRIVER*/
180 /**
181   * @}
182   */
183 
184 /** @defgroup EXTI_LL_EC_CONFIG_PORT EXTI CONFIG PORT
185   * @{
186   */
187 #define LL_EXTI_CONFIG_PORTA           EXTI_EXTICR1_EXTI0_PA  /*!< EXTI PORT A */
188 #define LL_EXTI_CONFIG_PORTB           EXTI_EXTICR1_EXTI0_PB  /*!< EXTI PORT B */
189 #define LL_EXTI_CONFIG_PORTC           EXTI_EXTICR1_EXTI0_PC  /*!< EXTI PORT C */
190 #define LL_EXTI_CONFIG_PORTD           EXTI_EXTICR1_EXTI0_PD  /*!< EXTI PORT D */
191 #define LL_EXTI_CONFIG_PORTE           EXTI_EXTICR1_EXTI0_PE  /*!< EXTI PORT E */
192 #define LL_EXTI_CONFIG_PORTF           EXTI_EXTICR1_EXTI0_PF  /*!< EXTI PORT F */
193 #define LL_EXTI_CONFIG_PORTG           EXTI_EXTICR1_EXTI0_PG  /*!< EXTI PORT G */
194 #define LL_EXTI_CONFIG_PORTH           EXTI_EXTICR1_EXTI0_PH  /*!< EXTI PORT H */
195 #define LL_EXTI_CONFIG_PORTI           EXTI_EXTICR1_EXTI0_PI  /*!< EXTI PORT I */
196 #define LL_EXTI_CONFIG_PORTJ           EXTI_EXTICR1_EXTI0_PJ  /*!< EXTI PORT J */
197 #define LL_EXTI_CONFIG_PORTK           EXTI_EXTICR1_EXTI0_PK  /*!< EXTI PORT K */
198 #define LL_EXTI_CONFIG_PORTZ           EXTI_EXTICR1_EXTI0_PZ  /*!< EXTI PORT Z */
199 /**
200   * @}
201   */
202 
203 /** @defgroup EXTI_LL_EC_CONFIG_LINE EXTI CONFIG LINE
204   * @{
205   */
206 #define LL_EXTI_CONFIG_LINE0           ((0uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 0U)  /*!< EXTI_POSITION_0  | EXTICR[0] */
207 #define LL_EXTI_CONFIG_LINE1           ((8uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 0U)  /*!< EXTI_POSITION_8  | EXTICR[0] */
208 #define LL_EXTI_CONFIG_LINE2           ((16uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U)  /*!< EXTI_POSITION_16 | EXTICR[0] */
209 #define LL_EXTI_CONFIG_LINE3           ((24uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 0U)  /*!< EXTI_POSITION_24 | EXTICR[0] */
210 #define LL_EXTI_CONFIG_LINE4           ((0uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 1U)  /*!< EXTI_POSITION_0  | EXTICR[1] */
211 #define LL_EXTI_CONFIG_LINE5           ((8uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 1U)  /*!< EXTI_POSITION_8  | EXTICR[1] */
212 #define LL_EXTI_CONFIG_LINE6           ((16uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U)  /*!< EXTI_POSITION_16 | EXTICR[1] */
213 #define LL_EXTI_CONFIG_LINE7           ((24uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 1U)  /*!< EXTI_POSITION_24 | EXTICR[1] */
214 #define LL_EXTI_CONFIG_LINE8           ((0uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 2U)  /*!< EXTI_POSITION_0  | EXTICR[2] */
215 #define LL_EXTI_CONFIG_LINE9           ((8uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 2U)  /*!< EXTI_POSITION_8  | EXTICR[2] */
216 #define LL_EXTI_CONFIG_LINE10          ((16uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U)  /*!< EXTI_POSITION_16 | EXTICR[2] */
217 #define LL_EXTI_CONFIG_LINE11          ((24uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 2U)  /*!< EXTI_POSITION_24 | EXTICR[2] */
218 #define LL_EXTI_CONFIG_LINE12          ((0uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 3U)  /*!< EXTI_POSITION_0  | EXTICR[3] */
219 #define LL_EXTI_CONFIG_LINE13          ((8uL << LL_EXTI_REGISTER_PINPOS_SHFT)  | 3U)  /*!< EXTI_POSITION_8  | EXTICR[3] */
220 #define LL_EXTI_CONFIG_LINE14          ((16uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U)  /*!< EXTI_POSITION_16 | EXTICR[3] */
221 #define LL_EXTI_CONFIG_LINE15          ((24uL << LL_EXTI_REGISTER_PINPOS_SHFT) | 3U)  /*!< EXTI_POSITION_24 | EXTICR[3] */
222 /**
223   * @}
224   */
225 
226 #if defined(USE_FULL_LL_DRIVER)
227 /** @defgroup EXTI_LL_EC_MODE Mode
228   * @{
229   */
230 #define LL_EXTI_MODE_IT                 ((uint8_t)0x00U) /*!< Interrupt Mode */
231 #define LL_EXTI_MODE_EVENT              ((uint8_t)0x01U) /*!< Event Mode */
232 #define LL_EXTI_MODE_IT_EVENT           ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
233 /**
234   * @}
235   */
236 
237 /** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
238   * @{
239   */
240 #define LL_EXTI_TRIGGER_NONE            ((uint8_t)0x00U) /*!< No Trigger Mode */
241 #define LL_EXTI_TRIGGER_RISING          ((uint8_t)0x01U) /*!< Trigger Rising Mode */
242 #define LL_EXTI_TRIGGER_FALLING         ((uint8_t)0x02U) /*!< Trigger Falling Mode */
243 #define LL_EXTI_TRIGGER_RISING_FALLING  ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
244 /**
245   * @}
246   */
247 #endif /*USE_FULL_LL_DRIVER*/
248 /**
249   * @}
250   */
251 
252 /* Exported macro ------------------------------------------------------------*/
253 /** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
254   * @{
255   */
256 
257 /** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
258   * @{
259   */
260 
261 /**
262   * @brief  Write a value in EXTI register
263   * @param  __REG__ Register to be written
264   * @param  __VALUE__ Value to be written in the register
265   * @retval None
266   */
267 #define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
268 
269 /**
270   * @brief  Read a value in EXTI register
271   * @param  __REG__ Register to be read
272   * @retval Register value
273   */
274 #define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
275 /**
276   * @}
277   */
278 
279 
280 /**
281   * @}
282   */
283 
284 
285 
286 /* Exported functions --------------------------------------------------------*/
287 /** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
288  * @{
289  */
290 /** @defgroup EXTI_LL_EF_IT_Management IT_Management
291   * @{
292   */
293 
294 /**
295   * @brief  Enable ExtiLine Interrupt request for Lines in range 0 to 31
296   * @rmtoll C2IMR1         IMx           LL_EXTI_EnableIT_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   *
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_25
324   *         @arg @ref LL_EXTI_LINE_26
325   *         @arg @ref LL_EXTI_LINE_27
326   *         @arg @ref LL_EXTI_LINE_28
327   *         @arg @ref LL_EXTI_LINE_29
328   *         @arg @ref LL_EXTI_LINE_30
329   *         @arg @ref LL_EXTI_LINE_31
330   *         @arg @ref LL_EXTI_LINE_ALL_0_31
331   * @retval None
332   */
LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)333 __STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)
334 {
335   SET_BIT(EXTI->C2IMR1, ExtiLine);
336 }
337 
338 /**
339   * @brief  Enable ExtiLine Interrupt request for Lines in range 32 to 63
340   * @rmtoll C2IMR2         IMx           LL_EXTI_EnableIT_32_63
341   * @param  ExtiLine This parameter can be one of the following values:
342   *         @arg @ref LL_EXTI_LINE_32
343   *         @arg @ref LL_EXTI_LINE_33
344   *
345   *
346   *         @arg @ref LL_EXTI_LINE_36
347   *         @arg @ref LL_EXTI_LINE_37
348   *         @arg @ref LL_EXTI_LINE_38
349   *         @arg @ref LL_EXTI_LINE_39
350   *         @arg @ref LL_EXTI_LINE_40
351   *         @arg @ref LL_EXTI_LINE_41
352   *         @arg @ref LL_EXTI_LINE_42
353   *         @arg @ref LL_EXTI_LINE_43
354   *         @arg @ref LL_EXTI_LINE_44
355   *
356   *         @arg @ref LL_EXTI_LINE_47
357   *         @arg @ref LL_EXTI_LINE_48
358   *
359   *         @arg @ref LL_EXTI_LINE_50
360   *
361   *         @arg @ref LL_EXTI_LINE_52
362   *         @arg @ref LL_EXTI_LINE_53
363   *         @arg @ref LL_EXTI_LINE_54
364   *         @arg @ref LL_EXTI_LINE_55
365   *         @arg @ref LL_EXTI_LINE_56
366   *         @arg @ref LL_EXTI_LINE_57
367   *         @arg @ref LL_EXTI_LINE_58
368   *         @arg @ref LL_EXTI_LINE_59
369   *         @arg @ref LL_EXTI_LINE_60
370   *         @arg @ref LL_EXTI_LINE_61
371   *         @arg @ref LL_EXTI_LINE_62
372   *         @arg @ref LL_EXTI_LINE_63
373   *         @arg @ref LL_EXTI_LINE_ALL_32_63
374   * @retval None
375   */
LL_EXTI_EnableIT_32_63(uint32_t ExtiLine)376 __STATIC_INLINE void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine)
377 {
378   SET_BIT(EXTI->C2IMR2, ExtiLine);
379 }
380 
381 /**
382   * @brief  Enable ExtiLine Interrupt request for Lines in range 64 to 95
383   * @rmtoll C2IMR3         IMx           LL_EXTI_EnableIT_64_95
384   * @param  ExtiLine This parameter can be one of the following values:
385   *         @arg @ref LL_EXTI_LINE_64
386   *         @arg @ref LL_EXTI_LINE_65
387   *         @arg @ref LL_EXTI_LINE_66
388   *
389   *         @arg @ref LL_EXTI_LINE_68
390   *         @arg @ref LL_EXTI_LINE_69
391   *         @arg @ref LL_EXTI_LINE_70
392   *         @arg @ref LL_EXTI_LINE_71
393   *         @arg @ref LL_EXTI_LINE_72
394   *         @arg @ref LL_EXTI_LINE_73
395   *
396   *         @arg @ref LL_EXTI_LINE_75
397   *         @arg @ref LL_EXTI_LINE_ALL_64_95
398   * @retval None
399   */
LL_EXTI_EnableIT_64_95(uint32_t ExtiLine)400 __STATIC_INLINE void LL_EXTI_EnableIT_64_95(uint32_t ExtiLine)
401 {
402   SET_BIT(EXTI->C2IMR3, ExtiLine);
403 }
404 
405 /**
406   * @brief  Disable ExtiLine Interrupt request for Lines in range 0 to 31
407   * @rmtoll C2IMR1         IMx           LL_EXTI_DisableIT_0_31
408   * @param  ExtiLine This parameter can be one of the following values:
409   *         @arg @ref LL_EXTI_LINE_0
410   *         @arg @ref LL_EXTI_LINE_1
411   *         @arg @ref LL_EXTI_LINE_2
412   *         @arg @ref LL_EXTI_LINE_3
413   *         @arg @ref LL_EXTI_LINE_4
414   *         @arg @ref LL_EXTI_LINE_5
415   *         @arg @ref LL_EXTI_LINE_6
416   *         @arg @ref LL_EXTI_LINE_7
417   *         @arg @ref LL_EXTI_LINE_8
418   *         @arg @ref LL_EXTI_LINE_9
419   *         @arg @ref LL_EXTI_LINE_10
420   *         @arg @ref LL_EXTI_LINE_11
421   *         @arg @ref LL_EXTI_LINE_12
422   *         @arg @ref LL_EXTI_LINE_13
423   *         @arg @ref LL_EXTI_LINE_14
424   *         @arg @ref LL_EXTI_LINE_15
425   *         @arg @ref LL_EXTI_LINE_16
426   *         @arg @ref LL_EXTI_LINE_17
427   *         @arg @ref LL_EXTI_LINE_18
428   *         @arg @ref LL_EXTI_LINE_19
429   *
430   *         @arg @ref LL_EXTI_LINE_21
431   *         @arg @ref LL_EXTI_LINE_22
432   *         @arg @ref LL_EXTI_LINE_23
433   *         @arg @ref LL_EXTI_LINE_24
434   *         @arg @ref LL_EXTI_LINE_25
435   *         @arg @ref LL_EXTI_LINE_26
436   *         @arg @ref LL_EXTI_LINE_27
437   *         @arg @ref LL_EXTI_LINE_28
438   *         @arg @ref LL_EXTI_LINE_29
439   *         @arg @ref LL_EXTI_LINE_30
440   *         @arg @ref LL_EXTI_LINE_31
441   *         @arg @ref LL_EXTI_LINE_ALL_0_31
442   * @retval None
443   */
LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)444 __STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)
445 {
446   CLEAR_BIT(EXTI->C2IMR1, ExtiLine);
447 }
448 
449 /**
450   * @brief  Disable ExtiLine Interrupt request for Lines in range 32 to 63
451   * @rmtoll C2IMR2         IMx           LL_EXTI_DisableIT_32_63
452   * @param  ExtiLine This parameter can be one of the following values:
453   *         @arg @ref LL_EXTI_LINE_32
454   *         @arg @ref LL_EXTI_LINE_33
455   *
456   *
457   *         @arg @ref LL_EXTI_LINE_36
458   *         @arg @ref LL_EXTI_LINE_37
459   *         @arg @ref LL_EXTI_LINE_38
460   *         @arg @ref LL_EXTI_LINE_39
461   *         @arg @ref LL_EXTI_LINE_40
462   *         @arg @ref LL_EXTI_LINE_41
463   *         @arg @ref LL_EXTI_LINE_42
464   *         @arg @ref LL_EXTI_LINE_43
465   *         @arg @ref LL_EXTI_LINE_44
466   *
467   *         @arg @ref LL_EXTI_LINE_47
468   *         @arg @ref LL_EXTI_LINE_48
469   *
470   *         @arg @ref LL_EXTI_LINE_50
471   *
472   *         @arg @ref LL_EXTI_LINE_52
473   *         @arg @ref LL_EXTI_LINE_53
474   *         @arg @ref LL_EXTI_LINE_54
475   *         @arg @ref LL_EXTI_LINE_55
476   *         @arg @ref LL_EXTI_LINE_56
477   *         @arg @ref LL_EXTI_LINE_57
478   *         @arg @ref LL_EXTI_LINE_58
479   *         @arg @ref LL_EXTI_LINE_59
480   *         @arg @ref LL_EXTI_LINE_60
481   *         @arg @ref LL_EXTI_LINE_61
482   *         @arg @ref LL_EXTI_LINE_62
483   *         @arg @ref LL_EXTI_LINE_63
484   *         @arg @ref LL_EXTI_LINE_ALL_32_63
485   * @retval None
486   */
LL_EXTI_DisableIT_32_63(uint32_t ExtiLine)487 __STATIC_INLINE void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine)
488 {
489   CLEAR_BIT(EXTI->C2IMR2, ExtiLine);
490 }
491 
492 /**
493   * @brief  Disable ExtiLine Interrupt request for Lines in range 64 to 95
494   * @rmtoll C2IMR3         IMx           LL_EXTI_DisableIT_64_95
495   * @param  ExtiLine This parameter can be one of the following values:
496   *         @arg @ref LL_EXTI_LINE_64
497   *         @arg @ref LL_EXTI_LINE_65
498   *         @arg @ref LL_EXTI_LINE_66
499   *
500   *         @arg @ref LL_EXTI_LINE_68
501   *         @arg @ref LL_EXTI_LINE_69
502   *         @arg @ref LL_EXTI_LINE_70
503   *         @arg @ref LL_EXTI_LINE_71
504   *         @arg @ref LL_EXTI_LINE_72
505   *         @arg @ref LL_EXTI_LINE_73
506   *
507   *         @arg @ref LL_EXTI_LINE_75
508   *         @arg @ref LL_EXTI_LINE_ALL_64_95
509   * @retval None
510   */
LL_EXTI_DisableIT_64_95(uint32_t ExtiLine)511 __STATIC_INLINE void LL_EXTI_DisableIT_64_95(uint32_t ExtiLine)
512 {
513   CLEAR_BIT(EXTI->C2IMR3, ExtiLine);
514 }
515 
516 /**
517   * @brief  Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
518   * @rmtoll C2IMR1         IMx           LL_EXTI_IsEnabledIT_0_31
519   * @param  ExtiLine This parameter can be one of the following values:
520   *         @arg @ref LL_EXTI_LINE_0
521   *         @arg @ref LL_EXTI_LINE_1
522   *         @arg @ref LL_EXTI_LINE_2
523   *         @arg @ref LL_EXTI_LINE_3
524   *         @arg @ref LL_EXTI_LINE_4
525   *         @arg @ref LL_EXTI_LINE_5
526   *         @arg @ref LL_EXTI_LINE_6
527   *         @arg @ref LL_EXTI_LINE_7
528   *         @arg @ref LL_EXTI_LINE_8
529   *         @arg @ref LL_EXTI_LINE_9
530   *         @arg @ref LL_EXTI_LINE_10
531   *         @arg @ref LL_EXTI_LINE_11
532   *         @arg @ref LL_EXTI_LINE_12
533   *         @arg @ref LL_EXTI_LINE_13
534   *         @arg @ref LL_EXTI_LINE_14
535   *         @arg @ref LL_EXTI_LINE_15
536   *         @arg @ref LL_EXTI_LINE_16
537   *         @arg @ref LL_EXTI_LINE_17
538   *         @arg @ref LL_EXTI_LINE_18
539   *         @arg @ref LL_EXTI_LINE_19
540   *
541   *         @arg @ref LL_EXTI_LINE_21
542   *         @arg @ref LL_EXTI_LINE_22
543   *         @arg @ref LL_EXTI_LINE_23
544   *         @arg @ref LL_EXTI_LINE_24
545   *         @arg @ref LL_EXTI_LINE_25
546   *         @arg @ref LL_EXTI_LINE_26
547   *         @arg @ref LL_EXTI_LINE_27
548   *         @arg @ref LL_EXTI_LINE_28
549   *         @arg @ref LL_EXTI_LINE_29
550   *         @arg @ref LL_EXTI_LINE_30
551   *         @arg @ref LL_EXTI_LINE_31
552   *         @arg @ref LL_EXTI_LINE_ALL_0_31
553   * @retval State of bit (1 or 0).
554   */
LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)555 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)
556 {
557   return ((READ_BIT(EXTI->C2IMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
558 }
559 
560 /**
561   * @brief  Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63
562   * @rmtoll C2IMR2         IMx           LL_EXTI_IsEnabledIT_32_63
563   * @param  ExtiLine This parameter can be one of the following values:
564   *         @arg @ref LL_EXTI_LINE_32
565   *         @arg @ref LL_EXTI_LINE_33
566   *
567   *
568   *         @arg @ref LL_EXTI_LINE_36
569   *         @arg @ref LL_EXTI_LINE_37
570   *         @arg @ref LL_EXTI_LINE_38
571   *         @arg @ref LL_EXTI_LINE_39
572   *         @arg @ref LL_EXTI_LINE_40
573   *         @arg @ref LL_EXTI_LINE_41
574   *         @arg @ref LL_EXTI_LINE_42
575   *         @arg @ref LL_EXTI_LINE_43
576   *         @arg @ref LL_EXTI_LINE_44
577   *
578   *         @arg @ref LL_EXTI_LINE_47
579   *         @arg @ref LL_EXTI_LINE_48
580   *
581   *         @arg @ref LL_EXTI_LINE_50
582   *
583   *         @arg @ref LL_EXTI_LINE_52
584   *         @arg @ref LL_EXTI_LINE_53
585   *         @arg @ref LL_EXTI_LINE_54
586   *         @arg @ref LL_EXTI_LINE_55
587   *         @arg @ref LL_EXTI_LINE_56
588   *         @arg @ref LL_EXTI_LINE_57
589   *         @arg @ref LL_EXTI_LINE_58
590   *         @arg @ref LL_EXTI_LINE_59
591   *         @arg @ref LL_EXTI_LINE_60
592   *         @arg @ref LL_EXTI_LINE_61
593   *         @arg @ref LL_EXTI_LINE_62
594   *         @arg @ref LL_EXTI_LINE_63
595   *         @arg @ref LL_EXTI_LINE_ALL_32_63
596   * @retval State of bit (1 or 0).
597   */
LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine)598 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine)
599 {
600   return ((READ_BIT(EXTI->C2IMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
601 }
602 
603 /**
604   * @brief  Indicate if ExtiLine Interrupt request is enabled for Lines in range 64 to 95
605   * @rmtoll C2IMR3         IMx           LL_EXTI_IsEnabledIT_64_95
606   * @param  ExtiLine This parameter can be one of the following values:
607   *         @arg @ref LL_EXTI_LINE_64
608   *         @arg @ref LL_EXTI_LINE_65
609   *         @arg @ref LL_EXTI_LINE_66
610   *
611   *         @arg @ref LL_EXTI_LINE_68
612   *         @arg @ref LL_EXTI_LINE_69
613   *         @arg @ref LL_EXTI_LINE_70
614   *         @arg @ref LL_EXTI_LINE_71
615   *         @arg @ref LL_EXTI_LINE_72
616   *         @arg @ref LL_EXTI_LINE_73
617   *
618   *         @arg @ref LL_EXTI_LINE_75
619   *         @arg @ref LL_EXTI_LINE_ALL_64_95
620   * @retval State of bit (1 or 0).
621   */
LL_EXTI_IsEnabledIT_64_95(uint32_t ExtiLine)622 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_64_95(uint32_t ExtiLine)
623 {
624   return ((READ_BIT(EXTI->C2IMR3, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
625 }
626 
627 /**
628   * @}
629   */
630 
631 /** @defgroup EXTI_LL_EF_Event_Management Event_Management
632   * @{
633   */
634 
635 /**
636   * @brief  Enable ExtiLine Event request for Lines in range 0 to 31
637   * @rmtoll C2EMR1         EMx           LL_EXTI_EnableEvent_0_31
638   * @param  ExtiLine This parameter can be one of the following values:
639   *         @arg @ref LL_EXTI_LINE_0
640   *         @arg @ref LL_EXTI_LINE_1
641   *         @arg @ref LL_EXTI_LINE_2
642   *         @arg @ref LL_EXTI_LINE_3
643   *         @arg @ref LL_EXTI_LINE_4
644   *         @arg @ref LL_EXTI_LINE_5
645   *         @arg @ref LL_EXTI_LINE_6
646   *         @arg @ref LL_EXTI_LINE_7
647   *         @arg @ref LL_EXTI_LINE_8
648   *         @arg @ref LL_EXTI_LINE_9
649   *         @arg @ref LL_EXTI_LINE_10
650   *         @arg @ref LL_EXTI_LINE_11
651   *         @arg @ref LL_EXTI_LINE_12
652   *         @arg @ref LL_EXTI_LINE_13
653   *         @arg @ref LL_EXTI_LINE_14
654   *         @arg @ref LL_EXTI_LINE_15
655   *
656   *         @arg @ref LL_EXTI_LINE_17
657   *         @arg @ref LL_EXTI_LINE_18
658   *         @arg @ref LL_EXTI_LINE_19
659   *         @arg @ref LL_EXTI_LINE_ALL_0_31
660   * @retval None
661   */
LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)662 __STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)
663 {
664   SET_BIT(EXTI->C2EMR1, ExtiLine);
665 }
666 
667 /**
668   * @brief  Enable ExtiLine Event request for Lines in range 64 to 95
669   * @rmtoll C2EMR3         EMx           LL_EXTI_EnableEvent_64_95
670   * @param  ExtiLine This parameter can be a combination of the following values:
671   *         @arg @ref LL_EXTI_LINE_66
672   *         @arg @ref LL_EXTI_LINE_ALL_64_95
673   * @retval None
674   */
LL_EXTI_EnableEvent_64_95(uint32_t ExtiLine)675 __STATIC_INLINE void LL_EXTI_EnableEvent_64_95(uint32_t ExtiLine)
676 {
677   SET_BIT(EXTI->C2EMR3, ExtiLine);
678 }
679 
680 /**
681   * @brief  Disable ExtiLine Event request for Lines in range 0 to 31
682   * @rmtoll C2EMR1         EMx           LL_EXTI_DisableEvent_0_31
683   * @param  ExtiLine This parameter can be one of the following values:
684   *         @arg @ref LL_EXTI_LINE_0
685   *         @arg @ref LL_EXTI_LINE_1
686   *         @arg @ref LL_EXTI_LINE_2
687   *         @arg @ref LL_EXTI_LINE_3
688   *         @arg @ref LL_EXTI_LINE_4
689   *         @arg @ref LL_EXTI_LINE_5
690   *         @arg @ref LL_EXTI_LINE_6
691   *         @arg @ref LL_EXTI_LINE_7
692   *         @arg @ref LL_EXTI_LINE_8
693   *         @arg @ref LL_EXTI_LINE_9
694   *         @arg @ref LL_EXTI_LINE_10
695   *         @arg @ref LL_EXTI_LINE_11
696   *         @arg @ref LL_EXTI_LINE_12
697   *         @arg @ref LL_EXTI_LINE_13
698   *         @arg @ref LL_EXTI_LINE_14
699   *         @arg @ref LL_EXTI_LINE_15
700   *
701   *         @arg @ref LL_EXTI_LINE_17
702   *         @arg @ref LL_EXTI_LINE_18
703   *         @arg @ref LL_EXTI_LINE_19
704   *         @arg @ref LL_EXTI_LINE_ALL_0_31
705   * @retval None
706   */
LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)707 __STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)
708 {
709   CLEAR_BIT(EXTI->C2EMR1, ExtiLine);
710 }
711 
712 /**
713   * @brief  Disable ExtiLine Event request for Lines in range 64 to 95
714   * @rmtoll C2EMR3         EMx           LL_EXTI_DisableEvent_64_95
715   * @param  ExtiLine This parameter can be a combination of the following values:
716   *         @arg @ref LL_EXTI_LINE_66
717   *         @arg @ref LL_EXTI_LINE_ALL_64_95
718   * @retval None
719   */
LL_EXTI_DisableEvent_64_95(uint32_t ExtiLine)720 __STATIC_INLINE void LL_EXTI_DisableEvent_64_95(uint32_t ExtiLine)
721 {
722   CLEAR_BIT(EXTI->C2EMR3, ExtiLine);
723 }
724 
725 /**
726   * @brief  Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
727   * @rmtoll C2EMR1         EMx           LL_EXTI_IsEnabledEvent_0_31
728   * @param  ExtiLine This parameter can be one 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   *
746   *         @arg @ref LL_EXTI_LINE_17
747   *         @arg @ref LL_EXTI_LINE_18
748   *         @arg @ref LL_EXTI_LINE_19
749   *         @arg @ref LL_EXTI_LINE_ALL_0_31
750   * @note   Please check each device line mapping for EXTI Line availability
751   * @retval State of bit (1 or 0).
752   */
LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)753 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)
754 {
755   return ((READ_BIT(EXTI->C2EMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
756 }
757 
758 /**
759   * @brief  Indicate if ExtiLine Event request is enabled for Lines in range 64 to 95
760   * @rmtoll C2EMR3         EMx           LL_EXTI_IsEnabledEvent_64_95
761   * @param  ExtiLine This parameter can be a combination of the following values:
762   *         @arg @ref LL_EXTI_LINE_66
763   *         @arg @ref LL_EXTI_LINE_ALL_64_95
764   * @retval State of bit (1 or 0).
765   */
LL_EXTI_IsEnabledEvent_64_95(uint32_t ExtiLine)766 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_64_95(uint32_t ExtiLine)
767 {
768   return ((READ_BIT(EXTI->C2EMR3, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
769 }
770 
771 /**
772   * @}
773   */
774 
775 /** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
776   * @{
777   */
778 
779 /**
780   * @brief  Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
781   * @note   The configurable event inputs are edge triggered, no glitch must be
782   *         generated on these inputs.
783   *         If a rising edge on the configurable event input occurs during writing
784   *         of the register, the associated pending bit will not be set.
785   *         Rising and falling edge triggers can be set for the same configurable
786   *         event input. In this case, both edges generate a trigger.
787   * @rmtoll RTSR1        RTx           LL_EXTI_EnableRisingTrig_0_31
788   * @param  ExtiLine This parameter can be a combination of the following values:
789   *         @arg @ref LL_EXTI_LINE_0
790   *         @arg @ref LL_EXTI_LINE_1
791   *         @arg @ref LL_EXTI_LINE_2
792   *         @arg @ref LL_EXTI_LINE_3
793   *         @arg @ref LL_EXTI_LINE_4
794   *         @arg @ref LL_EXTI_LINE_5
795   *         @arg @ref LL_EXTI_LINE_6
796   *         @arg @ref LL_EXTI_LINE_7
797   *         @arg @ref LL_EXTI_LINE_8
798   *         @arg @ref LL_EXTI_LINE_9
799   *         @arg @ref LL_EXTI_LINE_10
800   *         @arg @ref LL_EXTI_LINE_11
801   *         @arg @ref LL_EXTI_LINE_12
802   *         @arg @ref LL_EXTI_LINE_13
803   *         @arg @ref LL_EXTI_LINE_14
804   *         @arg @ref LL_EXTI_LINE_15
805   *         @arg @ref LL_EXTI_LINE_16
806   * @retval None
807   */
LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)808 __STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)
809 {
810   SET_BIT(EXTI->RTSR1, ExtiLine);
811 }
812 
813 /**
814   * @brief  Enable ExtiLine Rising Edge Trigger for Lines in range 64 to 95
815   * @note   The configurable event inputs are edge triggered, no glitch must be
816   *         generated on these inputs.
817   *         If a rising edge on the configurable event input occurs during writing
818   *         of the register, the associated pending bit will not be set.
819   *         Rising and falling edge triggers can be set for the same configurable
820   *         event input. In this case, both edges generate a trigger.
821   * @rmtoll RTSR3        RTx           LL_EXTI_EnableRisingTrig_64_95
822   * @param  ExtiLine This parameter can be a combination of the following values:
823   *         @arg @ref LL_EXTI_LINE_65
824   *         @arg @ref LL_EXTI_LINE_66
825   *         @arg @ref LL_EXTI_LINE_68
826   *
827   *         @arg @ref LL_EXTI_LINE_73
828   * @retval None
829   */
LL_EXTI_EnableRisingTrig_64_95(uint32_t ExtiLine)830 __STATIC_INLINE void LL_EXTI_EnableRisingTrig_64_95(uint32_t ExtiLine)
831 {
832   SET_BIT(EXTI->RTSR3, ExtiLine);
833 }
834 
835 /**
836   * @brief  Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
837   * @note   The configurable event inputs are edge triggered, no glitch must be
838   *         generated on these inputs.
839   *         If a rising edge on the configurable event input occurs during writing
840   *         of the register, the associated pending bit will not be set.
841   *         Rising and falling edge triggers can be set for the same configurable
842   *         event input. In this case, both edges generate a trigger.
843   * @rmtoll RTSR1        RTx           LL_EXTI_DisableRisingTrig_0_31
844   * @param  ExtiLine This parameter can be a combination of the following values:
845   *         @arg @ref LL_EXTI_LINE_0
846   *         @arg @ref LL_EXTI_LINE_1
847   *         @arg @ref LL_EXTI_LINE_2
848   *         @arg @ref LL_EXTI_LINE_3
849   *         @arg @ref LL_EXTI_LINE_4
850   *         @arg @ref LL_EXTI_LINE_5
851   *         @arg @ref LL_EXTI_LINE_6
852   *         @arg @ref LL_EXTI_LINE_7
853   *         @arg @ref LL_EXTI_LINE_8
854   *         @arg @ref LL_EXTI_LINE_9
855   *         @arg @ref LL_EXTI_LINE_10
856   *         @arg @ref LL_EXTI_LINE_11
857   *         @arg @ref LL_EXTI_LINE_12
858   *         @arg @ref LL_EXTI_LINE_13
859   *         @arg @ref LL_EXTI_LINE_14
860   *         @arg @ref LL_EXTI_LINE_15
861   *         @arg @ref LL_EXTI_LINE_16
862   * @retval None
863   */
LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)864 __STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)
865 {
866   CLEAR_BIT(EXTI->RTSR1, ExtiLine);
867 }
868 
869 /**
870   * @brief  Disable ExtiLine Rising Edge Trigger for Lines in range 64 to 95
871   * @note   The configurable event inputs are edge triggered, no glitch must be
872   *         generated on these inputs.
873   *         If a rising edge on the configurable event input occurs during writing
874   *         of the register, the associated pending bit will not be set.
875   *         Rising and falling edge triggers can be set for the same configurable
876   *         event input. In this case, both edges generate a trigger.
877   * @rmtoll RTSR3        RTx           LL_EXTI_DisableRisingTrig_64_95
878   * @param  ExtiLine This parameter can be a combination of the following values:
879   *         @arg @ref LL_EXTI_LINE_65
880   *         @arg @ref LL_EXTI_LINE_66
881   *         @arg @ref LL_EXTI_LINE_68
882   *
883   *         @arg @ref LL_EXTI_LINE_73
884   * @retval None
885   */
LL_EXTI_DisableRisingTrig_64_95(uint32_t ExtiLine)886 __STATIC_INLINE void LL_EXTI_DisableRisingTrig_64_95(uint32_t ExtiLine)
887 {
888   CLEAR_BIT(EXTI->RTSR3, ExtiLine);
889 }
890 
891 /**
892   * @brief  Check if rising edge trigger is enabled for Lines in range 0 to 31
893   * @rmtoll RTSR1        RTx           LL_EXTI_IsEnabledRisingTrig_0_31
894   * @param  ExtiLine This parameter can be a combination of the following values:
895   *         @arg @ref LL_EXTI_LINE_0
896   *         @arg @ref LL_EXTI_LINE_1
897   *         @arg @ref LL_EXTI_LINE_2
898   *         @arg @ref LL_EXTI_LINE_3
899   *         @arg @ref LL_EXTI_LINE_4
900   *         @arg @ref LL_EXTI_LINE_5
901   *         @arg @ref LL_EXTI_LINE_6
902   *         @arg @ref LL_EXTI_LINE_7
903   *         @arg @ref LL_EXTI_LINE_8
904   *         @arg @ref LL_EXTI_LINE_9
905   *         @arg @ref LL_EXTI_LINE_10
906   *         @arg @ref LL_EXTI_LINE_11
907   *         @arg @ref LL_EXTI_LINE_12
908   *         @arg @ref LL_EXTI_LINE_13
909   *         @arg @ref LL_EXTI_LINE_14
910   *         @arg @ref LL_EXTI_LINE_15
911   *         @arg @ref LL_EXTI_LINE_16
912   * @retval State of bit (1 or 0).
913   */
LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)914 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)
915 {
916   return ((READ_BIT(EXTI->RTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
917 }
918 
919 /**
920   * @brief  Check if rising edge trigger is enabled for Lines in range 64 to 95
921   * @rmtoll RTSR3        RTx           LL_EXTI_IsEnabledRisingTrig_64_95
922   * @param  ExtiLine This parameter can be a combination of the following values:
923   *         @arg @ref LL_EXTI_LINE_65
924   *         @arg @ref LL_EXTI_LINE_66
925   *         @arg @ref LL_EXTI_LINE_68
926   *
927   *         @arg @ref LL_EXTI_LINE_73
928   * @retval State of bit (1 or 0).
929   */
LL_EXTI_IsEnabledRisingTrig_64_95(uint32_t ExtiLine)930 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_64_95(uint32_t ExtiLine)
931 {
932   return ((READ_BIT(EXTI->RTSR3, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
933 }
934 
935 /**
936   * @}
937   */
938 
939 /** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
940   * @{
941   */
942 
943 /**
944   * @brief  Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
945   * @note   The configurable event inputs are edge triggered, no glitch must be
946   *         generated on these inputs.
947   *         If a falling edge on the configurable event input occurs during
948   *         writing of the register, the associated pending bit will not be set.
949   *         Rising and falling edge triggers can be set for the same configurable
950   *         event input. In this case, both edges generate a trigger.
951   * @rmtoll FTSR1        FTx           LL_EXTI_EnableFallingTrig_0_31
952   * @param  ExtiLine This parameter can be a combination of the following values:
953   *         @arg @ref LL_EXTI_LINE_0
954   *         @arg @ref LL_EXTI_LINE_1
955   *         @arg @ref LL_EXTI_LINE_2
956   *         @arg @ref LL_EXTI_LINE_3
957   *         @arg @ref LL_EXTI_LINE_4
958   *         @arg @ref LL_EXTI_LINE_5
959   *         @arg @ref LL_EXTI_LINE_6
960   *         @arg @ref LL_EXTI_LINE_7
961   *         @arg @ref LL_EXTI_LINE_8
962   *         @arg @ref LL_EXTI_LINE_9
963   *         @arg @ref LL_EXTI_LINE_10
964   *         @arg @ref LL_EXTI_LINE_11
965   *         @arg @ref LL_EXTI_LINE_12
966   *         @arg @ref LL_EXTI_LINE_13
967   *         @arg @ref LL_EXTI_LINE_14
968   *         @arg @ref LL_EXTI_LINE_15
969   *         @arg @ref LL_EXTI_LINE_16
970   * @note   Please check each device line mapping for EXTI Line availability
971   * @retval None
972   */
LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)973 __STATIC_INLINE void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)
974 {
975   SET_BIT(EXTI->FTSR1, ExtiLine);
976 }
977 
978 /**
979   * @brief  Enable ExtiLine Falling Edge Trigger for Lines in range 64 to 95
980   * @note   The configurable event inputs are edge triggered, no glitch must be
981   *         generated on these inputs.
982   *         If a falling edge on the configurable event input occurs during
983   *         writing of the register, the associated pending bit will not be set.
984   *         Rising and falling edge triggers can be set for the same configurable
985   *         event input. In this case, both edges generate a trigger.
986   * @rmtoll FTSR3        FTx           LL_EXTI_EnableFallingTrig_64_95
987   * @param  ExtiLine This parameter can be a combination of the following values:
988   *         @arg @ref LL_EXTI_LINE_65
989   *         @arg @ref LL_EXTI_LINE_66
990   *
991   *         @arg @ref LL_EXTI_LINE_68
992   *
993   *         @arg @ref LL_EXTI_LINE_73
994   * @retval None
995   */
LL_EXTI_EnableFallingTrig_64_95(uint32_t ExtiLine)996 __STATIC_INLINE void LL_EXTI_EnableFallingTrig_64_95(uint32_t ExtiLine)
997 {
998   SET_BIT(EXTI->FTSR3, ExtiLine);
999 }
1000 
1001 /**
1002   * @brief  Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
1003   * @note   The configurable event inputs are edge triggered, no glitch must be
1004   *         generated on these inputs.
1005   *         If a falling edge on the configurable event input occurs during
1006   *         writing of the register, the associated pending bit will not be set.
1007   *         Rising and falling edge triggers can be set for the same configurable
1008   *         event input. In this case, both edges generate a trigger.
1009   * @rmtoll FTSR1        FTx           LL_EXTI_DisableFallingTrig_0_31
1010   * @param  ExtiLine This parameter can be a combination of the following values:
1011   *         @arg @ref LL_EXTI_LINE_0
1012   *         @arg @ref LL_EXTI_LINE_1
1013   *         @arg @ref LL_EXTI_LINE_2
1014   *         @arg @ref LL_EXTI_LINE_3
1015   *         @arg @ref LL_EXTI_LINE_4
1016   *         @arg @ref LL_EXTI_LINE_5
1017   *         @arg @ref LL_EXTI_LINE_6
1018   *         @arg @ref LL_EXTI_LINE_7
1019   *         @arg @ref LL_EXTI_LINE_8
1020   *         @arg @ref LL_EXTI_LINE_9
1021   *         @arg @ref LL_EXTI_LINE_10
1022   *         @arg @ref LL_EXTI_LINE_11
1023   *         @arg @ref LL_EXTI_LINE_12
1024   *         @arg @ref LL_EXTI_LINE_13
1025   *         @arg @ref LL_EXTI_LINE_14
1026   *         @arg @ref LL_EXTI_LINE_15
1027   *         @arg @ref LL_EXTI_LINE_16
1028   * @note   Please check each device line mapping for EXTI Line availability
1029   * @retval None
1030   */
LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)1031 __STATIC_INLINE void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)
1032 {
1033   CLEAR_BIT(EXTI->FTSR1, ExtiLine);
1034 }
1035 
1036 /**
1037   * @brief  Disable ExtiLine Falling Edge Trigger for Lines in range 64 to 95
1038   * @note   The configurable event inputs are edge triggered, no glitch must be
1039   *         generated on these inputs.
1040   *         If a falling edge on the configurable event input occurs during
1041   *         writing of the register, the associated pending bit will not be set.
1042   *         Rising and falling edge triggers can be set for the same configurable
1043   *         event input. In this case, both edges generate a trigger.
1044   * @rmtoll FTSR3        FTx           LL_EXTI_DisableFallingTrig_64_95
1045   * @param  ExtiLine This parameter can be a combination of the following values:
1046   *         @arg @ref LL_EXTI_LINE_65
1047   *         @arg @ref LL_EXTI_LINE_66
1048   *
1049   *         @arg @ref LL_EXTI_LINE_68
1050   *
1051   *         @arg @ref LL_EXTI_LINE_73
1052     * @retval None
1053   */
LL_EXTI_DisableFallingTrig_64_95(uint32_t ExtiLine)1054 __STATIC_INLINE void LL_EXTI_DisableFallingTrig_64_95(uint32_t ExtiLine)
1055 {
1056   CLEAR_BIT(EXTI->FTSR3, ExtiLine);
1057 }
1058 
1059 /**
1060   * @brief  Check if falling edge trigger is enabled for Lines in range 0 to 31
1061   * @rmtoll FTSR1        FTx           LL_EXTI_IsEnabledFallingTrig_0_31
1062   * @param  ExtiLine This parameter can be a combination of the following values:
1063   *         @arg @ref LL_EXTI_LINE_0
1064   *         @arg @ref LL_EXTI_LINE_1
1065   *         @arg @ref LL_EXTI_LINE_2
1066   *         @arg @ref LL_EXTI_LINE_3
1067   *         @arg @ref LL_EXTI_LINE_4
1068   *         @arg @ref LL_EXTI_LINE_5
1069   *         @arg @ref LL_EXTI_LINE_6
1070   *         @arg @ref LL_EXTI_LINE_7
1071   *         @arg @ref LL_EXTI_LINE_8
1072   *         @arg @ref LL_EXTI_LINE_9
1073   *         @arg @ref LL_EXTI_LINE_10
1074   *         @arg @ref LL_EXTI_LINE_11
1075   *         @arg @ref LL_EXTI_LINE_12
1076   *         @arg @ref LL_EXTI_LINE_13
1077   *         @arg @ref LL_EXTI_LINE_14
1078   *         @arg @ref LL_EXTI_LINE_15
1079   *         @arg @ref LL_EXTI_LINE_16
1080   * @note   Please check each device line mapping for EXTI Line availability
1081   * @retval State of bit (1 or 0).
1082   */
LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine)1083 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine)
1084 {
1085   return ((READ_BIT(EXTI->FTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1086 }
1087 
1088 /**
1089   * @brief  Check if falling edge trigger is enabled for Lines in range 64 to 95
1090   * @rmtoll FTSR3        FTx           LL_EXTI_IsEnabledFallingTrig_64_95
1091   * @param  ExtiLine This parameter can be a combination of the following values:
1092   *         @arg @ref LL_EXTI_LINE_65
1093   *         @arg @ref LL_EXTI_LINE_66
1094   *
1095   *         @arg @ref LL_EXTI_LINE_68
1096   *
1097   *         @arg @ref LL_EXTI_LINE_73
1098   * @retval State of bit (1 or 0).
1099   */
LL_EXTI_IsEnabledFallingTrig_64_95(uint32_t ExtiLine)1100 __STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_64_95(uint32_t ExtiLine)
1101 {
1102   return ((READ_BIT(EXTI->FTSR3, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1103 }
1104 
1105 /**
1106   * @}
1107   */
1108 
1109 /** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
1110   * @{
1111   */
1112 
1113 /**
1114   * @brief  Generate a software Interrupt Event for Lines in range 0 to 31
1115   * @note   A software interrupt is generated independent from the setting in
1116   *         EXTI_RTSR and EXTI_FTSR. Will always return 0 when read.
1117   *         Writing a 1 to this bit will trigger a rising edge event on event x.
1118   *         This bit is auto cleared by HW.
1119   * @rmtoll SWIER1       SWIx          LL_EXTI_GenerateSWI_0_31
1120   * @param  ExtiLine This parameter can be a combination of the following values:
1121   *         @arg @ref LL_EXTI_LINE_0
1122   *         @arg @ref LL_EXTI_LINE_1
1123   *         @arg @ref LL_EXTI_LINE_2
1124   *         @arg @ref LL_EXTI_LINE_3
1125   *         @arg @ref LL_EXTI_LINE_4
1126   *         @arg @ref LL_EXTI_LINE_5
1127   *         @arg @ref LL_EXTI_LINE_6
1128   *         @arg @ref LL_EXTI_LINE_7
1129   *         @arg @ref LL_EXTI_LINE_8
1130   *         @arg @ref LL_EXTI_LINE_9
1131   *         @arg @ref LL_EXTI_LINE_10
1132   *         @arg @ref LL_EXTI_LINE_11
1133   *         @arg @ref LL_EXTI_LINE_12
1134   *         @arg @ref LL_EXTI_LINE_13
1135   *         @arg @ref LL_EXTI_LINE_14
1136   *         @arg @ref LL_EXTI_LINE_15
1137   *         @arg @ref LL_EXTI_LINE_16
1138   * @note   Please check each device line mapping for EXTI Line availability
1139   * @retval None
1140   */
LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)1141 __STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)
1142 {
1143   SET_BIT(EXTI->SWIER1, ExtiLine);
1144 }
1145 
1146 /**
1147   * @brief  Generate a software Interrupt Event for Lines in range 64 to 95
1148   * @note   A software interrupt is generated independent from the setting in
1149   *         EXTI_RTSR and EXTI_FTSR. Will always return 0 when read.
1150   *         Writing a 1 to this bit will trigger a rising edge event on event x.
1151   *         This bit is auto cleared by HW.
1152   * @rmtoll SWIER3       SWIx          LL_EXTI_GenerateSWI_64_95
1153   * @param  ExtiLine This parameter can be a combination of the following values:
1154   *         @arg @ref LL_EXTI_LINE_65
1155   *         @arg @ref LL_EXTI_LINE_66
1156   *
1157   *         @arg @ref LL_EXTI_LINE_68
1158   *
1159   *         @arg @ref LL_EXTI_LINE_73
1160   * @retval None
1161   */
LL_EXTI_GenerateSWI_64_95(uint32_t ExtiLine)1162 __STATIC_INLINE void LL_EXTI_GenerateSWI_64_95(uint32_t ExtiLine)
1163 {
1164   SET_BIT(EXTI->SWIER3, ExtiLine);
1165 }
1166 
1167 /**
1168   * @}
1169   */
1170 
1171 /** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
1172   * @{
1173   */
1174 
1175 /**
1176   * @brief  Check if the ExtLine Rising Flag is set or not for Lines in range 0 to 31
1177   * @note   This bit is set when the rising edge event or an EXTI_SWIER Software
1178   *         trigger arrives on the configurable event line. This bit is cleared
1179   *         by writing a 1 into the bit.
1180   * @rmtoll RPR1          RPIFx           LL_EXTI_IsActiveRisingFlag_0_31
1181   * @param  ExtiLine This parameter can be a combination of the following values:
1182   *         @arg @ref LL_EXTI_LINE_0
1183   *         @arg @ref LL_EXTI_LINE_1
1184   *         @arg @ref LL_EXTI_LINE_2
1185   *         @arg @ref LL_EXTI_LINE_3
1186   *         @arg @ref LL_EXTI_LINE_4
1187   *         @arg @ref LL_EXTI_LINE_5
1188   *         @arg @ref LL_EXTI_LINE_6
1189   *         @arg @ref LL_EXTI_LINE_7
1190   *         @arg @ref LL_EXTI_LINE_8
1191   *         @arg @ref LL_EXTI_LINE_9
1192   *         @arg @ref LL_EXTI_LINE_10
1193   *         @arg @ref LL_EXTI_LINE_11
1194   *         @arg @ref LL_EXTI_LINE_12
1195   *         @arg @ref LL_EXTI_LINE_13
1196   *         @arg @ref LL_EXTI_LINE_14
1197   *         @arg @ref LL_EXTI_LINE_15
1198   *         @arg @ref LL_EXTI_LINE_16
1199   * @retval State of bit (1 or 0).
1200   */
LL_EXTI_IsActiveRisingFlag_0_31(uint32_t ExtiLine)1201 __STATIC_INLINE uint32_t LL_EXTI_IsActiveRisingFlag_0_31(uint32_t ExtiLine)
1202 {
1203   return ((READ_BIT(EXTI->RPR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1204 }
1205 
1206 /**
1207   * @brief  Check if the ExtLine Rising Flag is set or not for Lines in range 64 to 95
1208   * @note   This bit is set when the rising edge event or an EXTI_SWIER Software
1209   *         trigger arrives on the configurable event line. This bit is cleared
1210   *         by writing a 1 into the bit.
1211   * @rmtoll RPR3          RPIFx           LL_EXTI_IsActiveRisingFlag_64_95
1212   * @param  ExtiLine This parameter can be a combination of the following values:
1213   *         @arg @ref LL_EXTI_LINE_65
1214   *         @arg @ref LL_EXTI_LINE_66
1215   *
1216   *         @arg @ref LL_EXTI_LINE_68
1217   *
1218   *         @arg @ref LL_EXTI_LINE_73
1219   * @retval State of bit (1 or 0).
1220   */
LL_EXTI_IsActiveRisingFlag_64_95(uint32_t ExtiLine)1221 __STATIC_INLINE uint32_t LL_EXTI_IsActiveRisingFlag_64_95(uint32_t ExtiLine)
1222 {
1223   return ((READ_BIT(EXTI->RPR3, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1224 }
1225 
1226 /**
1227   * @brief  Check if the ExtLine Falling Flag is set or not for Lines in range 0 to 31
1228   * @note   This bit is set when the falling edge event arrives on the configurable
1229   *         event line. This bit is cleared by writing a 1 into the bit.
1230   * @rmtoll FPR1          FPIFx           LL_EXTI_IsActiveFallingFlag_0_31
1231   * @param  ExtiLine This parameter can be a combination of the following values:
1232   *         @arg @ref LL_EXTI_LINE_0
1233   *         @arg @ref LL_EXTI_LINE_1
1234   *         @arg @ref LL_EXTI_LINE_2
1235   *         @arg @ref LL_EXTI_LINE_3
1236   *         @arg @ref LL_EXTI_LINE_4
1237   *         @arg @ref LL_EXTI_LINE_5
1238   *         @arg @ref LL_EXTI_LINE_6
1239   *         @arg @ref LL_EXTI_LINE_7
1240   *         @arg @ref LL_EXTI_LINE_8
1241   *         @arg @ref LL_EXTI_LINE_9
1242   *         @arg @ref LL_EXTI_LINE_10
1243   *         @arg @ref LL_EXTI_LINE_11
1244   *         @arg @ref LL_EXTI_LINE_12
1245   *         @arg @ref LL_EXTI_LINE_13
1246   *         @arg @ref LL_EXTI_LINE_14
1247   *         @arg @ref LL_EXTI_LINE_15
1248   *         @arg @ref LL_EXTI_LINE_16
1249   * @retval State of bit (1 or 0).
1250   */
LL_EXTI_IsActiveFallingFlag_0_31(uint32_t ExtiLine)1251 __STATIC_INLINE uint32_t LL_EXTI_IsActiveFallingFlag_0_31(uint32_t ExtiLine)
1252 {
1253   return ((READ_BIT(EXTI->FPR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1254 }
1255 
1256 /**
1257   * @brief  Check if the ExtLine Falling Flag is set or not for Lines in range 64 to 95
1258   * @note   This bit is set when the falling edge event arrives on the configurable
1259   *         event line. This bit is cleared by writing a 1 into the bit.
1260   * @rmtoll FPR3          FPIFx           LL_EXTI_IsActiveFallingFlag_64_95
1261   * @param  ExtiLine This parameter can be a combination of the following values:
1262   *         @arg @ref LL_EXTI_LINE_65
1263   *         @arg @ref LL_EXTI_LINE_66
1264   *
1265   *         @arg @ref LL_EXTI_LINE_68
1266   *
1267   *         @arg @ref LL_EXTI_LINE_73
1268   * @retval State of bit (1 or 0).
1269   */
LL_EXTI_IsActiveFallingFlag_64_95(uint32_t ExtiLine)1270 __STATIC_INLINE uint32_t LL_EXTI_IsActiveFallingFlag_64_95(uint32_t ExtiLine)
1271 {
1272   return ((READ_BIT(EXTI->FPR3, ExtiLine) == (ExtiLine)) ? 1UL : 0UL);
1273 }
1274 
1275 /**
1276   * @brief  Read ExtLine Combination Rising Flag for Lines in range 0 to 31
1277   * @note   This bit is set when the rising edge event or an EXTI_SWIER Software
1278   *         trigger arrives on the configurable event line. This bit is cleared
1279   *         by writing a 1 into the bit.
1280   * @rmtoll RPR1          RPIFx           LL_EXTI_ReadRisingFlag_0_31
1281   * @param  ExtiLine This parameter can be a combination of the following values:
1282   *         @arg @ref LL_EXTI_LINE_0
1283   *         @arg @ref LL_EXTI_LINE_1
1284   *         @arg @ref LL_EXTI_LINE_2
1285   *         @arg @ref LL_EXTI_LINE_3
1286   *         @arg @ref LL_EXTI_LINE_4
1287   *         @arg @ref LL_EXTI_LINE_5
1288   *         @arg @ref LL_EXTI_LINE_6
1289   *         @arg @ref LL_EXTI_LINE_7
1290   *         @arg @ref LL_EXTI_LINE_8
1291   *         @arg @ref LL_EXTI_LINE_9
1292   *         @arg @ref LL_EXTI_LINE_10
1293   *         @arg @ref LL_EXTI_LINE_11
1294   *         @arg @ref LL_EXTI_LINE_12
1295   *         @arg @ref LL_EXTI_LINE_13
1296   *         @arg @ref LL_EXTI_LINE_14
1297   *         @arg @ref LL_EXTI_LINE_15
1298   *         @arg @ref LL_EXTI_LINE_16
1299   * @retval @note This bit is set when the selected edge event arrives on the interrupt
1300   */
LL_EXTI_ReadRisingFlag_0_31(uint32_t ExtiLine)1301 __STATIC_INLINE uint32_t LL_EXTI_ReadRisingFlag_0_31(uint32_t ExtiLine)
1302 {
1303   return (uint32_t)(READ_BIT(EXTI->RPR1, ExtiLine));
1304 }
1305 
1306 /**
1307   * @brief  Read ExtLine Combination Rising Flag for Lines in range 64 to 95
1308   * @note   This bit is set when the rising edge event or an EXTI_SWIER Software
1309   *         trigger arrives on the configurable event line. This bit is cleared
1310   *         by writing a 1 into the bit.
1311   * @rmtoll RPR3          RPIFx           LL_EXTI_ReadRisingFlag_64_95
1312   * @param  ExtiLine This parameter can be a combination of the following values:
1313   *         @arg @ref LL_EXTI_LINE_65
1314   *         @arg @ref LL_EXTI_LINE_66
1315   *
1316   *         @arg @ref LL_EXTI_LINE_68
1317   *
1318   *         @arg @ref LL_EXTI_LINE_73
1319   * @retval @note This bit is set when the selected edge event arrives on the interrupt
1320   */
LL_EXTI_ReadRisingFlag_64_95(uint32_t ExtiLine)1321 __STATIC_INLINE uint32_t LL_EXTI_ReadRisingFlag_64_95(uint32_t ExtiLine)
1322 {
1323   return (uint32_t)(READ_BIT(EXTI->RPR3, ExtiLine));
1324 }
1325 
1326 /**
1327   * @brief  Read ExtLine Combination Falling Flag for Lines in range 0 to 31
1328   * @note   This bit is set when the falling edge event arrives on the configurable
1329   *         event line. This bit is cleared by writing a 1 into the bit.
1330   * @rmtoll FPR1          FPIFx           LL_EXTI_ReadFallingFlag_0_31
1331   * @param  ExtiLine This parameter can be a combination of the following values:
1332   *         @arg @ref LL_EXTI_LINE_0
1333   *         @arg @ref LL_EXTI_LINE_1
1334   *         @arg @ref LL_EXTI_LINE_2
1335   *         @arg @ref LL_EXTI_LINE_3
1336   *         @arg @ref LL_EXTI_LINE_4
1337   *         @arg @ref LL_EXTI_LINE_5
1338   *         @arg @ref LL_EXTI_LINE_6
1339   *         @arg @ref LL_EXTI_LINE_7
1340   *         @arg @ref LL_EXTI_LINE_8
1341   *         @arg @ref LL_EXTI_LINE_9
1342   *         @arg @ref LL_EXTI_LINE_10
1343   *         @arg @ref LL_EXTI_LINE_11
1344   *         @arg @ref LL_EXTI_LINE_12
1345   *         @arg @ref LL_EXTI_LINE_13
1346   *         @arg @ref LL_EXTI_LINE_14
1347   *         @arg @ref LL_EXTI_LINE_15
1348   *         @arg @ref LL_EXTI_LINE_16
1349   * @retval @note This bit is set when the selected edge event arrives on the interrupt
1350   */
LL_EXTI_ReadFallingFlag_0_31(uint32_t ExtiLine)1351 __STATIC_INLINE uint32_t LL_EXTI_ReadFallingFlag_0_31(uint32_t ExtiLine)
1352 {
1353   return (uint32_t)(READ_BIT(EXTI->FPR1, ExtiLine));
1354 }
1355 
1356 /**
1357   * @brief  Read ExtLine Combination Falling Flag for Lines in range 64 to 95
1358   * @note   This bit is set when the falling edge event arrives on the configurable
1359   *         event line. This bit is cleared by writing a 1 into the bit.
1360   * @rmtoll FPR3          FPIFx           LL_EXTI_ReadFallingFlag_64_95
1361   * @param  ExtiLine This parameter can be a combination of the following values:
1362   *         @arg @ref LL_EXTI_LINE_65
1363   *         @arg @ref LL_EXTI_LINE_66
1364   *
1365   *         @arg @ref LL_EXTI_LINE_68
1366   *
1367   *         @arg @ref LL_EXTI_LINE_73
1368   * @retval @note This bit is set when the selected edge event arrives on the interrupt
1369   */
LL_EXTI_ReadFallingFlag_64_95(uint32_t ExtiLine)1370 __STATIC_INLINE uint32_t LL_EXTI_ReadFallingFlag_64_95(uint32_t ExtiLine)
1371 {
1372   return (uint32_t)(READ_BIT(EXTI->FPR3, ExtiLine));
1373 }
1374 
1375 /**
1376   * @brief  Clear ExtLine Rising Flags for Lines in range 0 to 31
1377   * @note   This bit is set when the rising edge event or an EXTI_SWIER Software
1378   *         trigger arrives on the configurable event line. This bit is cleared
1379   *         by writing a 1 into the bit.
1380   * @rmtoll RPR1          RPIFx           LL_EXTI_ClearFlag_0_31
1381   * @param  ExtiLine This parameter can be a combination of the following values:
1382   *         @arg @ref LL_EXTI_LINE_0
1383   *         @arg @ref LL_EXTI_LINE_1
1384   *         @arg @ref LL_EXTI_LINE_2
1385   *         @arg @ref LL_EXTI_LINE_3
1386   *         @arg @ref LL_EXTI_LINE_4
1387   *         @arg @ref LL_EXTI_LINE_5
1388   *         @arg @ref LL_EXTI_LINE_6
1389   *         @arg @ref LL_EXTI_LINE_7
1390   *         @arg @ref LL_EXTI_LINE_8
1391   *         @arg @ref LL_EXTI_LINE_9
1392   *         @arg @ref LL_EXTI_LINE_10
1393   *         @arg @ref LL_EXTI_LINE_11
1394   *         @arg @ref LL_EXTI_LINE_12
1395   *         @arg @ref LL_EXTI_LINE_13
1396   *         @arg @ref LL_EXTI_LINE_14
1397   *         @arg @ref LL_EXTI_LINE_15
1398   *         @arg @ref LL_EXTI_LINE_16
1399   * @retval None
1400   */
LL_EXTI_ClearRisingFlag_0_31(uint32_t ExtiLine)1401 __STATIC_INLINE void LL_EXTI_ClearRisingFlag_0_31(uint32_t ExtiLine)
1402 {
1403   WRITE_REG(EXTI->RPR1, ExtiLine);
1404 }
1405 
1406 /**
1407   * @brief  Clear ExtLine Rising Flags for Lines in range 64 to 95
1408   * @note   This bit is set when the rising edge event or an EXTI_SWIER Software
1409   *         trigger arrives on the configurable event line. This bit is cleared
1410   *         by writing a 1 into the bit.
1411   * @rmtoll RPR3          RPIFx           LL_EXTI_ClearFlag_64_95
1412   * @param  ExtiLine This parameter can be a combination of the following values:
1413   *         @arg @ref LL_EXTI_LINE_33
1414   *         @arg @ref LL_EXTI_LINE_40
1415   *         @arg @ref LL_EXTI_LINE_41
1416   * @retval None
1417   */
LL_EXTI_ClearRisingFlag_64_95(uint32_t ExtiLine)1418 __STATIC_INLINE void LL_EXTI_ClearRisingFlag_64_95(uint32_t ExtiLine)
1419 {
1420   WRITE_REG(EXTI->RPR3, ExtiLine);
1421 }
1422 
1423 
1424 /**
1425   * @brief  Clear ExtLine Falling Flags for Lines in range 0 to 31
1426   * @note   This bit is set when the falling edge event arrives on the configurable
1427   *         event line. This bit is cleared by writing a 1 into the bit.
1428   * @rmtoll FPR1          FPIFx           LL_EXTI_ClearFlag_0_31
1429   * @param  ExtiLine This parameter can be a combination of the following values:
1430   *         @arg @ref LL_EXTI_LINE_0
1431   *         @arg @ref LL_EXTI_LINE_1
1432   *         @arg @ref LL_EXTI_LINE_2
1433   *         @arg @ref LL_EXTI_LINE_3
1434   *         @arg @ref LL_EXTI_LINE_4
1435   *         @arg @ref LL_EXTI_LINE_5
1436   *         @arg @ref LL_EXTI_LINE_6
1437   *         @arg @ref LL_EXTI_LINE_7
1438   *         @arg @ref LL_EXTI_LINE_8
1439   *         @arg @ref LL_EXTI_LINE_9
1440   *         @arg @ref LL_EXTI_LINE_10
1441   *         @arg @ref LL_EXTI_LINE_11
1442   *         @arg @ref LL_EXTI_LINE_12
1443   *         @arg @ref LL_EXTI_LINE_13
1444   *         @arg @ref LL_EXTI_LINE_14
1445   *         @arg @ref LL_EXTI_LINE_15
1446   *         @arg @ref LL_EXTI_LINE_16
1447   * @retval None
1448   */
LL_EXTI_ClearFallingFlag_0_31(uint32_t ExtiLine)1449 __STATIC_INLINE void LL_EXTI_ClearFallingFlag_0_31(uint32_t ExtiLine)
1450 {
1451   WRITE_REG(EXTI->FPR1, ExtiLine);
1452 }
1453 
1454 /**
1455   * @brief  Clear ExtLine Falling Flags for Lines in range 64 to 95
1456   * @note   This bit is set when the falling edge event or arrives on the configurable
1457   *         event line. This bit is cleared by writing a 1 into the bit.
1458   * @rmtoll FPR3          FPIFx           LL_EXTI_ClearFlag_64_95
1459   * @param  ExtiLine This parameter can be a combination of the following values:
1460   *         @arg @ref LL_EXTI_LINE_33
1461   *         @arg @ref LL_EXTI_LINE_40
1462   *         @arg @ref LL_EXTI_LINE_41
1463   * @retval None
1464   */
LL_EXTI_ClearFallingFlag_64_95(uint32_t ExtiLine)1465 __STATIC_INLINE void LL_EXTI_ClearFallingFlag_64_95(uint32_t ExtiLine)
1466 {
1467   WRITE_REG(EXTI->FPR3, ExtiLine);
1468 }
1469 
1470 /**
1471   * @}
1472   */
1473 
1474 /** @defgroup EXTI_LL_EF_Config EF configuration functions
1475   * @{
1476   */
1477 
1478 /**
1479   * @brief  Configure source input for the EXTI external interrupt.
1480   * @rmtoll EXTI_EXTICR1 EXTI0         LL_EXTI_SetEXTISource\n
1481   *         EXTI_EXTICR1 EXTI1         LL_EXTI_SetEXTISource\n
1482   *         EXTI_EXTICR1 EXTI2         LL_EXTI_SetEXTISource\n
1483   *         EXTI_EXTICR1 EXTI3         LL_EXTI_SetEXTISource\n
1484   *         EXTI_EXTICR2 EXTI4         LL_EXTI_SetEXTISource\n
1485   *         EXTI_EXTICR2 EXTI5         LL_EXTI_SetEXTISource\n
1486   *         EXTI_EXTICR2 EXTI6         LL_EXTI_SetEXTISource\n
1487   *         EXTI_EXTICR2 EXTI7         LL_EXTI_SetEXTISource\n
1488   *         EXTI_EXTICR3 EXTI8         LL_EXTI_SetEXTISource\n
1489   *         EXTI_EXTICR3 EXTI9         LL_EXTI_SetEXTISource\n
1490   *         EXTI_EXTICR3 EXTI10        LL_EXTI_SetEXTISource\n
1491   *         EXTI_EXTICR3 EXTI11        LL_EXTI_SetEXTISource\n
1492   *         EXTI_EXTICR4 EXTI12        LL_EXTI_SetEXTISource\n
1493   *         EXTI_EXTICR4 EXTI13        LL_EXTI_SetEXTISource\n
1494   *         EXTI_EXTICR4 EXTI14        LL_EXTI_SetEXTISource\n
1495   *         EXTI_EXTICR4 EXTI15        LL_EXTI_SetEXTISource
1496   * @param  Port This parameter can be one of the following values:
1497   *         @arg @ref EXTI_LL_EC_CONFIG_PORT
1498   *
1499   *         (*) value not defined in all devices
1500   * @param  Line This parameter can be one of the following values:
1501   *         @arg @ref LL_EXTI_CONFIG_LINE0
1502   *         @arg @ref LL_EXTI_CONFIG_LINE1
1503   *         @arg @ref LL_EXTI_CONFIG_LINE2
1504   *         @arg @ref LL_EXTI_CONFIG_LINE3
1505   *         @arg @ref LL_EXTI_CONFIG_LINE4
1506   *         @arg @ref LL_EXTI_CONFIG_LINE5
1507   *         @arg @ref LL_EXTI_CONFIG_LINE6
1508   *         @arg @ref LL_EXTI_CONFIG_LINE7
1509   *         @arg @ref LL_EXTI_CONFIG_LINE8
1510   *         @arg @ref LL_EXTI_CONFIG_LINE9
1511   *         @arg @ref LL_EXTI_CONFIG_LINE10
1512   *         @arg @ref LL_EXTI_CONFIG_LINE11
1513   *         @arg @ref LL_EXTI_CONFIG_LINE12
1514   *         @arg @ref LL_EXTI_CONFIG_LINE13
1515   *         @arg @ref LL_EXTI_CONFIG_LINE14
1516   *         @arg @ref LL_EXTI_CONFIG_LINE15
1517   * @retval None
1518   */
LL_EXTI_SetEXTISource(uint32_t Port,uint32_t Line)1519 __STATIC_INLINE void LL_EXTI_SetEXTISource(uint32_t Port, uint32_t Line)
1520 {
1521   MODIFY_REG(EXTI->EXTICR[Line & 0x03u], EXTI_EXTICR1_EXTI0 << (Line >> LL_EXTI_REGISTER_PINPOS_SHFT), Port << (Line >> LL_EXTI_REGISTER_PINPOS_SHFT));
1522 }
1523 
1524 /**
1525   * @brief  Get the configured defined for specific EXTI Line
1526   * @rmtoll EXTI_EXTICR1 EXTI0         LL_EXTI_SetEXTISource\n
1527   *         EXTI_EXTICR1 EXTI1         LL_EXTI_SetEXTISource\n
1528   *         EXTI_EXTICR1 EXTI2         LL_EXTI_SetEXTISource\n
1529   *         EXTI_EXTICR1 EXTI3         LL_EXTI_SetEXTISource\n
1530   *         EXTI_EXTICR2 EXTI4         LL_EXTI_SetEXTISource\n
1531   *         EXTI_EXTICR2 EXTI5         LL_EXTI_SetEXTISource\n
1532   *         EXTI_EXTICR2 EXTI6         LL_EXTI_SetEXTISource\n
1533   *         EXTI_EXTICR2 EXTI7         LL_EXTI_SetEXTISource\n
1534   *         EXTI_EXTICR3 EXTI8         LL_EXTI_SetEXTISource\n
1535   *         EXTI_EXTICR3 EXTI9         LL_EXTI_SetEXTISource\n
1536   *         EXTI_EXTICR3 EXTI10        LL_EXTI_SetEXTISource\n
1537   *         EXTI_EXTICR3 EXTI11        LL_EXTI_SetEXTISource\n
1538   *         EXTI_EXTICR4 EXTI12        LL_EXTI_SetEXTISource\n
1539   *         EXTI_EXTICR4 EXTI13        LL_EXTI_SetEXTISource\n
1540   *         EXTI_EXTICR4 EXTI14        LL_EXTI_SetEXTISource\n
1541   *         EXTI_EXTICR4 EXTI15        LL_EXTI_SetEXTISource
1542   * @param  Line This parameter can be one of the following values:
1543   *         @arg @ref LL_EXTI_CONFIG_LINE0
1544   *         @arg @ref LL_EXTI_CONFIG_LINE1
1545   *         @arg @ref LL_EXTI_CONFIG_LINE2
1546   *         @arg @ref LL_EXTI_CONFIG_LINE3
1547   *         @arg @ref LL_EXTI_CONFIG_LINE4
1548   *         @arg @ref LL_EXTI_CONFIG_LINE5
1549   *         @arg @ref LL_EXTI_CONFIG_LINE6
1550   *         @arg @ref LL_EXTI_CONFIG_LINE7
1551   *         @arg @ref LL_EXTI_CONFIG_LINE8
1552   *         @arg @ref LL_EXTI_CONFIG_LINE9
1553   *         @arg @ref LL_EXTI_CONFIG_LINE10
1554   *         @arg @ref LL_EXTI_CONFIG_LINE11
1555   *         @arg @ref LL_EXTI_CONFIG_LINE12
1556   *         @arg @ref LL_EXTI_CONFIG_LINE13
1557   *         @arg @ref LL_EXTI_CONFIG_LINE14
1558   *         @arg @ref LL_EXTI_CONFIG_LINE15
1559   * @retval Returned value can be one of the following values:
1560   *         @arg @ref EXTI_LL_EC_CONFIG_PORT
1561   *
1562   *         (*) value not defined in all devices
1563   */
LL_EXTI_GetEXTISource(uint32_t Line)1564 __STATIC_INLINE uint32_t LL_EXTI_GetEXTISource(uint32_t Line)
1565 {
1566   return (READ_BIT(EXTI->EXTICR[Line & 0x03u], (EXTI_EXTICR1_EXTI0 << (Line >> LL_EXTI_REGISTER_PINPOS_SHFT))) >> (Line >> LL_EXTI_REGISTER_PINPOS_SHFT));
1567 }
1568 /**
1569   * @}
1570   */
1571 
1572 #if defined(USE_FULL_LL_DRIVER)
1573 /** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
1574   * @{
1575   */
1576 
1577 ErrorStatus LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct);
1578 ErrorStatus LL_EXTI_DeInit(void);
1579 void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct);
1580 
1581 
1582 /**
1583   * @}
1584   */
1585 #endif /* USE_FULL_LL_DRIVER */
1586 
1587 /**
1588   * @}
1589   */
1590 
1591 /**
1592   * @}
1593   */
1594 
1595 #endif /* EXTI */
1596 
1597 /**
1598   * @}
1599   */
1600 
1601 #ifdef __cplusplus
1602 }
1603 #endif
1604 
1605 #endif /* STM32MP1xx_LL_EXTI_H */
1606