stm32f4xx_exti.h
Go to the documentation of this file.
1 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F4xx_EXTI_H
31 #define __STM32F4xx_EXTI_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f4xx.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;
94 
95 /* Exported constants --------------------------------------------------------*/
96 
105 #define EXTI_Line0 ((uint32_t)0x00001)
106 #define EXTI_Line1 ((uint32_t)0x00002)
107 #define EXTI_Line2 ((uint32_t)0x00004)
108 #define EXTI_Line3 ((uint32_t)0x00008)
109 #define EXTI_Line4 ((uint32_t)0x00010)
110 #define EXTI_Line5 ((uint32_t)0x00020)
111 #define EXTI_Line6 ((uint32_t)0x00040)
112 #define EXTI_Line7 ((uint32_t)0x00080)
113 #define EXTI_Line8 ((uint32_t)0x00100)
114 #define EXTI_Line9 ((uint32_t)0x00200)
115 #define EXTI_Line10 ((uint32_t)0x00400)
116 #define EXTI_Line11 ((uint32_t)0x00800)
117 #define EXTI_Line12 ((uint32_t)0x01000)
118 #define EXTI_Line13 ((uint32_t)0x02000)
119 #define EXTI_Line14 ((uint32_t)0x04000)
120 #define EXTI_Line15 ((uint32_t)0x08000)
121 #define EXTI_Line16 ((uint32_t)0x10000)
122 #define EXTI_Line17 ((uint32_t)0x20000)
123 #define EXTI_Line18 ((uint32_t)0x40000)
124 #define EXTI_Line19 ((uint32_t)0x80000)
125 #define EXTI_Line20 ((uint32_t)0x00100000)
126 #define EXTI_Line21 ((uint32_t)0x00200000)
127 #define EXTI_Line22 ((uint32_t)0x00400000)
129 #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFF800000) == 0x00) && ((LINE) != (uint16_t)0x00))
130 
131 #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \
132  ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \
133  ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \
134  ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \
135  ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \
136  ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \
137  ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \
138  ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \
139  ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \
140  ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19) || \
141  ((LINE) == EXTI_Line20) || ((LINE) == EXTI_Line21) ||\
142  ((LINE) == EXTI_Line22))
143 
152 /* Exported macro ------------------------------------------------------------*/
153 /* Exported functions --------------------------------------------------------*/
154 
155 /* Function used to set the EXTI configuration to the default reset state *****/
156 void EXTI_DeInit(void);
157 
158 /* Initialization and Configuration functions *********************************/
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 
163 /* Interrupts and flags management functions **********************************/
164 FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line);
165 void EXTI_ClearFlag(uint32_t EXTI_Line);
166 ITStatus EXTI_GetITStatus(uint32_t EXTI_Line);
167 void EXTI_ClearITPendingBit(uint32_t EXTI_Line);
168 
169 #ifdef __cplusplus
170 }
171 #endif
172 
173 #endif /* __STM32F4xx_EXTI_H */
174 
183 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
FunctionalState EXTI_LineCmd
FlagStatus
Definition: stm32f4xx.h:706
EXTITrigger_TypeDef EXTI_Trigger
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.
CMSIS Cortex-M4 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...
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.
EXTIMode_TypeDef EXTI_Mode
void EXTI_ClearFlag(uint32_t EXTI_Line)
Clears the EXTI's line pending flags.
void EXTI_ClearITPendingBit(uint32_t EXTI_Line)
Clears the EXTI's line pending bits.
EXTITrigger_TypeDef
EXTI Trigger enumeration.
EXTIMode_TypeDef
EXTI mode enumeration.


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:19