stm32f30x_exti.h
Go to the documentation of this file.
1 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F30x_EXTI_H
31 #define __STM32F30x_EXTI_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f30x.h"
39 
48 /* Exported types ------------------------------------------------------------*/
49 
54 typedef enum
55 {
59 
60 #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event))
61 
66 typedef enum
67 {
72 
73 #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \
74  ((TRIGGER) == EXTI_Trigger_Falling) || \
75  ((TRIGGER) == EXTI_Trigger_Rising_Falling))
76 
80 typedef struct
81 {
82  uint32_t EXTI_Line;
85  EXTIMode_TypeDef EXTI_Mode;
88  EXTITrigger_TypeDef EXTI_Trigger;
91  FunctionalState EXTI_LineCmd;
94 
95 /* Exported constants --------------------------------------------------------*/
96 
104 #define EXTI_Line0 ((uint32_t)0x00)
105 #define EXTI_Line1 ((uint32_t)0x01)
106 #define EXTI_Line2 ((uint32_t)0x02)
107 #define EXTI_Line3 ((uint32_t)0x03)
108 #define EXTI_Line4 ((uint32_t)0x04)
109 #define EXTI_Line5 ((uint32_t)0x05)
110 #define EXTI_Line6 ((uint32_t)0x06)
111 #define EXTI_Line7 ((uint32_t)0x07)
112 #define EXTI_Line8 ((uint32_t)0x08)
113 #define EXTI_Line9 ((uint32_t)0x09)
114 #define EXTI_Line10 ((uint32_t)0x0A)
115 #define EXTI_Line11 ((uint32_t)0x0B)
116 #define EXTI_Line12 ((uint32_t)0x0C)
117 #define EXTI_Line13 ((uint32_t)0x0D)
118 #define EXTI_Line14 ((uint32_t)0x0E)
119 #define EXTI_Line15 ((uint32_t)0x0F)
120 #define EXTI_Line16 ((uint32_t)0x10)
122 #define EXTI_Line17 ((uint32_t)0x11)
125 #define EXTI_Line18 ((uint32_t)0x12)
128 #define EXTI_Line19 ((uint32_t)0x13)
131 #define EXTI_Line20 ((uint32_t)0x14)
134 #define EXTI_Line21 ((uint32_t)0x15)
137 #define EXTI_Line22 ((uint32_t)0x16)
140 #define EXTI_Line23 ((uint32_t)0x17)
143 #define EXTI_Line24 ((uint32_t)0x18)
146 #define EXTI_Line25 ((uint32_t)0x19)
149 #define EXTI_Line26 ((uint32_t)0x1A)
152 #define EXTI_Line27 ((uint32_t)0x1B)
154 #define EXTI_Line28 ((uint32_t)0x1C)
157 #define EXTI_Line29 ((uint32_t)0x1D)
160 #define EXTI_Line30 ((uint32_t)0x1E)
163 #define EXTI_Line31 ((uint32_t)0x1F)
166 #define EXTI_Line32 ((uint32_t)0x20)
169 #define EXTI_Line33 ((uint32_t)0x21)
172 #define EXTI_Line34 ((uint32_t)0x22)
175 #define EXTI_Line35 ((uint32_t)0x23)
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)))
182 
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))
197 
205 /* Exported macro ------------------------------------------------------------*/
206 /* Exported functions ------------------------------------------------------- */
207 /* Function used to set the EXTI configuration to the default reset state *****/
208 void EXTI_DeInit(void);
209 
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);
214 
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);
220 
221 #ifdef __cplusplus
222 }
223 #endif
224 
225 #endif /* __STM32F30x_EXTI_H */
226 
234 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
FlagStatus
Definition: stm32f4xx.h:706
void EXTI_DeInit(void)
Deinitializes the EXTI peripheral registers to their default reset values.
EXTI Init Structure definition.
FunctionalState
Definition: stm32f4xx.h:708
void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line)
Generates a Software interrupt on selected EXTI line.
void EXTI_StructInit(EXTI_InitTypeDef *EXTI_InitStruct)
Fills each EXTI_InitStruct member with its reset value.
ITStatus EXTI_GetITStatus(uint32_t EXTI_Line)
Checks whether the specified EXTI line is asserted or not.
enum FlagStatus ITStatus
void EXTI_Init(EXTI_InitTypeDef *EXTI_InitStruct)
Initializes the EXTI peripheral according to the specified parameters in the EXTI_InitStruct. EXTI_Line specifies the EXTI line (EXTI0....EXTI35). EXTI_Mode specifies which EXTI line is used as interrupt or an event. EXTI_Trigger selects the trigger. When the trigger occurs, interrupt pending bit will be set. EXTI_LineCmd controls (Enable/Disable) the EXTI line.
FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line)
Checks whether the specified EXTI line flag is set or not.
void EXTI_ClearFlag(uint32_t EXTI_Line)
Clears the EXTI&#39;s line pending flags.
void EXTI_ClearITPendingBit(uint32_t EXTI_Line)
Clears the EXTI&#39;s line pending bits.
EXTITrigger_TypeDef
EXTI Trigger enumeration.
EXTIMode_TypeDef
EXTI mode enumeration.


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:25