HAL
Select one of the symbols to view example projects that use it.
 
Outline
#define STM32f4xx_HAL_EXTI_H
Includes
#include "stm32f4xx_hal_def.h"
Exported types
EXTI_CallbackIDTypeDef
EXTI_HandleTypeDef
EXTI_ConfigTypeDef
Exported constants
#define EXTI_LINE_0
#define EXTI_LINE_1
#define EXTI_LINE_2
#define EXTI_LINE_3
#define EXTI_LINE_4
#define EXTI_LINE_5
#define EXTI_LINE_6
#define EXTI_LINE_7
#define EXTI_LINE_8
#define EXTI_LINE_9
#define EXTI_LINE_10
#define EXTI_LINE_11
#define EXTI_LINE_12
#define EXTI_LINE_13
#define EXTI_LINE_14
#define EXTI_LINE_15
#define EXTI_LINE_16
#define EXTI_LINE_17
#define EXTI_LINE_18
#define EXTI_LINE_18
#define EXTI_LINE_19
#define EXTI_LINE_19
#define EXTI_LINE_20
#define EXTI_LINE_20
#define EXTI_LINE_21
#define EXTI_LINE_22
#define EXTI_LINE_23
#define EXTI_MODE_NONE
#define EXTI_MODE_INTERRUPT
#define EXTI_MODE_EVENT
#define EXTI_TRIGGER_NONE
#define EXTI_TRIGGER_RISING
#define EXTI_TRIGGER_FALLING
#define EXTI_TRIGGER_RISING_FALLING
#define EXTI_GPIOA
#define EXTI_GPIOB
#define EXTI_GPIOC
#define EXTI_GPIOD
#define EXTI_GPIOE
#define EXTI_GPIOF
#define EXTI_GPIOG
#define EXTI_GPIOH
#define EXTI_GPIOI
#define EXTI_GPIOJ
#define EXTI_GPIOK
Exported macro
Private constants
#define EXTI_PROPERTY_SHIFT
#define EXTI_CONFIG
#define EXTI_GPIO
#define EXTI_RESERVED
#define EXTI_PROPERTY_MASK
#define EXTI_PIN_MASK
#define EXTI_MODE_MASK
#define EXTI_TRIGGER_MASK
#define EXTI_LINE_NB
#define EXTI_LINE_NB
Private macros
#define IS_EXTI_TRIGGER
#define IS_EXTI_PENDING_EDGE
#define IS_EXTI_CONFIG_LINE
#define IS_EXTI_GPIO_PIN
HAL_EXTI_SetConfigLine(EXTI_HandleTypeDef *, EXTI_ConfigTypeDef *);
HAL_EXTI_GetConfigLine(EXTI_HandleTypeDef *, EXTI_ConfigTypeDef *);
HAL_EXTI_ClearConfigLine(EXTI_HandleTypeDef *);
HAL_EXTI_RegisterCallback(EXTI_HandleTypeDef *, EXTI_CallbackIDTypeDef, void (*)(void));
HAL_EXTI_GetHandle(EXTI_HandleTypeDef *, uint32_t);
HAL_EXTI_IRQHandler(EXTI_HandleTypeDef *);
HAL_EXTI_GetPending(EXTI_HandleTypeDef *, uint32_t);
HAL_EXTI_ClearPending(EXTI_HandleTypeDef *, uint32_t);
HAL_EXTI_GenerateSWI(EXTI_HandleTypeDef *);
Files
loading...
CodeScopeSTM32 Libraries and SamplesHALInc/stm32f4xx_hal_exti.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file stm32f4xx_hal_exti.h * @author MCD Application Team * @brief Header file of EXTI HAL module. ****************************************************************************** * @attention * * Copyright (c) 2018 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS.Clause * ****************************************************************************** *//* ... */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef STM32f4xx_HAL_EXTI_H #define STM32f4xx_HAL_EXTI_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32f4xx_hal_def.h" /** @addtogroup STM32F4xx_HAL_Driver * @{ *//* ... */ /** @defgroup EXTI EXTI * @brief EXTI HAL module driver * @{ *//* ... */ Includes /* Exported types ------------------------------------------------------------*/ /** @defgroup EXTI_Exported_Types EXTI Exported Types * @{ *//* ... */ typedef enum { HAL_EXTI_COMMON_CB_ID = 0x00U ...} EXTI_CallbackIDTypeDef; /** * @brief EXTI Handle structure definition *//* ... */ typedef struct { uint32_t Line; /*!< Exti line number */ void (* PendingCallback)(void); /*!< Exti pending callback */ ...} EXTI_HandleTypeDef; /** * @brief EXTI Configuration structure definition *//* ... */ typedef struct { uint32_t Line; /*!< The Exti line to be configured. This parameter can be a value of @ref EXTI_Line *//* ... */ uint32_t Mode; /*!< The Exit Mode to be configured for a core. This parameter can be a combination of @ref EXTI_Mode *//* ... */ uint32_t Trigger; /*!< The Exti Trigger to be configured. This parameter can be a value of @ref EXTI_Trigger *//* ... */ uint32_t GPIOSel; /*!< The Exti GPIO multiplexer selection to be configured. This parameter is only possible for line 0 to 15. It can be a value of @ref EXTI_GPIOSel *//* ... */ ...} EXTI_ConfigTypeDef; /** * @} *//* ... */ Exported types /* Exported constants --------------------------------------------------------*/ /** @defgroup EXTI_Exported_Constants EXTI Exported Constants * @{ *//* ... */ /** @defgroup EXTI_Line EXTI Line * @{ *//* ... */ #define EXTI_LINE_0 (EXTI_GPIO | 0x00u) /*!< External interrupt line 0 */ #define EXTI_LINE_1 (EXTI_GPIO | 0x01u) /*!< External interrupt line 1 */ #define EXTI_LINE_2 (EXTI_GPIO | 0x02u) /*!< External interrupt line 2 */ #define EXTI_LINE_3 (EXTI_GPIO | 0x03u) /*!< External interrupt line 3 */ #define EXTI_LINE_4 (EXTI_GPIO | 0x04u) /*!< External interrupt line 4 */ #define EXTI_LINE_5 (EXTI_GPIO | 0x05u) /*!< External interrupt line 5 */ #define EXTI_LINE_6 (EXTI_GPIO | 0x06u) /*!< External interrupt line 6 */ #define EXTI_LINE_7 (EXTI_GPIO | 0x07u) /*!< External interrupt line 7 */ #define EXTI_LINE_8 (EXTI_GPIO | 0x08u) /*!< External interrupt line 8 */ #define EXTI_LINE_9 (EXTI_GPIO | 0x09u) /*!< External interrupt line 9 */ #define EXTI_LINE_10 (EXTI_GPIO | 0x0Au) /*!< External interrupt line 10 */ #define EXTI_LINE_11 (EXTI_GPIO | 0x0Bu) /*!< External interrupt line 11 */ #define EXTI_LINE_12 (EXTI_GPIO | 0x0Cu) /*!< External interrupt line 12 */ #define EXTI_LINE_13 (EXTI_GPIO | 0x0Du) /*!< External interrupt line 13 */ #define EXTI_LINE_14 (EXTI_GPIO | 0x0Eu) /*!< External interrupt line 14 */ #define EXTI_LINE_15 (EXTI_GPIO | 0x0Fu) /*!< External interrupt line 15 */ #define EXTI_LINE_16 (EXTI_CONFIG | 0x10u) /*!< External interrupt line 16 Connected to the PVD Output */ #define EXTI_LINE_17 (EXTI_CONFIG | 0x11u) /*!< External interrupt line 17 Connected to the RTC Alarm event */ 18 defines#if defined(EXTI_IMR_IM18) #define EXTI_LINE_18 (EXTI_CONFIG | 0x12u) /*!< External interrupt line 18 Connected to the USB OTG FS Wakeup from suspend event */ #else #define EXTI_LINE_18 (EXTI_RESERVED | 0x12u) /*!< No interrupt supported in this line */ #endif /* EXTI_IMR_IM18 */ #if defined(EXTI_IMR_IM19) #define EXTI_LINE_19 (EXTI_CONFIG | 0x13u) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */ #else #define EXTI_LINE_19 (EXTI_RESERVED | 0x13u) /*!< No interrupt supported in this line */ #endif /* EXTI_IMR_IM19 */ #if defined(EXTI_IMR_IM20) #define EXTI_LINE_20 (EXTI_CONFIG | 0x14u) /*!< External interrupt line 20 Connected to the USB OTG HS (configured in FS) Wakeup event */ #else #define EXTI_LINE_20 (EXTI_RESERVED | 0x14u) /*!< No interrupt supported in this line */ #endif /* EXTI_IMR_IM20 */ #define EXTI_LINE_21 (EXTI_CONFIG | 0x15u) /*!< External interrupt line 21 Connected to the RTC Tamper and Time Stamp events */ #define EXTI_LINE_22 (EXTI_CONFIG | 0x16u) /*!< External interrupt line 22 Connected to the RTC Wakeup event */ #if defined(EXTI_IMR_IM23) #define EXTI_LINE_23 (EXTI_CONFIG | 0x17u) /*!< External interrupt line 23 Connected to the LPTIM1 asynchronous event */ #endif /* EXTI_IMR_IM23 */ /** * @} *//* ... */ /** @defgroup EXTI_Mode EXTI Mode * @{ *//* ... */ #define EXTI_MODE_NONE 0x00000000u #define EXTI_MODE_INTERRUPT 0x00000001u #define EXTI_MODE_EVENT 0x00000002u /** * @} *//* ... */ /** @defgroup EXTI_Trigger EXTI Trigger * @{ *//* ... */ #define EXTI_TRIGGER_NONE 0x00000000u #define EXTI_TRIGGER_RISING 0x00000001u #define EXTI_TRIGGER_FALLING 0x00000002u #define EXTI_TRIGGER_RISING_FALLING (EXTI_TRIGGER_RISING | EXTI_TRIGGER_FALLING) /** * @} *//* ... */ /** @defgroup EXTI_GPIOSel EXTI GPIOSel * @brief * @{ *//* ... */ #define EXTI_GPIOA 0x00000000u #define EXTI_GPIOB 0x00000001u #define EXTI_GPIOC 0x00000002u 10 defines#if defined (GPIOD) #define EXTI_GPIOD 0x00000003u #endif /* GPIOD */ #if defined (GPIOE) #define EXTI_GPIOE 0x00000004u #endif /* GPIOE */ #if defined (GPIOF) #define EXTI_GPIOF 0x00000005u #endif /* GPIOF */ #if defined (GPIOG) #define EXTI_GPIOG 0x00000006u #endif /* GPIOG */ #if defined (GPIOH) #define EXTI_GPIOH 0x00000007u #endif /* GPIOH */ #if defined (GPIOI) #define EXTI_GPIOI 0x00000008u #endif /* GPIOI */ #if defined (GPIOJ) #define EXTI_GPIOJ 0x00000009u #endif /* GPIOJ */ #if defined (GPIOK) #define EXTI_GPIOK 0x0000000Au #endif /* GPIOK */ /** * @} *//* ... */ /** * @} *//* ... */ Exported constants /* Exported macro ------------------------------------------------------------*/ /** @defgroup EXTI_Exported_Macros EXTI Exported Macros * @{ *//* ... */ /** * @} *//* ... */ Exported macro /* Private constants --------------------------------------------------------*/ /** @defgroup EXTI_Private_Constants EXTI Private Constants * @{ *//* ... */ /** * @brief EXTI Line property definition *//* ... */ #define EXTI_PROPERTY_SHIFT 24u #define EXTI_CONFIG (0x02uL << EXTI_PROPERTY_SHIFT) #define EXTI_GPIO ((0x04uL << EXTI_PROPERTY_SHIFT) | EXTI_CONFIG) #define EXTI_RESERVED (0x08uL << EXTI_PROPERTY_SHIFT) #define EXTI_PROPERTY_MASK (EXTI_CONFIG | EXTI_GPIO) /** * @brief EXTI bit usage *//* ... */ #define EXTI_PIN_MASK 0x0000001Fu /** * @brief EXTI Mask for interrupt & event mode *//* ... */ #define EXTI_MODE_MASK (EXTI_MODE_EVENT | EXTI_MODE_INTERRUPT) /** * @brief EXTI Mask for trigger possibilities *//* ... */ #define EXTI_TRIGGER_MASK (EXTI_TRIGGER_RISING | EXTI_TRIGGER_FALLING) 8 defines /** * @brief EXTI Line number *//* ... */ #if defined(EXTI_IMR_IM23) #define EXTI_LINE_NB 24UL #else #define EXTI_LINE_NB 23UL #endif /* EXTI_IMR_IM23 */ /** * @} *//* ... */ Private constants /* Private macros ------------------------------------------------------------*/ /** @defgroup EXTI_Private_Macros EXTI Private Macros * @{ *//* ... */ #define IS_EXTI_LINE(__EXTI_LINE__) ((((__EXTI_LINE__) & ~(EXTI_PROPERTY_MASK | EXTI_PIN_MASK)) == 0x00u) && \ ((((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_CONFIG) || \ (((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_GPIO)) && \ (((__EXTI_LINE__) & EXTI_PIN_MASK) < EXTI_LINE_NB))... #define IS_EXTI_MODE(__EXTI_LINE__) ((((__EXTI_LINE__) & EXTI_MODE_MASK) != 0x00u) && \ (((__EXTI_LINE__) & ~EXTI_MODE_MASK) == 0x00u))... #define IS_EXTI_TRIGGER(__EXTI_LINE__) (((__EXTI_LINE__) & ~EXTI_TRIGGER_MASK) == 0x00u) #define IS_EXTI_PENDING_EDGE(__EXTI_LINE__) ((__EXTI_LINE__) == EXTI_TRIGGER_RISING_FALLING) #define IS_EXTI_CONFIG_LINE(__EXTI_LINE__) (((__EXTI_LINE__) & EXTI_CONFIG) != 0x00u) 5 defines #if !defined (GPIOD) #define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ ((__PORT__) == EXTI_GPIOB) || \ ((__PORT__) == EXTI_GPIOC) || \ ((__PORT__) == EXTI_GPIOH))... /* ... */#elif !defined (GPIOE) #define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ ((__PORT__) == EXTI_GPIOB) || \ ((__PORT__) == EXTI_GPIOC) || \ ((__PORT__) == EXTI_GPIOD) || \ ((__PORT__) == EXTI_GPIOH))... /* ... */#elif !defined (GPIOF) #define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ ((__PORT__) == EXTI_GPIOB) || \ ((__PORT__) == EXTI_GPIOC) || \ ((__PORT__) == EXTI_GPIOD) || \ ((__PORT__) == EXTI_GPIOE) || \ ((__PORT__) == EXTI_GPIOH))... /* ... */#elif !defined (GPIOI) #define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ ((__PORT__) == EXTI_GPIOB) || \ ((__PORT__) == EXTI_GPIOC) || \ ((__PORT__) == EXTI_GPIOD) || \ ((__PORT__) == EXTI_GPIOE) || \ ((__PORT__) == EXTI_GPIOF) || \ ((__PORT__) == EXTI_GPIOG) || \ ((__PORT__) == EXTI_GPIOH))... /* ... */#elif !defined (GPIOJ) #define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ ((__PORT__) == EXTI_GPIOB) || \ ((__PORT__) == EXTI_GPIOC) || \ ((__PORT__) == EXTI_GPIOD) || \ ((__PORT__) == EXTI_GPIOE) || \ ((__PORT__) == EXTI_GPIOF) || \ ((__PORT__) == EXTI_GPIOG) || \ ((__PORT__) == EXTI_GPIOH) || \ ((__PORT__) == EXTI_GPIOI))... /* ... */#else #define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ ((__PORT__) == EXTI_GPIOB) || \ ((__PORT__) == EXTI_GPIOC) || \ ((__PORT__) == EXTI_GPIOD) || \ ((__PORT__) == EXTI_GPIOE) || \ ((__PORT__) == EXTI_GPIOF) || \ ((__PORT__) == EXTI_GPIOG) || \ ((__PORT__) == EXTI_GPIOH) || \ ((__PORT__) == EXTI_GPIOI) || \ ((__PORT__) == EXTI_GPIOJ) || \ ((__PORT__) == EXTI_GPIOK))... /* ... */#endif /* GPIOD */ #define IS_EXTI_GPIO_PIN(__PIN__) ((__PIN__) < 16U) /** * @} *//* ... */ Private macros /* Exported functions --------------------------------------------------------*/ /** @defgroup EXTI_Exported_Functions EXTI Exported Functions * @brief EXTI Exported Functions * @{ *//* ... */ /** @defgroup EXTI_Exported_Functions_Group1 Configuration functions * @brief Configuration functions * @{ *//* ... */ /* Configuration functions ****************************************************/ HAL_StatusTypeDef HAL_EXTI_SetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig); HAL_StatusTypeDef HAL_EXTI_GetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig); HAL_StatusTypeDef HAL_EXTI_ClearConfigLine(EXTI_HandleTypeDef *hexti); HAL_StatusTypeDef HAL_EXTI_RegisterCallback(EXTI_HandleTypeDef *hexti, EXTI_CallbackIDTypeDef CallbackID, void (*pPendingCbfn)(void)); HAL_StatusTypeDef HAL_EXTI_GetHandle(EXTI_HandleTypeDef *hexti, uint32_t ExtiLine); /** * @} *//* ... */ /** @defgroup EXTI_Exported_Functions_Group2 IO operation functions * @brief IO operation functions * @{ *//* ... */ /* IO operation functions *****************************************************/ void HAL_EXTI_IRQHandler(EXTI_HandleTypeDef *hexti); uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge); void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge); void HAL_EXTI_GenerateSWI(EXTI_HandleTypeDef *hexti); /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */ #ifdef __cplusplus }extern "C" { ... } #endif /* ... */ #endif /* STM32f4xx_HAL_EXTI_H */