提交 | 用户 | age
|
bfc108
|
1 |
/**
|
Q |
2 |
******************************************************************************
|
|
3 |
* @file stm32f0xx_ll_exti.h
|
|
4 |
* @author MCD Application Team
|
|
5 |
* @brief Header file of EXTI LL module.
|
|
6 |
******************************************************************************
|
|
7 |
* @attention
|
|
8 |
*
|
|
9 |
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
|
10 |
*
|
|
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.
|
|
21 |
*
|
|
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.
|
|
32 |
*
|
|
33 |
******************************************************************************
|
|
34 |
*/
|
|
35 |
|
|
36 |
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
37 |
#ifndef __STM32F0xx_LL_EXTI_H
|
|
38 |
#define __STM32F0xx_LL_EXTI_H
|
|
39 |
|
|
40 |
#ifdef __cplusplus
|
|
41 |
extern "C" {
|
|
42 |
#endif
|
|
43 |
|
|
44 |
/* Includes ------------------------------------------------------------------*/
|
|
45 |
#include "stm32f0xx.h"
|
|
46 |
|
|
47 |
/** @addtogroup STM32F0xx_LL_Driver
|
|
48 |
* @{
|
|
49 |
*/
|
|
50 |
|
|
51 |
#if defined (EXTI)
|
|
52 |
|
|
53 |
/** @defgroup EXTI_LL EXTI
|
|
54 |
* @{
|
|
55 |
*/
|
|
56 |
|
|
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
|
|
63 |
* @{
|
|
64 |
*/
|
|
65 |
/**
|
|
66 |
* @}
|
|
67 |
*/
|
|
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
|
|
72 |
* @{
|
|
73 |
*/
|
|
74 |
typedef struct
|
|
75 |
{
|
|
76 |
|
|
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 |
|
|
80 |
FunctionalState LineCommand; /*!< Specifies the new state of the selected EXTI lines.
|
|
81 |
This parameter can be set either to ENABLE or DISABLE */
|
|
82 |
|
|
83 |
uint8_t Mode; /*!< Specifies the mode for the EXTI lines.
|
|
84 |
This parameter can be a value of @ref EXTI_LL_EC_MODE. */
|
|
85 |
|
|
86 |
uint8_t Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
|
|
87 |
This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */
|
|
88 |
} LL_EXTI_InitTypeDef;
|
|
89 |
|
|
90 |
/**
|
|
91 |
* @}
|
|
92 |
*/
|
|
93 |
#endif /*USE_FULL_LL_DRIVER*/
|
|
94 |
|
|
95 |
/* Exported constants --------------------------------------------------------*/
|
|
96 |
/** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants
|
|
97 |
* @{
|
|
98 |
*/
|
|
99 |
|
|
100 |
/** @defgroup EXTI_LL_EC_LINE LINE
|
|
101 |
* @{
|
|
102 |
*/
|
|
103 |
#define LL_EXTI_LINE_0 EXTI_IMR_IM0 /*!< Extended line 0 */
|
|
104 |
#define LL_EXTI_LINE_1 EXTI_IMR_IM1 /*!< Extended line 1 */
|
|
105 |
#define LL_EXTI_LINE_2 EXTI_IMR_IM2 /*!< Extended line 2 */
|
|
106 |
#define LL_EXTI_LINE_3 EXTI_IMR_IM3 /*!< Extended line 3 */
|
|
107 |
#define LL_EXTI_LINE_4 EXTI_IMR_IM4 /*!< Extended line 4 */
|
|
108 |
#define LL_EXTI_LINE_5 EXTI_IMR_IM5 /*!< Extended line 5 */
|
|
109 |
#define LL_EXTI_LINE_6 EXTI_IMR_IM6 /*!< Extended line 6 */
|
|
110 |
#define LL_EXTI_LINE_7 EXTI_IMR_IM7 /*!< Extended line 7 */
|
|
111 |
#define LL_EXTI_LINE_8 EXTI_IMR_IM8 /*!< Extended line 8 */
|
|
112 |
#define LL_EXTI_LINE_9 EXTI_IMR_IM9 /*!< Extended line 9 */
|
|
113 |
#define LL_EXTI_LINE_10 EXTI_IMR_IM10 /*!< Extended line 10 */
|
|
114 |
#define LL_EXTI_LINE_11 EXTI_IMR_IM11 /*!< Extended line 11 */
|
|
115 |
#define LL_EXTI_LINE_12 EXTI_IMR_IM12 /*!< Extended line 12 */
|
|
116 |
#define LL_EXTI_LINE_13 EXTI_IMR_IM13 /*!< Extended line 13 */
|
|
117 |
#define LL_EXTI_LINE_14 EXTI_IMR_IM14 /*!< Extended line 14 */
|
|
118 |
#define LL_EXTI_LINE_15 EXTI_IMR_IM15 /*!< Extended line 15 */
|
|
119 |
#if defined(EXTI_IMR_IM16)
|
|
120 |
#define LL_EXTI_LINE_16 EXTI_IMR_IM16 /*!< Extended line 16 */
|
|
121 |
#endif
|
|
122 |
#define LL_EXTI_LINE_17 EXTI_IMR_IM17 /*!< Extended line 17 */
|
|
123 |
#if defined(EXTI_IMR_IM18)
|
|
124 |
#define LL_EXTI_LINE_18 EXTI_IMR_IM18 /*!< Extended line 18 */
|
|
125 |
#endif
|
|
126 |
#define LL_EXTI_LINE_19 EXTI_IMR_IM19 /*!< Extended line 19 */
|
|
127 |
#if defined(EXTI_IMR_IM20)
|
|
128 |
#define LL_EXTI_LINE_20 EXTI_IMR_IM20 /*!< Extended line 20 */
|
|
129 |
#endif
|
|
130 |
#if defined(EXTI_IMR_IM21)
|
|
131 |
#define LL_EXTI_LINE_21 EXTI_IMR_IM21 /*!< Extended line 21 */
|
|
132 |
#endif
|
|
133 |
#if defined(EXTI_IMR_IM22)
|
|
134 |
#define LL_EXTI_LINE_22 EXTI_IMR_IM22 /*!< Extended line 22 */
|
|
135 |
#endif
|
|
136 |
#define LL_EXTI_LINE_23 EXTI_IMR_IM23 /*!< Extended line 23 */
|
|
137 |
#if defined(EXTI_IMR_IM24)
|
|
138 |
#define LL_EXTI_LINE_24 EXTI_IMR_IM24 /*!< Extended line 24 */
|
|
139 |
#endif
|
|
140 |
#if defined(EXTI_IMR_IM25)
|
|
141 |
#define LL_EXTI_LINE_25 EXTI_IMR_IM25 /*!< Extended line 25 */
|
|
142 |
#endif
|
|
143 |
#if defined(EXTI_IMR_IM26)
|
|
144 |
#define LL_EXTI_LINE_26 EXTI_IMR_IM26 /*!< Extended line 26 */
|
|
145 |
#endif
|
|
146 |
#if defined(EXTI_IMR_IM27)
|
|
147 |
#define LL_EXTI_LINE_27 EXTI_IMR_IM27 /*!< Extended line 27 */
|
|
148 |
#endif
|
|
149 |
#if defined(EXTI_IMR_IM28)
|
|
150 |
#define LL_EXTI_LINE_28 EXTI_IMR_IM28 /*!< Extended line 28 */
|
|
151 |
#endif
|
|
152 |
#if defined(EXTI_IMR_IM29)
|
|
153 |
#define LL_EXTI_LINE_29 EXTI_IMR_IM29 /*!< Extended line 29 */
|
|
154 |
#endif
|
|
155 |
#if defined(EXTI_IMR_IM30)
|
|
156 |
#define LL_EXTI_LINE_30 EXTI_IMR_IM30 /*!< Extended line 30 */
|
|
157 |
#endif
|
|
158 |
#if defined(EXTI_IMR_IM31)
|
|
159 |
#define LL_EXTI_LINE_31 EXTI_IMR_IM31 /*!< Extended line 31 */
|
|
160 |
#endif
|
|
161 |
#define LL_EXTI_LINE_ALL_0_31 EXTI_IMR_IM /*!< All Extended line not reserved*/
|
|
162 |
|
|
163 |
|
|
164 |
#define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
|
|
165 |
|
|
166 |
#if defined(USE_FULL_LL_DRIVER)
|
|
167 |
#define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */
|
|
168 |
#endif /*USE_FULL_LL_DRIVER*/
|
|
169 |
|
|
170 |
/**
|
|
171 |
* @}
|
|
172 |
*/
|
|
173 |
#if defined(USE_FULL_LL_DRIVER)
|
|
174 |
|
|
175 |
/** @defgroup EXTI_LL_EC_MODE Mode
|
|
176 |
* @{
|
|
177 |
*/
|
|
178 |
#define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */
|
|
179 |
#define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */
|
|
180 |
#define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */
|
|
181 |
/**
|
|
182 |
* @}
|
|
183 |
*/
|
|
184 |
|
|
185 |
/** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger
|
|
186 |
* @{
|
|
187 |
*/
|
|
188 |
#define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */
|
|
189 |
#define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */
|
|
190 |
#define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */
|
|
191 |
#define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */
|
|
192 |
|
|
193 |
/**
|
|
194 |
* @}
|
|
195 |
*/
|
|
196 |
|
|
197 |
|
|
198 |
#endif /*USE_FULL_LL_DRIVER*/
|
|
199 |
|
|
200 |
|
|
201 |
/**
|
|
202 |
* @}
|
|
203 |
*/
|
|
204 |
|
|
205 |
/* Exported macro ------------------------------------------------------------*/
|
|
206 |
/** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros
|
|
207 |
* @{
|
|
208 |
*/
|
|
209 |
|
|
210 |
/** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros
|
|
211 |
* @{
|
|
212 |
*/
|
|
213 |
|
|
214 |
/**
|
|
215 |
* @brief Write a value in EXTI register
|
|
216 |
* @param __REG__ Register to be written
|
|
217 |
* @param __VALUE__ Value to be written in the register
|
|
218 |
* @retval None
|
|
219 |
*/
|
|
220 |
#define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__))
|
|
221 |
|
|
222 |
/**
|
|
223 |
* @brief Read a value in EXTI register
|
|
224 |
* @param __REG__ Register to be read
|
|
225 |
* @retval Register value
|
|
226 |
*/
|
|
227 |
#define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__)
|
|
228 |
/**
|
|
229 |
* @}
|
|
230 |
*/
|
|
231 |
|
|
232 |
|
|
233 |
/**
|
|
234 |
* @}
|
|
235 |
*/
|
|
236 |
|
|
237 |
|
|
238 |
|
|
239 |
/* Exported functions --------------------------------------------------------*/
|
|
240 |
/** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions
|
|
241 |
* @{
|
|
242 |
*/
|
|
243 |
/** @defgroup EXTI_LL_EF_IT_Management IT_Management
|
|
244 |
* @{
|
|
245 |
*/
|
|
246 |
|
|
247 |
/**
|
|
248 |
* @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31
|
|
249 |
* @note The reset value for the direct or internal lines (see RM)
|
|
250 |
* is set to 1 in order to enable the interrupt by default.
|
|
251 |
* Bits are set automatically at Power on.
|
|
252 |
* @rmtoll IMR IMx LL_EXTI_EnableIT_0_31
|
|
253 |
* @param ExtiLine This parameter can be one of the following values:
|
|
254 |
* @arg @ref LL_EXTI_LINE_0
|
|
255 |
* @arg @ref LL_EXTI_LINE_1
|
|
256 |
* @arg @ref LL_EXTI_LINE_2
|
|
257 |
* @arg @ref LL_EXTI_LINE_3
|
|
258 |
* @arg @ref LL_EXTI_LINE_4
|
|
259 |
* @arg @ref LL_EXTI_LINE_5
|
|
260 |
* @arg @ref LL_EXTI_LINE_6
|
|
261 |
* @arg @ref LL_EXTI_LINE_7
|
|
262 |
* @arg @ref LL_EXTI_LINE_8
|
|
263 |
* @arg @ref LL_EXTI_LINE_9
|
|
264 |
* @arg @ref LL_EXTI_LINE_10
|
|
265 |
* @arg @ref LL_EXTI_LINE_11
|
|
266 |
* @arg @ref LL_EXTI_LINE_12
|
|
267 |
* @arg @ref LL_EXTI_LINE_13
|
|
268 |
* @arg @ref LL_EXTI_LINE_14
|
|
269 |
* @arg @ref LL_EXTI_LINE_15
|
|
270 |
* @arg @ref LL_EXTI_LINE_16
|
|
271 |
* @arg @ref LL_EXTI_LINE_17
|
|
272 |
* @arg @ref LL_EXTI_LINE_18
|
|
273 |
* @arg @ref LL_EXTI_LINE_19
|
|
274 |
* @arg @ref LL_EXTI_LINE_20
|
|
275 |
* @arg @ref LL_EXTI_LINE_21
|
|
276 |
* @arg @ref LL_EXTI_LINE_22
|
|
277 |
* @arg @ref LL_EXTI_LINE_23
|
|
278 |
* @arg @ref LL_EXTI_LINE_24
|
|
279 |
* @arg @ref LL_EXTI_LINE_25
|
|
280 |
* @arg @ref LL_EXTI_LINE_26
|
|
281 |
* @arg @ref LL_EXTI_LINE_27
|
|
282 |
* @arg @ref LL_EXTI_LINE_28
|
|
283 |
* @arg @ref LL_EXTI_LINE_29
|
|
284 |
* @arg @ref LL_EXTI_LINE_30
|
|
285 |
* @arg @ref LL_EXTI_LINE_31
|
|
286 |
* @arg @ref LL_EXTI_LINE_ALL_0_31
|
|
287 |
* @note Please check each device line mapping for EXTI Line availability
|
|
288 |
* @retval None
|
|
289 |
*/
|
|
290 |
__STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine)
|
|
291 |
{
|
|
292 |
SET_BIT(EXTI->IMR, ExtiLine);
|
|
293 |
}
|
|
294 |
|
|
295 |
/**
|
|
296 |
* @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31
|
|
297 |
* @note The reset value for the direct or internal lines (see RM)
|
|
298 |
* is set to 1 in order to enable the interrupt by default.
|
|
299 |
* Bits are set automatically at Power on.
|
|
300 |
* @rmtoll IMR IMx LL_EXTI_DisableIT_0_31
|
|
301 |
* @param ExtiLine This parameter can be one of the following values:
|
|
302 |
* @arg @ref LL_EXTI_LINE_0
|
|
303 |
* @arg @ref LL_EXTI_LINE_1
|
|
304 |
* @arg @ref LL_EXTI_LINE_2
|
|
305 |
* @arg @ref LL_EXTI_LINE_3
|
|
306 |
* @arg @ref LL_EXTI_LINE_4
|
|
307 |
* @arg @ref LL_EXTI_LINE_5
|
|
308 |
* @arg @ref LL_EXTI_LINE_6
|
|
309 |
* @arg @ref LL_EXTI_LINE_7
|
|
310 |
* @arg @ref LL_EXTI_LINE_8
|
|
311 |
* @arg @ref LL_EXTI_LINE_9
|
|
312 |
* @arg @ref LL_EXTI_LINE_10
|
|
313 |
* @arg @ref LL_EXTI_LINE_11
|
|
314 |
* @arg @ref LL_EXTI_LINE_12
|
|
315 |
* @arg @ref LL_EXTI_LINE_13
|
|
316 |
* @arg @ref LL_EXTI_LINE_14
|
|
317 |
* @arg @ref LL_EXTI_LINE_15
|
|
318 |
* @arg @ref LL_EXTI_LINE_16
|
|
319 |
* @arg @ref LL_EXTI_LINE_17
|
|
320 |
* @arg @ref LL_EXTI_LINE_18
|
|
321 |
* @arg @ref LL_EXTI_LINE_19
|
|
322 |
* @arg @ref LL_EXTI_LINE_20
|
|
323 |
* @arg @ref LL_EXTI_LINE_21
|
|
324 |
* @arg @ref LL_EXTI_LINE_22
|
|
325 |
* @arg @ref LL_EXTI_LINE_23
|
|
326 |
* @arg @ref LL_EXTI_LINE_24
|
|
327 |
* @arg @ref LL_EXTI_LINE_25
|
|
328 |
* @arg @ref LL_EXTI_LINE_26
|
|
329 |
* @arg @ref LL_EXTI_LINE_27
|
|
330 |
* @arg @ref LL_EXTI_LINE_28
|
|
331 |
* @arg @ref LL_EXTI_LINE_29
|
|
332 |
* @arg @ref LL_EXTI_LINE_30
|
|
333 |
* @arg @ref LL_EXTI_LINE_31
|
|
334 |
* @arg @ref LL_EXTI_LINE_ALL_0_31
|
|
335 |
* @note Please check each device line mapping for EXTI Line availability
|
|
336 |
* @retval None
|
|
337 |
*/
|
|
338 |
__STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine)
|
|
339 |
{
|
|
340 |
CLEAR_BIT(EXTI->IMR, ExtiLine);
|
|
341 |
}
|
|
342 |
|
|
343 |
|
|
344 |
/**
|
|
345 |
* @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31
|
|
346 |
* @note The reset value for the direct or internal lines (see RM)
|
|
347 |
* is set to 1 in order to enable the interrupt by default.
|
|
348 |
* Bits are set automatically at Power on.
|
|
349 |
* @rmtoll IMR IMx LL_EXTI_IsEnabledIT_0_31
|
|
350 |
* @param ExtiLine This parameter can be one of the following values:
|
|
351 |
* @arg @ref LL_EXTI_LINE_0
|
|
352 |
* @arg @ref LL_EXTI_LINE_1
|
|
353 |
* @arg @ref LL_EXTI_LINE_2
|
|
354 |
* @arg @ref LL_EXTI_LINE_3
|
|
355 |
* @arg @ref LL_EXTI_LINE_4
|
|
356 |
* @arg @ref LL_EXTI_LINE_5
|
|
357 |
* @arg @ref LL_EXTI_LINE_6
|
|
358 |
* @arg @ref LL_EXTI_LINE_7
|
|
359 |
* @arg @ref LL_EXTI_LINE_8
|
|
360 |
* @arg @ref LL_EXTI_LINE_9
|
|
361 |
* @arg @ref LL_EXTI_LINE_10
|
|
362 |
* @arg @ref LL_EXTI_LINE_11
|
|
363 |
* @arg @ref LL_EXTI_LINE_12
|
|
364 |
* @arg @ref LL_EXTI_LINE_13
|
|
365 |
* @arg @ref LL_EXTI_LINE_14
|
|
366 |
* @arg @ref LL_EXTI_LINE_15
|
|
367 |
* @arg @ref LL_EXTI_LINE_16
|
|
368 |
* @arg @ref LL_EXTI_LINE_17
|
|
369 |
* @arg @ref LL_EXTI_LINE_18
|
|
370 |
* @arg @ref LL_EXTI_LINE_19
|
|
371 |
* @arg @ref LL_EXTI_LINE_20
|
|
372 |
* @arg @ref LL_EXTI_LINE_21
|
|
373 |
* @arg @ref LL_EXTI_LINE_22
|
|
374 |
* @arg @ref LL_EXTI_LINE_23
|
|
375 |
* @arg @ref LL_EXTI_LINE_24
|
|
376 |
* @arg @ref LL_EXTI_LINE_25
|
|
377 |
* @arg @ref LL_EXTI_LINE_26
|
|
378 |
* @arg @ref LL_EXTI_LINE_27
|
|
379 |
* @arg @ref LL_EXTI_LINE_28
|
|
380 |
* @arg @ref LL_EXTI_LINE_29
|
|
381 |
* @arg @ref LL_EXTI_LINE_30
|
|
382 |
* @arg @ref LL_EXTI_LINE_31
|
|
383 |
* @arg @ref LL_EXTI_LINE_ALL_0_31
|
|
384 |
* @note Please check each device line mapping for EXTI Line availability
|
|
385 |
* @retval State of bit (1 or 0).
|
|
386 |
*/
|
|
387 |
__STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine)
|
|
388 |
{
|
|
389 |
return (READ_BIT(EXTI->IMR, ExtiLine) == (ExtiLine));
|
|
390 |
}
|
|
391 |
|
|
392 |
|
|
393 |
/**
|
|
394 |
* @}
|
|
395 |
*/
|
|
396 |
|
|
397 |
/** @defgroup EXTI_LL_EF_Event_Management Event_Management
|
|
398 |
* @{
|
|
399 |
*/
|
|
400 |
|
|
401 |
/**
|
|
402 |
* @brief Enable ExtiLine Event request for Lines in range 0 to 31
|
|
403 |
* @rmtoll EMR EMx LL_EXTI_EnableEvent_0_31
|
|
404 |
* @param ExtiLine This parameter can be one of the following values:
|
|
405 |
* @arg @ref LL_EXTI_LINE_0
|
|
406 |
* @arg @ref LL_EXTI_LINE_1
|
|
407 |
* @arg @ref LL_EXTI_LINE_2
|
|
408 |
* @arg @ref LL_EXTI_LINE_3
|
|
409 |
* @arg @ref LL_EXTI_LINE_4
|
|
410 |
* @arg @ref LL_EXTI_LINE_5
|
|
411 |
* @arg @ref LL_EXTI_LINE_6
|
|
412 |
* @arg @ref LL_EXTI_LINE_7
|
|
413 |
* @arg @ref LL_EXTI_LINE_8
|
|
414 |
* @arg @ref LL_EXTI_LINE_9
|
|
415 |
* @arg @ref LL_EXTI_LINE_10
|
|
416 |
* @arg @ref LL_EXTI_LINE_11
|
|
417 |
* @arg @ref LL_EXTI_LINE_12
|
|
418 |
* @arg @ref LL_EXTI_LINE_13
|
|
419 |
* @arg @ref LL_EXTI_LINE_14
|
|
420 |
* @arg @ref LL_EXTI_LINE_15
|
|
421 |
* @arg @ref LL_EXTI_LINE_16
|
|
422 |
* @arg @ref LL_EXTI_LINE_17
|
|
423 |
* @arg @ref LL_EXTI_LINE_18
|
|
424 |
* @arg @ref LL_EXTI_LINE_19
|
|
425 |
* @arg @ref LL_EXTI_LINE_20
|
|
426 |
* @arg @ref LL_EXTI_LINE_21
|
|
427 |
* @arg @ref LL_EXTI_LINE_22
|
|
428 |
* @arg @ref LL_EXTI_LINE_23
|
|
429 |
* @arg @ref LL_EXTI_LINE_24
|
|
430 |
* @arg @ref LL_EXTI_LINE_25
|
|
431 |
* @arg @ref LL_EXTI_LINE_26
|
|
432 |
* @arg @ref LL_EXTI_LINE_27
|
|
433 |
* @arg @ref LL_EXTI_LINE_28
|
|
434 |
* @arg @ref LL_EXTI_LINE_29
|
|
435 |
* @arg @ref LL_EXTI_LINE_30
|
|
436 |
* @arg @ref LL_EXTI_LINE_31
|
|
437 |
* @arg @ref LL_EXTI_LINE_ALL_0_31
|
|
438 |
* @note Please check each device line mapping for EXTI Line availability
|
|
439 |
* @retval None
|
|
440 |
*/
|
|
441 |
__STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine)
|
|
442 |
{
|
|
443 |
SET_BIT(EXTI->EMR, ExtiLine);
|
|
444 |
|
|
445 |
}
|
|
446 |
|
|
447 |
|
|
448 |
/**
|
|
449 |
* @brief Disable ExtiLine Event request for Lines in range 0 to 31
|
|
450 |
* @rmtoll EMR EMx LL_EXTI_DisableEvent_0_31
|
|
451 |
* @param ExtiLine This parameter can be one of the following values:
|
|
452 |
* @arg @ref LL_EXTI_LINE_0
|
|
453 |
* @arg @ref LL_EXTI_LINE_1
|
|
454 |
* @arg @ref LL_EXTI_LINE_2
|
|
455 |
* @arg @ref LL_EXTI_LINE_3
|
|
456 |
* @arg @ref LL_EXTI_LINE_4
|
|
457 |
* @arg @ref LL_EXTI_LINE_5
|
|
458 |
* @arg @ref LL_EXTI_LINE_6
|
|
459 |
* @arg @ref LL_EXTI_LINE_7
|
|
460 |
* @arg @ref LL_EXTI_LINE_8
|
|
461 |
* @arg @ref LL_EXTI_LINE_9
|
|
462 |
* @arg @ref LL_EXTI_LINE_10
|
|
463 |
* @arg @ref LL_EXTI_LINE_11
|
|
464 |
* @arg @ref LL_EXTI_LINE_12
|
|
465 |
* @arg @ref LL_EXTI_LINE_13
|
|
466 |
* @arg @ref LL_EXTI_LINE_14
|
|
467 |
* @arg @ref LL_EXTI_LINE_15
|
|
468 |
* @arg @ref LL_EXTI_LINE_16
|
|
469 |
* @arg @ref LL_EXTI_LINE_17
|
|
470 |
* @arg @ref LL_EXTI_LINE_18
|
|
471 |
* @arg @ref LL_EXTI_LINE_19
|
|
472 |
* @arg @ref LL_EXTI_LINE_20
|
|
473 |
* @arg @ref LL_EXTI_LINE_21
|
|
474 |
* @arg @ref LL_EXTI_LINE_22
|
|
475 |
* @arg @ref LL_EXTI_LINE_23
|
|
476 |
* @arg @ref LL_EXTI_LINE_24
|
|
477 |
* @arg @ref LL_EXTI_LINE_25
|
|
478 |
* @arg @ref LL_EXTI_LINE_26
|
|
479 |
* @arg @ref LL_EXTI_LINE_27
|
|
480 |
* @arg @ref LL_EXTI_LINE_28
|
|
481 |
* @arg @ref LL_EXTI_LINE_29
|
|
482 |
* @arg @ref LL_EXTI_LINE_30
|
|
483 |
* @arg @ref LL_EXTI_LINE_31
|
|
484 |
* @arg @ref LL_EXTI_LINE_ALL_0_31
|
|
485 |
* @note Please check each device line mapping for EXTI Line availability
|
|
486 |
* @retval None
|
|
487 |
*/
|
|
488 |
__STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine)
|
|
489 |
{
|
|
490 |
CLEAR_BIT(EXTI->EMR, ExtiLine);
|
|
491 |
}
|
|
492 |
|
|
493 |
|
|
494 |
/**
|
|
495 |
* @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31
|
|
496 |
* @rmtoll EMR EMx LL_EXTI_IsEnabledEvent_0_31
|
|
497 |
* @param ExtiLine This parameter can be one of the following values:
|
|
498 |
* @arg @ref LL_EXTI_LINE_0
|
|
499 |
* @arg @ref LL_EXTI_LINE_1
|
|
500 |
* @arg @ref LL_EXTI_LINE_2
|
|
501 |
* @arg @ref LL_EXTI_LINE_3
|
|
502 |
* @arg @ref LL_EXTI_LINE_4
|
|
503 |
* @arg @ref LL_EXTI_LINE_5
|
|
504 |
* @arg @ref LL_EXTI_LINE_6
|
|
505 |
* @arg @ref LL_EXTI_LINE_7
|
|
506 |
* @arg @ref LL_EXTI_LINE_8
|
|
507 |
* @arg @ref LL_EXTI_LINE_9
|
|
508 |
* @arg @ref LL_EXTI_LINE_10
|
|
509 |
* @arg @ref LL_EXTI_LINE_11
|
|
510 |
* @arg @ref LL_EXTI_LINE_12
|
|
511 |
* @arg @ref LL_EXTI_LINE_13
|
|
512 |
* @arg @ref LL_EXTI_LINE_14
|
|
513 |
* @arg @ref LL_EXTI_LINE_15
|
|
514 |
* @arg @ref LL_EXTI_LINE_16
|
|
515 |
* @arg @ref LL_EXTI_LINE_17
|
|
516 |
* @arg @ref LL_EXTI_LINE_18
|
|
517 |
* @arg @ref LL_EXTI_LINE_19
|
|
518 |
* @arg @ref LL_EXTI_LINE_20
|
|
519 |
* @arg @ref LL_EXTI_LINE_21
|
|
520 |
* @arg @ref LL_EXTI_LINE_22
|
|
521 |
* @arg @ref LL_EXTI_LINE_23
|
|
522 |
* @arg @ref LL_EXTI_LINE_24
|
|
523 |
* @arg @ref LL_EXTI_LINE_25
|
|
524 |
* @arg @ref LL_EXTI_LINE_26
|
|
525 |
* @arg @ref LL_EXTI_LINE_27
|
|
526 |
* @arg @ref LL_EXTI_LINE_28
|
|
527 |
* @arg @ref LL_EXTI_LINE_29
|
|
528 |
* @arg @ref LL_EXTI_LINE_30
|
|
529 |
* @arg @ref LL_EXTI_LINE_31
|
|
530 |
* @arg @ref LL_EXTI_LINE_ALL_0_31
|
|
531 |
* @note Please check each device line mapping for EXTI Line availability
|
|
532 |
* @retval State of bit (1 or 0).
|
|
533 |
*/
|
|
534 |
__STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine)
|
|
535 |
{
|
|
536 |
return (READ_BIT(EXTI->EMR, ExtiLine) == (ExtiLine));
|
|
537 |
|
|
538 |
}
|
|
539 |
|
|
540 |
|
|
541 |
/**
|
|
542 |
* @}
|
|
543 |
*/
|
|
544 |
|
|
545 |
/** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management
|
|
546 |
* @{
|
|
547 |
*/
|
|
548 |
|
|
549 |
/**
|
|
550 |
* @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
|
|
551 |
* @note The configurable wakeup lines are edge-triggered. No glitch must be
|
|
552 |
* generated on these lines. If a rising edge on a configurable interrupt
|
|
553 |
* line occurs during a write operation in the EXTI_RTSR register, the
|
|
554 |
* pending bit is not set.
|
|
555 |
* Rising and falling edge triggers can be set for
|
|
556 |
* the same interrupt line. In this case, both generate a trigger
|
|
557 |
* condition.
|
|
558 |
* @rmtoll RTSR RTx LL_EXTI_EnableRisingTrig_0_31
|
|
559 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
560 |
* @arg @ref LL_EXTI_LINE_0
|
|
561 |
* @arg @ref LL_EXTI_LINE_1
|
|
562 |
* @arg @ref LL_EXTI_LINE_2
|
|
563 |
* @arg @ref LL_EXTI_LINE_3
|
|
564 |
* @arg @ref LL_EXTI_LINE_4
|
|
565 |
* @arg @ref LL_EXTI_LINE_5
|
|
566 |
* @arg @ref LL_EXTI_LINE_6
|
|
567 |
* @arg @ref LL_EXTI_LINE_7
|
|
568 |
* @arg @ref LL_EXTI_LINE_8
|
|
569 |
* @arg @ref LL_EXTI_LINE_9
|
|
570 |
* @arg @ref LL_EXTI_LINE_10
|
|
571 |
* @arg @ref LL_EXTI_LINE_11
|
|
572 |
* @arg @ref LL_EXTI_LINE_12
|
|
573 |
* @arg @ref LL_EXTI_LINE_13
|
|
574 |
* @arg @ref LL_EXTI_LINE_14
|
|
575 |
* @arg @ref LL_EXTI_LINE_15
|
|
576 |
* @arg @ref LL_EXTI_LINE_16
|
|
577 |
* @arg @ref LL_EXTI_LINE_18
|
|
578 |
* @arg @ref LL_EXTI_LINE_19
|
|
579 |
* @arg @ref LL_EXTI_LINE_20
|
|
580 |
* @arg @ref LL_EXTI_LINE_21
|
|
581 |
* @arg @ref LL_EXTI_LINE_22
|
|
582 |
* @arg @ref LL_EXTI_LINE_29
|
|
583 |
* @arg @ref LL_EXTI_LINE_30
|
|
584 |
* @arg @ref LL_EXTI_LINE_31
|
|
585 |
* @note Please check each device line mapping for EXTI Line availability
|
|
586 |
* @retval None
|
|
587 |
*/
|
|
588 |
__STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine)
|
|
589 |
{
|
|
590 |
SET_BIT(EXTI->RTSR, ExtiLine);
|
|
591 |
|
|
592 |
}
|
|
593 |
|
|
594 |
|
|
595 |
/**
|
|
596 |
* @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31
|
|
597 |
* @note The configurable wakeup lines are edge-triggered. No glitch must be
|
|
598 |
* generated on these lines. If a rising edge on a configurable interrupt
|
|
599 |
* line occurs during a write operation in the EXTI_RTSR register, the
|
|
600 |
* pending bit is not set.
|
|
601 |
* Rising and falling edge triggers can be set for
|
|
602 |
* the same interrupt line. In this case, both generate a trigger
|
|
603 |
* condition.
|
|
604 |
* @rmtoll RTSR RTx LL_EXTI_DisableRisingTrig_0_31
|
|
605 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
606 |
* @arg @ref LL_EXTI_LINE_0
|
|
607 |
* @arg @ref LL_EXTI_LINE_1
|
|
608 |
* @arg @ref LL_EXTI_LINE_2
|
|
609 |
* @arg @ref LL_EXTI_LINE_3
|
|
610 |
* @arg @ref LL_EXTI_LINE_4
|
|
611 |
* @arg @ref LL_EXTI_LINE_5
|
|
612 |
* @arg @ref LL_EXTI_LINE_6
|
|
613 |
* @arg @ref LL_EXTI_LINE_7
|
|
614 |
* @arg @ref LL_EXTI_LINE_8
|
|
615 |
* @arg @ref LL_EXTI_LINE_9
|
|
616 |
* @arg @ref LL_EXTI_LINE_10
|
|
617 |
* @arg @ref LL_EXTI_LINE_11
|
|
618 |
* @arg @ref LL_EXTI_LINE_12
|
|
619 |
* @arg @ref LL_EXTI_LINE_13
|
|
620 |
* @arg @ref LL_EXTI_LINE_14
|
|
621 |
* @arg @ref LL_EXTI_LINE_15
|
|
622 |
* @arg @ref LL_EXTI_LINE_16
|
|
623 |
* @arg @ref LL_EXTI_LINE_18
|
|
624 |
* @arg @ref LL_EXTI_LINE_19
|
|
625 |
* @arg @ref LL_EXTI_LINE_20
|
|
626 |
* @arg @ref LL_EXTI_LINE_21
|
|
627 |
* @arg @ref LL_EXTI_LINE_22
|
|
628 |
* @arg @ref LL_EXTI_LINE_29
|
|
629 |
* @arg @ref LL_EXTI_LINE_30
|
|
630 |
* @arg @ref LL_EXTI_LINE_31
|
|
631 |
* @note Please check each device line mapping for EXTI Line availability
|
|
632 |
* @retval None
|
|
633 |
*/
|
|
634 |
__STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine)
|
|
635 |
{
|
|
636 |
CLEAR_BIT(EXTI->RTSR, ExtiLine);
|
|
637 |
|
|
638 |
}
|
|
639 |
|
|
640 |
|
|
641 |
/**
|
|
642 |
* @brief Check if rising edge trigger is enabled for Lines in range 0 to 31
|
|
643 |
* @rmtoll RTSR RTx LL_EXTI_IsEnabledRisingTrig_0_31
|
|
644 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
645 |
* @arg @ref LL_EXTI_LINE_0
|
|
646 |
* @arg @ref LL_EXTI_LINE_1
|
|
647 |
* @arg @ref LL_EXTI_LINE_2
|
|
648 |
* @arg @ref LL_EXTI_LINE_3
|
|
649 |
* @arg @ref LL_EXTI_LINE_4
|
|
650 |
* @arg @ref LL_EXTI_LINE_5
|
|
651 |
* @arg @ref LL_EXTI_LINE_6
|
|
652 |
* @arg @ref LL_EXTI_LINE_7
|
|
653 |
* @arg @ref LL_EXTI_LINE_8
|
|
654 |
* @arg @ref LL_EXTI_LINE_9
|
|
655 |
* @arg @ref LL_EXTI_LINE_10
|
|
656 |
* @arg @ref LL_EXTI_LINE_11
|
|
657 |
* @arg @ref LL_EXTI_LINE_12
|
|
658 |
* @arg @ref LL_EXTI_LINE_13
|
|
659 |
* @arg @ref LL_EXTI_LINE_14
|
|
660 |
* @arg @ref LL_EXTI_LINE_15
|
|
661 |
* @arg @ref LL_EXTI_LINE_16
|
|
662 |
* @arg @ref LL_EXTI_LINE_18
|
|
663 |
* @arg @ref LL_EXTI_LINE_19
|
|
664 |
* @arg @ref LL_EXTI_LINE_20
|
|
665 |
* @arg @ref LL_EXTI_LINE_21
|
|
666 |
* @arg @ref LL_EXTI_LINE_22
|
|
667 |
* @arg @ref LL_EXTI_LINE_29
|
|
668 |
* @arg @ref LL_EXTI_LINE_30
|
|
669 |
* @arg @ref LL_EXTI_LINE_31
|
|
670 |
* @note Please check each device line mapping for EXTI Line availability
|
|
671 |
* @retval State of bit (1 or 0).
|
|
672 |
*/
|
|
673 |
__STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine)
|
|
674 |
{
|
|
675 |
return (READ_BIT(EXTI->RTSR, ExtiLine) == (ExtiLine));
|
|
676 |
}
|
|
677 |
|
|
678 |
|
|
679 |
/**
|
|
680 |
* @}
|
|
681 |
*/
|
|
682 |
|
|
683 |
/** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management
|
|
684 |
* @{
|
|
685 |
*/
|
|
686 |
|
|
687 |
/**
|
|
688 |
* @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
|
|
689 |
* @note The configurable wakeup lines are edge-triggered. No glitch must be
|
|
690 |
* generated on these lines. If a falling edge on a configurable interrupt
|
|
691 |
* line occurs during a write operation in the EXTI_FTSR register, the
|
|
692 |
* pending bit is not set.
|
|
693 |
* Rising and falling edge triggers can be set for
|
|
694 |
* the same interrupt line. In this case, both generate a trigger
|
|
695 |
* condition.
|
|
696 |
* @rmtoll FTSR FTx LL_EXTI_EnableFallingTrig_0_31
|
|
697 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
698 |
* @arg @ref LL_EXTI_LINE_0
|
|
699 |
* @arg @ref LL_EXTI_LINE_1
|
|
700 |
* @arg @ref LL_EXTI_LINE_2
|
|
701 |
* @arg @ref LL_EXTI_LINE_3
|
|
702 |
* @arg @ref LL_EXTI_LINE_4
|
|
703 |
* @arg @ref LL_EXTI_LINE_5
|
|
704 |
* @arg @ref LL_EXTI_LINE_6
|
|
705 |
* @arg @ref LL_EXTI_LINE_7
|
|
706 |
* @arg @ref LL_EXTI_LINE_8
|
|
707 |
* @arg @ref LL_EXTI_LINE_9
|
|
708 |
* @arg @ref LL_EXTI_LINE_10
|
|
709 |
* @arg @ref LL_EXTI_LINE_11
|
|
710 |
* @arg @ref LL_EXTI_LINE_12
|
|
711 |
* @arg @ref LL_EXTI_LINE_13
|
|
712 |
* @arg @ref LL_EXTI_LINE_14
|
|
713 |
* @arg @ref LL_EXTI_LINE_15
|
|
714 |
* @arg @ref LL_EXTI_LINE_16
|
|
715 |
* @arg @ref LL_EXTI_LINE_18
|
|
716 |
* @arg @ref LL_EXTI_LINE_19
|
|
717 |
* @arg @ref LL_EXTI_LINE_20
|
|
718 |
* @arg @ref LL_EXTI_LINE_21
|
|
719 |
* @arg @ref LL_EXTI_LINE_22
|
|
720 |
* @arg @ref LL_EXTI_LINE_29
|
|
721 |
* @arg @ref LL_EXTI_LINE_30
|
|
722 |
* @arg @ref LL_EXTI_LINE_31
|
|
723 |
* @note Please check each device line mapping for EXTI Line availability
|
|
724 |
* @retval None
|
|
725 |
*/
|
|
726 |
__STATIC_INLINE void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine)
|
|
727 |
{
|
|
728 |
SET_BIT(EXTI->FTSR, ExtiLine);
|
|
729 |
}
|
|
730 |
|
|
731 |
|
|
732 |
/**
|
|
733 |
* @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31
|
|
734 |
* @note The configurable wakeup lines are edge-triggered. No glitch must be
|
|
735 |
* generated on these lines. If a Falling edge on a configurable interrupt
|
|
736 |
* line occurs during a write operation in the EXTI_FTSR register, the
|
|
737 |
* pending bit is not set.
|
|
738 |
* Rising and falling edge triggers can be set for the same interrupt line.
|
|
739 |
* In this case, both generate a trigger condition.
|
|
740 |
* @rmtoll FTSR FTx LL_EXTI_DisableFallingTrig_0_31
|
|
741 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
742 |
* @arg @ref LL_EXTI_LINE_0
|
|
743 |
* @arg @ref LL_EXTI_LINE_1
|
|
744 |
* @arg @ref LL_EXTI_LINE_2
|
|
745 |
* @arg @ref LL_EXTI_LINE_3
|
|
746 |
* @arg @ref LL_EXTI_LINE_4
|
|
747 |
* @arg @ref LL_EXTI_LINE_5
|
|
748 |
* @arg @ref LL_EXTI_LINE_6
|
|
749 |
* @arg @ref LL_EXTI_LINE_7
|
|
750 |
* @arg @ref LL_EXTI_LINE_8
|
|
751 |
* @arg @ref LL_EXTI_LINE_9
|
|
752 |
* @arg @ref LL_EXTI_LINE_10
|
|
753 |
* @arg @ref LL_EXTI_LINE_11
|
|
754 |
* @arg @ref LL_EXTI_LINE_12
|
|
755 |
* @arg @ref LL_EXTI_LINE_13
|
|
756 |
* @arg @ref LL_EXTI_LINE_14
|
|
757 |
* @arg @ref LL_EXTI_LINE_15
|
|
758 |
* @arg @ref LL_EXTI_LINE_16
|
|
759 |
* @arg @ref LL_EXTI_LINE_18
|
|
760 |
* @arg @ref LL_EXTI_LINE_19
|
|
761 |
* @arg @ref LL_EXTI_LINE_20
|
|
762 |
* @arg @ref LL_EXTI_LINE_21
|
|
763 |
* @arg @ref LL_EXTI_LINE_22
|
|
764 |
* @arg @ref LL_EXTI_LINE_29
|
|
765 |
* @arg @ref LL_EXTI_LINE_30
|
|
766 |
* @arg @ref LL_EXTI_LINE_31
|
|
767 |
* @note Please check each device line mapping for EXTI Line availability
|
|
768 |
* @retval None
|
|
769 |
*/
|
|
770 |
__STATIC_INLINE void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine)
|
|
771 |
{
|
|
772 |
CLEAR_BIT(EXTI->FTSR, ExtiLine);
|
|
773 |
}
|
|
774 |
|
|
775 |
|
|
776 |
/**
|
|
777 |
* @brief Check if falling edge trigger is enabled for Lines in range 0 to 31
|
|
778 |
* @rmtoll FTSR FTx LL_EXTI_IsEnabledFallingTrig_0_31
|
|
779 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
780 |
* @arg @ref LL_EXTI_LINE_0
|
|
781 |
* @arg @ref LL_EXTI_LINE_1
|
|
782 |
* @arg @ref LL_EXTI_LINE_2
|
|
783 |
* @arg @ref LL_EXTI_LINE_3
|
|
784 |
* @arg @ref LL_EXTI_LINE_4
|
|
785 |
* @arg @ref LL_EXTI_LINE_5
|
|
786 |
* @arg @ref LL_EXTI_LINE_6
|
|
787 |
* @arg @ref LL_EXTI_LINE_7
|
|
788 |
* @arg @ref LL_EXTI_LINE_8
|
|
789 |
* @arg @ref LL_EXTI_LINE_9
|
|
790 |
* @arg @ref LL_EXTI_LINE_10
|
|
791 |
* @arg @ref LL_EXTI_LINE_11
|
|
792 |
* @arg @ref LL_EXTI_LINE_12
|
|
793 |
* @arg @ref LL_EXTI_LINE_13
|
|
794 |
* @arg @ref LL_EXTI_LINE_14
|
|
795 |
* @arg @ref LL_EXTI_LINE_15
|
|
796 |
* @arg @ref LL_EXTI_LINE_16
|
|
797 |
* @arg @ref LL_EXTI_LINE_18
|
|
798 |
* @arg @ref LL_EXTI_LINE_19
|
|
799 |
* @arg @ref LL_EXTI_LINE_20
|
|
800 |
* @arg @ref LL_EXTI_LINE_21
|
|
801 |
* @arg @ref LL_EXTI_LINE_22
|
|
802 |
* @arg @ref LL_EXTI_LINE_29
|
|
803 |
* @arg @ref LL_EXTI_LINE_30
|
|
804 |
* @arg @ref LL_EXTI_LINE_31
|
|
805 |
* @note Please check each device line mapping for EXTI Line availability
|
|
806 |
* @retval State of bit (1 or 0).
|
|
807 |
*/
|
|
808 |
__STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine)
|
|
809 |
{
|
|
810 |
return (READ_BIT(EXTI->FTSR, ExtiLine) == (ExtiLine));
|
|
811 |
}
|
|
812 |
|
|
813 |
|
|
814 |
/**
|
|
815 |
* @}
|
|
816 |
*/
|
|
817 |
|
|
818 |
/** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management
|
|
819 |
* @{
|
|
820 |
*/
|
|
821 |
|
|
822 |
/**
|
|
823 |
* @brief Generate a software Interrupt Event for Lines in range 0 to 31
|
|
824 |
* @note If the interrupt is enabled on this line in the EXTI_IMR, writing a 1 to
|
|
825 |
* this bit when it is at '0' sets the corresponding pending bit in EXTI_PR
|
|
826 |
* resulting in an interrupt request generation.
|
|
827 |
* This bit is cleared by clearing the corresponding bit in the EXTI_PR
|
|
828 |
* register (by writing a 1 into the bit)
|
|
829 |
* @rmtoll SWIER SWIx LL_EXTI_GenerateSWI_0_31
|
|
830 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
831 |
* @arg @ref LL_EXTI_LINE_0
|
|
832 |
* @arg @ref LL_EXTI_LINE_1
|
|
833 |
* @arg @ref LL_EXTI_LINE_2
|
|
834 |
* @arg @ref LL_EXTI_LINE_3
|
|
835 |
* @arg @ref LL_EXTI_LINE_4
|
|
836 |
* @arg @ref LL_EXTI_LINE_5
|
|
837 |
* @arg @ref LL_EXTI_LINE_6
|
|
838 |
* @arg @ref LL_EXTI_LINE_7
|
|
839 |
* @arg @ref LL_EXTI_LINE_8
|
|
840 |
* @arg @ref LL_EXTI_LINE_9
|
|
841 |
* @arg @ref LL_EXTI_LINE_10
|
|
842 |
* @arg @ref LL_EXTI_LINE_11
|
|
843 |
* @arg @ref LL_EXTI_LINE_12
|
|
844 |
* @arg @ref LL_EXTI_LINE_13
|
|
845 |
* @arg @ref LL_EXTI_LINE_14
|
|
846 |
* @arg @ref LL_EXTI_LINE_15
|
|
847 |
* @arg @ref LL_EXTI_LINE_16
|
|
848 |
* @arg @ref LL_EXTI_LINE_18
|
|
849 |
* @arg @ref LL_EXTI_LINE_19
|
|
850 |
* @arg @ref LL_EXTI_LINE_20
|
|
851 |
* @arg @ref LL_EXTI_LINE_21
|
|
852 |
* @arg @ref LL_EXTI_LINE_22
|
|
853 |
* @arg @ref LL_EXTI_LINE_29
|
|
854 |
* @arg @ref LL_EXTI_LINE_30
|
|
855 |
* @arg @ref LL_EXTI_LINE_31
|
|
856 |
* @note Please check each device line mapping for EXTI Line availability
|
|
857 |
* @retval None
|
|
858 |
*/
|
|
859 |
__STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)
|
|
860 |
{
|
|
861 |
SET_BIT(EXTI->SWIER, ExtiLine);
|
|
862 |
}
|
|
863 |
|
|
864 |
|
|
865 |
/**
|
|
866 |
* @}
|
|
867 |
*/
|
|
868 |
|
|
869 |
/** @defgroup EXTI_LL_EF_Flag_Management Flag_Management
|
|
870 |
* @{
|
|
871 |
*/
|
|
872 |
|
|
873 |
/**
|
|
874 |
* @brief Check if the ExtLine Flag is set or not for Lines in range 0 to 31
|
|
875 |
* @note This bit is set when the selected edge event arrives on the interrupt
|
|
876 |
* line. This bit is cleared by writing a 1 to the bit.
|
|
877 |
* @rmtoll PR PIFx LL_EXTI_IsActiveFlag_0_31
|
|
878 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
879 |
* @arg @ref LL_EXTI_LINE_0
|
|
880 |
* @arg @ref LL_EXTI_LINE_1
|
|
881 |
* @arg @ref LL_EXTI_LINE_2
|
|
882 |
* @arg @ref LL_EXTI_LINE_3
|
|
883 |
* @arg @ref LL_EXTI_LINE_4
|
|
884 |
* @arg @ref LL_EXTI_LINE_5
|
|
885 |
* @arg @ref LL_EXTI_LINE_6
|
|
886 |
* @arg @ref LL_EXTI_LINE_7
|
|
887 |
* @arg @ref LL_EXTI_LINE_8
|
|
888 |
* @arg @ref LL_EXTI_LINE_9
|
|
889 |
* @arg @ref LL_EXTI_LINE_10
|
|
890 |
* @arg @ref LL_EXTI_LINE_11
|
|
891 |
* @arg @ref LL_EXTI_LINE_12
|
|
892 |
* @arg @ref LL_EXTI_LINE_13
|
|
893 |
* @arg @ref LL_EXTI_LINE_14
|
|
894 |
* @arg @ref LL_EXTI_LINE_15
|
|
895 |
* @arg @ref LL_EXTI_LINE_16
|
|
896 |
* @arg @ref LL_EXTI_LINE_18
|
|
897 |
* @arg @ref LL_EXTI_LINE_19
|
|
898 |
* @arg @ref LL_EXTI_LINE_20
|
|
899 |
* @arg @ref LL_EXTI_LINE_21
|
|
900 |
* @arg @ref LL_EXTI_LINE_22
|
|
901 |
* @arg @ref LL_EXTI_LINE_29
|
|
902 |
* @arg @ref LL_EXTI_LINE_30
|
|
903 |
* @arg @ref LL_EXTI_LINE_31
|
|
904 |
* @note Please check each device line mapping for EXTI Line availability
|
|
905 |
* @retval State of bit (1 or 0).
|
|
906 |
*/
|
|
907 |
__STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine)
|
|
908 |
{
|
|
909 |
return (READ_BIT(EXTI->PR, ExtiLine) == (ExtiLine));
|
|
910 |
}
|
|
911 |
|
|
912 |
|
|
913 |
/**
|
|
914 |
* @brief Read ExtLine Combination Flag for Lines in range 0 to 31
|
|
915 |
* @note This bit is set when the selected edge event arrives on the interrupt
|
|
916 |
* line. This bit is cleared by writing a 1 to the bit.
|
|
917 |
* @rmtoll PR PIFx LL_EXTI_ReadFlag_0_31
|
|
918 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
919 |
* @arg @ref LL_EXTI_LINE_0
|
|
920 |
* @arg @ref LL_EXTI_LINE_1
|
|
921 |
* @arg @ref LL_EXTI_LINE_2
|
|
922 |
* @arg @ref LL_EXTI_LINE_3
|
|
923 |
* @arg @ref LL_EXTI_LINE_4
|
|
924 |
* @arg @ref LL_EXTI_LINE_5
|
|
925 |
* @arg @ref LL_EXTI_LINE_6
|
|
926 |
* @arg @ref LL_EXTI_LINE_7
|
|
927 |
* @arg @ref LL_EXTI_LINE_8
|
|
928 |
* @arg @ref LL_EXTI_LINE_9
|
|
929 |
* @arg @ref LL_EXTI_LINE_10
|
|
930 |
* @arg @ref LL_EXTI_LINE_11
|
|
931 |
* @arg @ref LL_EXTI_LINE_12
|
|
932 |
* @arg @ref LL_EXTI_LINE_13
|
|
933 |
* @arg @ref LL_EXTI_LINE_14
|
|
934 |
* @arg @ref LL_EXTI_LINE_15
|
|
935 |
* @arg @ref LL_EXTI_LINE_16
|
|
936 |
* @arg @ref LL_EXTI_LINE_18
|
|
937 |
* @arg @ref LL_EXTI_LINE_19
|
|
938 |
* @arg @ref LL_EXTI_LINE_20
|
|
939 |
* @arg @ref LL_EXTI_LINE_21
|
|
940 |
* @arg @ref LL_EXTI_LINE_22
|
|
941 |
* @arg @ref LL_EXTI_LINE_29
|
|
942 |
* @arg @ref LL_EXTI_LINE_30
|
|
943 |
* @arg @ref LL_EXTI_LINE_31
|
|
944 |
* @note Please check each device line mapping for EXTI Line availability
|
|
945 |
* @retval @note This bit is set when the selected edge event arrives on the interrupt
|
|
946 |
*/
|
|
947 |
__STATIC_INLINE uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine)
|
|
948 |
{
|
|
949 |
return (uint32_t)(READ_BIT(EXTI->PR, ExtiLine));
|
|
950 |
}
|
|
951 |
|
|
952 |
|
|
953 |
/**
|
|
954 |
* @brief Clear ExtLine Flags for Lines in range 0 to 31
|
|
955 |
* @note This bit is set when the selected edge event arrives on the interrupt
|
|
956 |
* line. This bit is cleared by writing a 1 to the bit.
|
|
957 |
* @rmtoll PR PIFx LL_EXTI_ClearFlag_0_31
|
|
958 |
* @param ExtiLine This parameter can be a combination of the following values:
|
|
959 |
* @arg @ref LL_EXTI_LINE_0
|
|
960 |
* @arg @ref LL_EXTI_LINE_1
|
|
961 |
* @arg @ref LL_EXTI_LINE_2
|
|
962 |
* @arg @ref LL_EXTI_LINE_3
|
|
963 |
* @arg @ref LL_EXTI_LINE_4
|
|
964 |
* @arg @ref LL_EXTI_LINE_5
|
|
965 |
* @arg @ref LL_EXTI_LINE_6
|
|
966 |
* @arg @ref LL_EXTI_LINE_7
|
|
967 |
* @arg @ref LL_EXTI_LINE_8
|
|
968 |
* @arg @ref LL_EXTI_LINE_9
|
|
969 |
* @arg @ref LL_EXTI_LINE_10
|
|
970 |
* @arg @ref LL_EXTI_LINE_11
|
|
971 |
* @arg @ref LL_EXTI_LINE_12
|
|
972 |
* @arg @ref LL_EXTI_LINE_13
|
|
973 |
* @arg @ref LL_EXTI_LINE_14
|
|
974 |
* @arg @ref LL_EXTI_LINE_15
|
|
975 |
* @arg @ref LL_EXTI_LINE_16
|
|
976 |
* @arg @ref LL_EXTI_LINE_18
|
|
977 |
* @arg @ref LL_EXTI_LINE_19
|
|
978 |
* @arg @ref LL_EXTI_LINE_20
|
|
979 |
* @arg @ref LL_EXTI_LINE_21
|
|
980 |
* @arg @ref LL_EXTI_LINE_22
|
|
981 |
* @arg @ref LL_EXTI_LINE_29
|
|
982 |
* @arg @ref LL_EXTI_LINE_30
|
|
983 |
* @arg @ref LL_EXTI_LINE_31
|
|
984 |
* @note Please check each device line mapping for EXTI Line availability
|
|
985 |
* @retval None
|
|
986 |
*/
|
|
987 |
__STATIC_INLINE void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine)
|
|
988 |
{
|
|
989 |
WRITE_REG(EXTI->PR, ExtiLine);
|
|
990 |
}
|
|
991 |
|
|
992 |
|
|
993 |
/**
|
|
994 |
* @}
|
|
995 |
*/
|
|
996 |
|
|
997 |
#if defined(USE_FULL_LL_DRIVER)
|
|
998 |
/** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
|
|
999 |
* @{
|
|
1000 |
*/
|
|
1001 |
|
|
1002 |
uint32_t LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct);
|
|
1003 |
uint32_t LL_EXTI_DeInit(void);
|
|
1004 |
void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct);
|
|
1005 |
|
|
1006 |
|
|
1007 |
/**
|
|
1008 |
* @}
|
|
1009 |
*/
|
|
1010 |
#endif /* USE_FULL_LL_DRIVER */
|
|
1011 |
|
|
1012 |
/**
|
|
1013 |
* @}
|
|
1014 |
*/
|
|
1015 |
|
|
1016 |
/**
|
|
1017 |
* @}
|
|
1018 |
*/
|
|
1019 |
|
|
1020 |
#endif /* EXTI */
|
|
1021 |
|
|
1022 |
/**
|
|
1023 |
* @}
|
|
1024 |
*/
|
|
1025 |
|
|
1026 |
#ifdef __cplusplus
|
|
1027 |
}
|
|
1028 |
#endif
|
|
1029 |
|
|
1030 |
#endif /* __STM32F0xx_LL_EXTI_H */
|
|
1031 |
|
|
1032 |
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|