Move telemetry displayport init and cms device registering
[betaflight.git] / lib / main / STM32F3 / Drivers / STM32F30x_StdPeriph_Driver / inc / stm32f30x_exti.h
blobed1f0c2fdd4c94c33cfab10ef83b8405e4f02393
1 /**
2 ******************************************************************************
3 * @file stm32f30x_exti.h
4 * @author MCD Application Team
5 * @version V1.1.1
6 * @date 04-April-2014
7 * @brief This file contains all the functions prototypes for the EXTI
8 * firmware library.
9 ******************************************************************************
10 * @attention
12 * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 * You may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at:
18 * http://www.st.com/software_license_agreement_liberty_v2
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
26 ******************************************************************************
27 */
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F30x_EXTI_H
31 #define __STM32F30x_EXTI_H
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f30x.h"
40 /** @addtogroup STM32F30x_StdPeriph_Driver
41 * @{
44 /** @addtogroup EXTI
45 * @{
48 /* Exported types ------------------------------------------------------------*/
50 /**
51 * @brief EXTI mode enumeration
54 typedef enum
56 EXTI_Mode_Interrupt = 0x00,
57 EXTI_Mode_Event = 0x04
58 }EXTIMode_TypeDef;
60 #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event))
62 /**
63 * @brief EXTI Trigger enumeration
66 typedef enum
68 EXTI_Trigger_Rising = 0x08,
69 EXTI_Trigger_Falling = 0x0C,
70 EXTI_Trigger_Rising_Falling = 0x10
71 }EXTITrigger_TypeDef;
73 #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \
74 ((TRIGGER) == EXTI_Trigger_Falling) || \
75 ((TRIGGER) == EXTI_Trigger_Rising_Falling))
76 /**
77 * @brief EXTI Init Structure definition
80 typedef struct
82 uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled.
83 This parameter can be any combination of @ref EXTI_Lines */
85 EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines.
86 This parameter can be a value of @ref EXTIMode_TypeDef */
88 EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
89 This parameter can be a value of @ref EXTITrigger_TypeDef */
91 FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines.
92 This parameter can be set either to ENABLE or DISABLE */
93 }EXTI_InitTypeDef;
95 /* Exported constants --------------------------------------------------------*/
97 /** @defgroup EXTI_Exported_Constants
98 * @{
99 */
100 /** @defgroup EXTI_Lines
101 * @{
104 #define EXTI_Line0 ((uint32_t)0x00) /*!< External interrupt line 0 */
105 #define EXTI_Line1 ((uint32_t)0x01) /*!< External interrupt line 1 */
106 #define EXTI_Line2 ((uint32_t)0x02) /*!< External interrupt line 2 */
107 #define EXTI_Line3 ((uint32_t)0x03) /*!< External interrupt line 3 */
108 #define EXTI_Line4 ((uint32_t)0x04) /*!< External interrupt line 4 */
109 #define EXTI_Line5 ((uint32_t)0x05) /*!< External interrupt line 5 */
110 #define EXTI_Line6 ((uint32_t)0x06) /*!< External interrupt line 6 */
111 #define EXTI_Line7 ((uint32_t)0x07) /*!< External interrupt line 7 */
112 #define EXTI_Line8 ((uint32_t)0x08) /*!< External interrupt line 8 */
113 #define EXTI_Line9 ((uint32_t)0x09) /*!< External interrupt line 9 */
114 #define EXTI_Line10 ((uint32_t)0x0A) /*!< External interrupt line 10 */
115 #define EXTI_Line11 ((uint32_t)0x0B) /*!< External interrupt line 11 */
116 #define EXTI_Line12 ((uint32_t)0x0C) /*!< External interrupt line 12 */
117 #define EXTI_Line13 ((uint32_t)0x0D) /*!< External interrupt line 13 */
118 #define EXTI_Line14 ((uint32_t)0x0E) /*!< External interrupt line 14 */
119 #define EXTI_Line15 ((uint32_t)0x0F) /*!< External interrupt line 15 */
120 #define EXTI_Line16 ((uint32_t)0x10) /*!< External interrupt line 16
121 Connected to the PVD Output */
122 #define EXTI_Line17 ((uint32_t)0x11) /*!< Internal interrupt line 17
123 Connected to the RTC Alarm
124 event */
125 #define EXTI_Line18 ((uint32_t)0x12) /*!< Internal interrupt line 18
126 Connected to the USB Device
127 Wakeup from suspend event */
128 #define EXTI_Line19 ((uint32_t)0x13) /*!< Internal interrupt line 19
129 Connected to the RTC Tamper
130 and Time Stamp events */
131 #define EXTI_Line20 ((uint32_t)0x14) /*!< Internal interrupt line 20
132 Connected to the RTC wakeup
133 event */
134 #define EXTI_Line21 ((uint32_t)0x15) /*!< Internal interrupt line 21
135 Connected to the Comparator 1
136 event */
137 #define EXTI_Line22 ((uint32_t)0x16) /*!< Internal interrupt line 22
138 Connected to the Comparator 2
139 event */
140 #define EXTI_Line23 ((uint32_t)0x17) /*!< Internal interrupt line 23
141 Connected to the I2C1 wakeup
142 event */
143 #define EXTI_Line24 ((uint32_t)0x18) /*!< Internal interrupt line 24
144 Connected to the I2C2 wakeup
145 event */
146 #define EXTI_Line25 ((uint32_t)0x19) /*!< Internal interrupt line 25
147 Connected to the USART1 wakeup
148 event */
149 #define EXTI_Line26 ((uint32_t)0x1A) /*!< Internal interrupt line 26
150 Connected to the USART2 wakeup
151 event */
152 #define EXTI_Line27 ((uint32_t)0x1B) /*!< Internal interrupt line 27
153 reserved */
154 #define EXTI_Line28 ((uint32_t)0x1C) /*!< Internal interrupt line 28
155 Connected to the USART3 wakeup
156 event */
157 #define EXTI_Line29 ((uint32_t)0x1D) /*!< Internal interrupt line 29
158 Connected to the Comparator 3
159 event */
160 #define EXTI_Line30 ((uint32_t)0x1E) /*!< Internal interrupt line 30
161 Connected to the Comparator 4
162 event */
163 #define EXTI_Line31 ((uint32_t)0x1F) /*!< Internal interrupt line 31
164 Connected to the Comparator 5
165 event */
166 #define EXTI_Line32 ((uint32_t)0x20) /*!< Internal interrupt line 32
167 Connected to the Comparator 6
168 event */
169 #define EXTI_Line33 ((uint32_t)0x21) /*!< Internal interrupt line 33
170 Connected to the Comparator 7
171 event */
172 #define EXTI_Line34 ((uint32_t)0x22) /*!< Internal interrupt line 34
173 Connected to the USART4 wakeup
174 event */
175 #define EXTI_Line35 ((uint32_t)0x23) /*!< Internal interrupt line 35
176 Connected to the USART5 wakeup
177 event */
179 #define IS_EXTI_LINE_ALL(LINE) ((LINE) <= 0x23)
180 #define IS_EXTI_LINE_EXT(LINE) (((LINE) <= 0x16) || (((LINE) == EXTI_Line29) || ((LINE) == EXTI_Line30) || \
181 ((LINE) == EXTI_Line31) || ((LINE) == EXTI_Line32) || ((LINE) == EXTI_Line33)))
183 #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \
184 ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \
185 ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \
186 ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \
187 ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \
188 ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \
189 ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \
190 ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \
191 ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \
192 ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19) || \
193 ((LINE) == EXTI_Line20) || ((LINE) == EXTI_Line21) || \
194 ((LINE) == EXTI_Line22) || ((LINE) == EXTI_Line29) || \
195 ((LINE) == EXTI_Line30) || ((LINE) == EXTI_Line31) || \
196 ((LINE) == EXTI_Line32) || ((LINE) == EXTI_Line33))
198 * @}
202 * @}
205 /* Exported macro ------------------------------------------------------------*/
206 /* Exported functions ------------------------------------------------------- */
207 /* Function used to set the EXTI configuration to the default reset state *****/
208 void EXTI_DeInit(void);
210 /* Initialization and Configuration functions *********************************/
211 void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct);
212 void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct);
213 void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line);
215 /* Interrupts and flags management functions **********************************/
216 FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line);
217 void EXTI_ClearFlag(uint32_t EXTI_Line);
218 ITStatus EXTI_GetITStatus(uint32_t EXTI_Line);
219 void EXTI_ClearITPendingBit(uint32_t EXTI_Line);
221 #ifdef __cplusplus
223 #endif
225 #endif /* __STM32F30x_EXTI_H */
227 * @}
231 * @}
234 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/