extern
porcupine
demo
mcu
stm32f769
stm32f769i-disco
Drivers
STM32F7xx_HAL_Driver
Inc
stm32f7xx_hal_exti.h
Go to the documentation of this file.
1
20
/* Define to prevent recursive inclusion -------------------------------------*/
21
#ifndef STM32F7xx_HAL_EXTI_H
22
#define STM32F7xx_HAL_EXTI_H
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
28
/* Includes ------------------------------------------------------------------*/
29
#include "
stm32f7xx_hal_def.h
"
30
40
/* Exported types ------------------------------------------------------------*/
41
45
typedef
enum
46
{
47
HAL_EXTI_COMMON_CB_ID
= 0x00U
48
}
EXTI_CallbackIDTypeDef
;
49
53
typedef
struct
54
{
55
uint32_t
Line
;
56
void (* PendingCallback)(void);
57
}
EXTI_HandleTypeDef
;
58
62
typedef
struct
63
{
64
uint32_t
Line
;
66
uint32_t
Mode
;
68
uint32_t
Trigger
;
70
uint32_t
GPIOSel
;
73
}
EXTI_ConfigTypeDef
;
74
79
/* Exported constants --------------------------------------------------------*/
87
#define EXTI_LINE_0 (EXTI_GPIO | 0x00u)
88
#define EXTI_LINE_1 (EXTI_GPIO | 0x01u)
89
#define EXTI_LINE_2 (EXTI_GPIO | 0x02u)
90
#define EXTI_LINE_3 (EXTI_GPIO | 0x03u)
91
#define EXTI_LINE_4 (EXTI_GPIO | 0x04u)
92
#define EXTI_LINE_5 (EXTI_GPIO | 0x05u)
93
#define EXTI_LINE_6 (EXTI_GPIO | 0x06u)
94
#define EXTI_LINE_7 (EXTI_GPIO | 0x07u)
95
#define EXTI_LINE_8 (EXTI_GPIO | 0x08u)
96
#define EXTI_LINE_9 (EXTI_GPIO | 0x09u)
97
#define EXTI_LINE_10 (EXTI_GPIO | 0x0Au)
98
#define EXTI_LINE_11 (EXTI_GPIO | 0x0Bu)
99
#define EXTI_LINE_12 (EXTI_GPIO | 0x0Cu)
100
#define EXTI_LINE_13 (EXTI_GPIO | 0x0Du)
101
#define EXTI_LINE_14 (EXTI_GPIO | 0x0Eu)
102
#define EXTI_LINE_15 (EXTI_GPIO | 0x0Fu)
103
#define EXTI_LINE_16 (EXTI_CONFIG | 0x10u)
104
#define EXTI_LINE_17 (EXTI_CONFIG | 0x11u)
105
#define EXTI_LINE_18 (EXTI_CONFIG | 0x12u)
106
#if defined(ETH)
107
#define EXTI_LINE_19 (EXTI_CONFIG | 0x13u)
108
#else
109
#define EXTI_LINE_19 (EXTI_RESERVED | 0x13u)
110
#endif
/* ETH */
111
#define EXTI_LINE_20 (EXTI_CONFIG | 0x14u)
112
#define EXTI_LINE_21 (EXTI_CONFIG | 0x15u)
113
#define EXTI_LINE_22 (EXTI_CONFIG | 0x16u)
114
#define EXTI_LINE_23 (EXTI_CONFIG | 0x17u)
115
#if defined(EXTI_IMR_IM24)
116
#define EXTI_LINE_24 (EXTI_CONFIG | 0x18u)
117
#endif
/* EXTI_IMR_IM24 */
118
125
#define EXTI_MODE_NONE 0x00000000u
126
#define EXTI_MODE_INTERRUPT 0x00000001u
127
#define EXTI_MODE_EVENT 0x00000002u
128
136
#define EXTI_TRIGGER_NONE 0x00000000u
137
#define EXTI_TRIGGER_RISING 0x00000001u
138
#define EXTI_TRIGGER_FALLING 0x00000002u
139
#define EXTI_TRIGGER_RISING_FALLING (EXTI_TRIGGER_RISING | EXTI_TRIGGER_FALLING)
140
148
#define EXTI_GPIOA 0x00000000u
149
#define EXTI_GPIOB 0x00000001u
150
#define EXTI_GPIOC 0x00000002u
151
#define EXTI_GPIOD 0x00000003u
152
#define EXTI_GPIOE 0x00000004u
153
#define EXTI_GPIOF 0x00000005u
154
#define EXTI_GPIOG 0x00000006u
155
#define EXTI_GPIOH 0x00000007u
156
#define EXTI_GPIOI 0x00000008u
157
#define EXTI_GPIOJ 0x00000009u
158
#if defined (GPIOK)
159
#define EXTI_GPIOK 0x0000000Au
160
#endif
/* GPIOK */
161
166
/* Exported macro ------------------------------------------------------------*/
175
/* Private constants --------------------------------------------------------*/
182
#define EXTI_PROPERTY_SHIFT 24u
183
#define EXTI_CONFIG (0x02uL << EXTI_PROPERTY_SHIFT)
184
#define EXTI_GPIO ((0x04uL << EXTI_PROPERTY_SHIFT) | EXTI_CONFIG)
185
#define EXTI_RESERVED (0x08uL << EXTI_PROPERTY_SHIFT)
186
#define EXTI_PROPERTY_MASK (EXTI_CONFIG | EXTI_GPIO)
187
191
#define EXTI_PIN_MASK 0x0000001Fu
192
196
#define EXTI_MODE_MASK (EXTI_MODE_EVENT | EXTI_MODE_INTERRUPT)
197
201
#define EXTI_TRIGGER_MASK (EXTI_TRIGGER_RISING | EXTI_TRIGGER_FALLING)
202
206
#if defined(EXTI_IMR_IM24)
207
#define EXTI_LINE_NB 25u
208
#else
209
#define EXTI_LINE_NB 24u
210
#endif
/* EXTI_IMR_IM24 */
211
212
217
/* Private macros ------------------------------------------------------------*/
221
#define IS_EXTI_LINE(__LINE__) ((((__LINE__) & ~(EXTI_PROPERTY_MASK | EXTI_PIN_MASK)) == 0x00u) && \
222
((((__LINE__) & EXTI_PROPERTY_MASK) == EXTI_CONFIG) || \
223
(((__LINE__) & EXTI_PROPERTY_MASK) == EXTI_GPIO)) && \
224
(((__LINE__) & EXTI_PIN_MASK) < EXTI_LINE_NB))
225
226
#define IS_EXTI_MODE(__LINE__) ((((__LINE__) & EXTI_MODE_MASK) != 0x00u) && \
227
(((__LINE__) & ~EXTI_MODE_MASK) == 0x00u))
228
229
#define IS_EXTI_TRIGGER(__LINE__) (((__LINE__) & ~EXTI_TRIGGER_MASK) == 0x00u)
230
231
#define IS_EXTI_PENDING_EDGE(__LINE__) (((__LINE__) == EXTI_TRIGGER_FALLING) || \
232
((__LINE__) == EXTI_TRIGGER_RISING) || \
233
((__LINE__) == EXTI_TRIGGER_RISING_FALLING))
234
235
#define IS_EXTI_CONFIG_LINE(__LINE__) (((__LINE__) & EXTI_CONFIG) != 0x00u)
236
237
#if defined (GPIOK)
238
#define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \
239
((__PORT__) == EXTI_GPIOB) || \
240
((__PORT__) == EXTI_GPIOC) || \
241
((__PORT__) == EXTI_GPIOD) || \
242
((__PORT__) == EXTI_GPIOE) || \
243
((__PORT__) == EXTI_GPIOF) || \
244
((__PORT__) == EXTI_GPIOG) || \
245
((__PORT__) == EXTI_GPIOH) || \
246
((__PORT__) == EXTI_GPIOI) || \
247
((__PORT__) == EXTI_GPIOJ) || \
248
((__PORT__) == EXTI_GPIOK))
249
#else
250
#define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \
251
((__PORT__) == EXTI_GPIOB) || \
252
((__PORT__) == EXTI_GPIOC) || \
253
((__PORT__) == EXTI_GPIOD) || \
254
((__PORT__) == EXTI_GPIOE) || \
255
((__PORT__) == EXTI_GPIOF) || \
256
((__PORT__) == EXTI_GPIOG) || \
257
((__PORT__) == EXTI_GPIOH) || \
258
((__PORT__) == EXTI_GPIOI) || \
259
((__PORT__) == EXTI_GPIOJ))
260
#endif
/* GPIOK */
261
262
#define IS_EXTI_GPIO_PIN(__PIN__) ((__PIN__) < 16U)
263
267
/* Exported functions --------------------------------------------------------*/
277
/* Configuration functions ****************************************************/
278
HAL_StatusTypeDef
HAL_EXTI_SetConfigLine
(
EXTI_HandleTypeDef
*hexti,
EXTI_ConfigTypeDef
*pExtiConfig);
279
HAL_StatusTypeDef
HAL_EXTI_GetConfigLine
(
EXTI_HandleTypeDef
*hexti,
EXTI_ConfigTypeDef
*pExtiConfig);
280
HAL_StatusTypeDef
HAL_EXTI_ClearConfigLine
(
EXTI_HandleTypeDef
*hexti);
281
HAL_StatusTypeDef
HAL_EXTI_RegisterCallback
(
EXTI_HandleTypeDef
*hexti,
EXTI_CallbackIDTypeDef
CallbackID,
void
(*pPendingCbfn)(
void
));
282
HAL_StatusTypeDef
HAL_EXTI_GetHandle
(
EXTI_HandleTypeDef
*hexti, uint32_t ExtiLine);
291
/* IO operation functions *****************************************************/
292
void
HAL_EXTI_IRQHandler
(
EXTI_HandleTypeDef
*hexti);
293
uint32_t
HAL_EXTI_GetPending
(
EXTI_HandleTypeDef
*hexti, uint32_t Edge);
294
void
HAL_EXTI_ClearPending
(
EXTI_HandleTypeDef
*hexti, uint32_t Edge);
295
void
HAL_EXTI_GenerateSWI
(
EXTI_HandleTypeDef
*hexti);
296
313
#ifdef __cplusplus
314
}
315
#endif
316
317
#endif
/* STM32F7xx_HAL_EXTI_H */
318
319
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
EXTI_ConfigTypeDef::Line
uint32_t Line
Definition:
stm32f7xx_hal_exti.h:64
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition:
stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
HAL_EXTI_ClearPending
void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
EXTI_HandleTypeDef::Line
uint32_t Line
Definition:
stm32f7xx_hal_exti.h:55
HAL_EXTI_GenerateSWI
void HAL_EXTI_GenerateSWI(EXTI_HandleTypeDef *hexti)
EXTI_HandleTypeDef
EXTI Handle structure definition.
Definition:
stm32f7xx_hal_exti.h:53
EXTI_ConfigTypeDef::Mode
uint32_t Mode
Definition:
stm32f7xx_hal_exti.h:66
EXTI_CallbackIDTypeDef
EXTI_CallbackIDTypeDef
Definition:
stm32f7xx_hal_exti.h:45
EXTI_ConfigTypeDef::Trigger
uint32_t Trigger
Definition:
stm32f7xx_hal_exti.h:68
EXTI_ConfigTypeDef::GPIOSel
uint32_t GPIOSel
Definition:
stm32f7xx_hal_exti.h:70
HAL_EXTI_GetPending
uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
HAL_EXTI_ClearConfigLine
HAL_StatusTypeDef HAL_EXTI_ClearConfigLine(EXTI_HandleTypeDef *hexti)
HAL_EXTI_SetConfigLine
HAL_StatusTypeDef HAL_EXTI_SetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig)
HAL_EXTI_IRQHandler
void HAL_EXTI_IRQHandler(EXTI_HandleTypeDef *hexti)
HAL_EXTI_RegisterCallback
HAL_StatusTypeDef HAL_EXTI_RegisterCallback(EXTI_HandleTypeDef *hexti, EXTI_CallbackIDTypeDef CallbackID, void(*pPendingCbfn)(void))
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_EXTI_COMMON_CB_ID
@ HAL_EXTI_COMMON_CB_ID
Definition:
stm32f7xx_hal_exti.h:47
EXTI_ConfigTypeDef
EXTI Configuration structure definition.
Definition:
stm32f7xx_hal_exti.h:62
HAL_EXTI_GetHandle
HAL_StatusTypeDef HAL_EXTI_GetHandle(EXTI_HandleTypeDef *hexti, uint32_t ExtiLine)
HAL_EXTI_GetConfigLine
HAL_StatusTypeDef HAL_EXTI_GetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig)
picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53