Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
stm32f10x_exti.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f10x_exti.h 00004 * @author MCD Application Team 00005 * @version V3.5.0 00006 * @date 11-March-2011 00007 * @brief This file contains all the functions prototypes for the EXTI firmware 00008 * library. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 00013 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 00014 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 00015 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 00016 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 00017 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 00018 * 00019 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2> 00020 ****************************************************************************** 00021 */ 00022 00023 /* Define to prevent recursive inclusion -------------------------------------*/ 00024 #ifndef __STM32F10x_EXTI_H 00025 #define __STM32F10x_EXTI_H 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 /* Includes ------------------------------------------------------------------*/ 00032 #include "stm32f10x.h" 00033 00034 /** @addtogroup STM32F10x_StdPeriph_Driver 00035 * @{ 00036 */ 00037 00038 /** @addtogroup EXTI 00039 * @{ 00040 */ 00041 00042 /** @defgroup EXTI_Exported_Types 00043 * @{ 00044 */ 00045 00046 /** 00047 * @brief EXTI mode enumeration 00048 */ 00049 00050 typedef enum 00051 { 00052 EXTI_Mode_Interrupt = 0x00, 00053 EXTI_Mode_Event = 0x04 00054 }EXTIMode_TypeDef; 00055 00056 #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event)) 00057 00058 /** 00059 * @brief EXTI Trigger enumeration 00060 */ 00061 00062 typedef enum 00063 { 00064 EXTI_Trigger_Rising = 0x08, 00065 EXTI_Trigger_Falling = 0x0C, 00066 EXTI_Trigger_Rising_Falling = 0x10 00067 }EXTITrigger_TypeDef; 00068 00069 #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \ 00070 ((TRIGGER) == EXTI_Trigger_Falling) || \ 00071 ((TRIGGER) == EXTI_Trigger_Rising_Falling)) 00072 /** 00073 * @brief EXTI Init Structure definition 00074 */ 00075 00076 typedef struct 00077 { 00078 uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled. 00079 This parameter can be any combination of @ref EXTI_Lines */ 00080 00081 EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines. 00082 This parameter can be a value of @ref EXTIMode_TypeDef */ 00083 00084 EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines. 00085 This parameter can be a value of @ref EXTIMode_TypeDef */ 00086 00087 FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines. 00088 This parameter can be set either to ENABLE or DISABLE */ 00089 }EXTI_InitTypeDef; 00090 00091 /** 00092 * @} 00093 */ 00094 00095 /** @defgroup EXTI_Exported_Constants 00096 * @{ 00097 */ 00098 00099 /** @defgroup EXTI_Lines 00100 * @{ 00101 */ 00102 00103 #define EXTI_Line0 ((uint32_t)0x00001) /*!< External interrupt line 0 */ 00104 #define EXTI_Line1 ((uint32_t)0x00002) /*!< External interrupt line 1 */ 00105 #define EXTI_Line2 ((uint32_t)0x00004) /*!< External interrupt line 2 */ 00106 #define EXTI_Line3 ((uint32_t)0x00008) /*!< External interrupt line 3 */ 00107 #define EXTI_Line4 ((uint32_t)0x00010) /*!< External interrupt line 4 */ 00108 #define EXTI_Line5 ((uint32_t)0x00020) /*!< External interrupt line 5 */ 00109 #define EXTI_Line6 ((uint32_t)0x00040) /*!< External interrupt line 6 */ 00110 #define EXTI_Line7 ((uint32_t)0x00080) /*!< External interrupt line 7 */ 00111 #define EXTI_Line8 ((uint32_t)0x00100) /*!< External interrupt line 8 */ 00112 #define EXTI_Line9 ((uint32_t)0x00200) /*!< External interrupt line 9 */ 00113 #define EXTI_Line10 ((uint32_t)0x00400) /*!< External interrupt line 10 */ 00114 #define EXTI_Line11 ((uint32_t)0x00800) /*!< External interrupt line 11 */ 00115 #define EXTI_Line12 ((uint32_t)0x01000) /*!< External interrupt line 12 */ 00116 #define EXTI_Line13 ((uint32_t)0x02000) /*!< External interrupt line 13 */ 00117 #define EXTI_Line14 ((uint32_t)0x04000) /*!< External interrupt line 14 */ 00118 #define EXTI_Line15 ((uint32_t)0x08000) /*!< External interrupt line 15 */ 00119 #define EXTI_Line16 ((uint32_t)0x10000) /*!< External interrupt line 16 Connected to the PVD Output */ 00120 #define EXTI_Line17 ((uint32_t)0x20000) /*!< External interrupt line 17 Connected to the RTC Alarm event */ 00121 #define EXTI_Line18 ((uint32_t)0x40000) /*!< External interrupt line 18 Connected to the USB Device/USB OTG FS 00122 Wakeup from suspend event */ 00123 #define EXTI_Line19 ((uint32_t)0x80000) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */ 00124 00125 #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFFF00000) == 0x00) && ((LINE) != (uint16_t)0x00)) 00126 #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \ 00127 ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \ 00128 ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \ 00129 ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \ 00130 ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \ 00131 ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \ 00132 ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \ 00133 ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \ 00134 ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \ 00135 ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19)) 00136 00137 00138 /** 00139 * @} 00140 */ 00141 00142 /** 00143 * @} 00144 */ 00145 00146 /** @defgroup EXTI_Exported_Macros 00147 * @{ 00148 */ 00149 00150 /** 00151 * @} 00152 */ 00153 00154 /** @defgroup EXTI_Exported_Functions 00155 * @{ 00156 */ 00157 00158 void EXTI_DeInit(void); 00159 void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct); 00160 void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct); 00161 void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line); 00162 FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line); 00163 void EXTI_ClearFlag(uint32_t EXTI_Line); 00164 ITStatus EXTI_GetITStatus(uint32_t EXTI_Line); 00165 void EXTI_ClearITPendingBit(uint32_t EXTI_Line); 00166 00167 #ifdef __cplusplus 00168 } 00169 #endif 00170 00171 #endif /* __STM32F10x_EXTI_H */ 00172 /** 00173 * @} 00174 */ 00175 00176 /** 00177 * @} 00178 */ 00179 00180 /** 00181 * @} 00182 */ 00183 00184 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 20:45:31 by
 1.7.2
 1.7.2