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