Create release.yml
[betaflight.git] / lib / main / STM32F1 / Drivers / STM32F10x_StdPeriph_Driver / inc / stm32f10x_exti.h
blobbb9d7f6768e9df80b51ed10d46a250d2dde09b07
1 /**
2 ******************************************************************************
3 * @file stm32f10x_exti.h
4 * @author MCD Application Team
5 * @version V3.5.0
6 * @date 11-March-2011
7 * @brief This file contains all the functions prototypes for the EXTI firmware
8 * library.
9 ******************************************************************************
10 * @attention
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
19 * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
20 ******************************************************************************
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef __STM32F10x_EXTI_H
25 #define __STM32F10x_EXTI_H
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 /* Includes ------------------------------------------------------------------*/
32 #include "stm32f10x.h"
34 /** @addtogroup STM32F10x_StdPeriph_Driver
35 * @{
38 /** @addtogroup EXTI
39 * @{
42 /** @defgroup EXTI_Exported_Types
43 * @{
46 /**
47 * @brief EXTI mode enumeration
50 typedef enum
52 EXTI_Mode_Interrupt = 0x00,
53 EXTI_Mode_Event = 0x04
54 }EXTIMode_TypeDef;
56 #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event))
58 /**
59 * @brief EXTI Trigger enumeration
62 typedef enum
64 EXTI_Trigger_Rising = 0x08,
65 EXTI_Trigger_Falling = 0x0C,
66 EXTI_Trigger_Rising_Falling = 0x10
67 }EXTITrigger_TypeDef;
69 #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \
70 ((TRIGGER) == EXTI_Trigger_Falling) || \
71 ((TRIGGER) == EXTI_Trigger_Rising_Falling))
72 /**
73 * @brief EXTI Init Structure definition
76 typedef struct
78 uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled.
79 This parameter can be any combination of @ref EXTI_Lines */
81 EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines.
82 This parameter can be a value of @ref EXTIMode_TypeDef */
84 EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
85 This parameter can be a value of @ref EXTIMode_TypeDef */
87 FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines.
88 This parameter can be set either to ENABLE or DISABLE */
89 }EXTI_InitTypeDef;
91 /**
92 * @}
95 /** @defgroup EXTI_Exported_Constants
96 * @{
99 /** @defgroup EXTI_Lines
100 * @{
103 #define EXTI_Line0 ((uint32_t)0x00001) /*!< External interrupt line 0 */
104 #define EXTI_Line1 ((uint32_t)0x00002) /*!< External interrupt line 1 */
105 #define EXTI_Line2 ((uint32_t)0x00004) /*!< External interrupt line 2 */
106 #define EXTI_Line3 ((uint32_t)0x00008) /*!< External interrupt line 3 */
107 #define EXTI_Line4 ((uint32_t)0x00010) /*!< External interrupt line 4 */
108 #define EXTI_Line5 ((uint32_t)0x00020) /*!< External interrupt line 5 */
109 #define EXTI_Line6 ((uint32_t)0x00040) /*!< External interrupt line 6 */
110 #define EXTI_Line7 ((uint32_t)0x00080) /*!< External interrupt line 7 */
111 #define EXTI_Line8 ((uint32_t)0x00100) /*!< External interrupt line 8 */
112 #define EXTI_Line9 ((uint32_t)0x00200) /*!< External interrupt line 9 */
113 #define EXTI_Line10 ((uint32_t)0x00400) /*!< External interrupt line 10 */
114 #define EXTI_Line11 ((uint32_t)0x00800) /*!< External interrupt line 11 */
115 #define EXTI_Line12 ((uint32_t)0x01000) /*!< External interrupt line 12 */
116 #define EXTI_Line13 ((uint32_t)0x02000) /*!< External interrupt line 13 */
117 #define EXTI_Line14 ((uint32_t)0x04000) /*!< External interrupt line 14 */
118 #define EXTI_Line15 ((uint32_t)0x08000) /*!< External interrupt line 15 */
119 #define EXTI_Line16 ((uint32_t)0x10000) /*!< External interrupt line 16 Connected to the PVD Output */
120 #define EXTI_Line17 ((uint32_t)0x20000) /*!< External interrupt line 17 Connected to the RTC Alarm event */
121 #define EXTI_Line18 ((uint32_t)0x40000) /*!< External interrupt line 18 Connected to the USB Device/USB OTG FS
122 Wakeup from suspend event */
123 #define EXTI_Line19 ((uint32_t)0x80000) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */
125 #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFFF00000) == 0x00) && ((LINE) != (uint16_t)0x00))
126 #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \
127 ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \
128 ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \
129 ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \
130 ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \
131 ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \
132 ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \
133 ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \
134 ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \
135 ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19))
139 * @}
143 * @}
146 /** @defgroup EXTI_Exported_Macros
147 * @{
151 * @}
154 /** @defgroup EXTI_Exported_Functions
155 * @{
158 void EXTI_DeInit(void);
159 void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct);
160 void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct);
161 void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line);
162 FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line);
163 void EXTI_ClearFlag(uint32_t EXTI_Line);
164 ITStatus EXTI_GetITStatus(uint32_t EXTI_Line);
165 void EXTI_ClearITPendingBit(uint32_t EXTI_Line);
167 #ifdef __cplusplus
169 #endif
171 #endif /* __STM32F10x_EXTI_H */
173 * @}
177 * @}
181 * @}
184 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/