mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_L152RE/stm32l1xx_exti.h@106:ced8cbb51063, 2014-02-26 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Feb 26 09:45:12 2014 +0000
- Revision:
- 106:ced8cbb51063
- Parent:
- 80:66393a7b209d
Synchronized with git revision 4222735eff5868389433f0e9271976b39c8115cd
Full URL: https://github.com/mbedmicro/mbed/commit/4222735eff5868389433f0e9271976b39c8115cd/
[NUCLEO_xxx] Update STM32CubeF4 driver V1.0.0 + update license
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 76:aeb1df146756 | 1 | /** |
mbed_official | 76:aeb1df146756 | 2 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 3 | * @file stm32l1xx_exti.h |
mbed_official | 76:aeb1df146756 | 4 | * @author MCD Application Team |
mbed_official | 80:66393a7b209d | 5 | * @version V1.3.0 |
mbed_official | 80:66393a7b209d | 6 | * @date 31-January-2014 |
mbed_official | 76:aeb1df146756 | 7 | * @brief This file contains all the functions prototypes for the EXTI firmware |
mbed_official | 76:aeb1df146756 | 8 | * library. |
mbed_official | 76:aeb1df146756 | 9 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 10 | * @attention |
mbed_official | 76:aeb1df146756 | 11 | * |
mbed_official | 106:ced8cbb51063 | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 76:aeb1df146756 | 13 | * |
mbed_official | 106:ced8cbb51063 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 106:ced8cbb51063 | 15 | * are permitted provided that the following conditions are met: |
mbed_official | 106:ced8cbb51063 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 106:ced8cbb51063 | 17 | * this list of conditions and the following disclaimer. |
mbed_official | 106:ced8cbb51063 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 106:ced8cbb51063 | 19 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 106:ced8cbb51063 | 20 | * and/or other materials provided with the distribution. |
mbed_official | 106:ced8cbb51063 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 106:ced8cbb51063 | 22 | * may be used to endorse or promote products derived from this software |
mbed_official | 106:ced8cbb51063 | 23 | * without specific prior written permission. |
mbed_official | 76:aeb1df146756 | 24 | * |
mbed_official | 106:ced8cbb51063 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 106:ced8cbb51063 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 106:ced8cbb51063 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 106:ced8cbb51063 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 106:ced8cbb51063 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 106:ced8cbb51063 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 106:ced8cbb51063 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 106:ced8cbb51063 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 106:ced8cbb51063 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 106:ced8cbb51063 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 76:aeb1df146756 | 35 | * |
mbed_official | 76:aeb1df146756 | 36 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 37 | */ |
mbed_official | 76:aeb1df146756 | 38 | |
mbed_official | 76:aeb1df146756 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 40 | #ifndef __STM32L1xx_EXTI_H |
mbed_official | 76:aeb1df146756 | 41 | #define __STM32L1xx_EXTI_H |
mbed_official | 76:aeb1df146756 | 42 | |
mbed_official | 76:aeb1df146756 | 43 | #ifdef __cplusplus |
mbed_official | 76:aeb1df146756 | 44 | extern "C" { |
mbed_official | 76:aeb1df146756 | 45 | #endif |
mbed_official | 76:aeb1df146756 | 46 | |
mbed_official | 76:aeb1df146756 | 47 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 48 | #include "stm32l1xx.h" |
mbed_official | 76:aeb1df146756 | 49 | |
mbed_official | 76:aeb1df146756 | 50 | /** @addtogroup STM32L1xx_StdPeriph_Driver |
mbed_official | 76:aeb1df146756 | 51 | * @{ |
mbed_official | 76:aeb1df146756 | 52 | */ |
mbed_official | 76:aeb1df146756 | 53 | |
mbed_official | 76:aeb1df146756 | 54 | /** @addtogroup EXTI |
mbed_official | 76:aeb1df146756 | 55 | * @{ |
mbed_official | 76:aeb1df146756 | 56 | */ |
mbed_official | 76:aeb1df146756 | 57 | |
mbed_official | 76:aeb1df146756 | 58 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 59 | |
mbed_official | 76:aeb1df146756 | 60 | /** |
mbed_official | 76:aeb1df146756 | 61 | * @brief EXTI mode enumeration |
mbed_official | 76:aeb1df146756 | 62 | */ |
mbed_official | 76:aeb1df146756 | 63 | |
mbed_official | 76:aeb1df146756 | 64 | typedef enum |
mbed_official | 76:aeb1df146756 | 65 | { |
mbed_official | 76:aeb1df146756 | 66 | EXTI_Mode_Interrupt = 0x00, |
mbed_official | 76:aeb1df146756 | 67 | EXTI_Mode_Event = 0x04 |
mbed_official | 76:aeb1df146756 | 68 | }EXTIMode_TypeDef; |
mbed_official | 76:aeb1df146756 | 69 | |
mbed_official | 76:aeb1df146756 | 70 | #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event)) |
mbed_official | 76:aeb1df146756 | 71 | |
mbed_official | 76:aeb1df146756 | 72 | /** |
mbed_official | 76:aeb1df146756 | 73 | * @brief EXTI Trigger enumeration |
mbed_official | 76:aeb1df146756 | 74 | */ |
mbed_official | 76:aeb1df146756 | 75 | |
mbed_official | 76:aeb1df146756 | 76 | typedef enum |
mbed_official | 76:aeb1df146756 | 77 | { |
mbed_official | 76:aeb1df146756 | 78 | EXTI_Trigger_Rising = 0x08, |
mbed_official | 76:aeb1df146756 | 79 | EXTI_Trigger_Falling = 0x0C, |
mbed_official | 76:aeb1df146756 | 80 | EXTI_Trigger_Rising_Falling = 0x10 |
mbed_official | 76:aeb1df146756 | 81 | }EXTITrigger_TypeDef; |
mbed_official | 76:aeb1df146756 | 82 | |
mbed_official | 76:aeb1df146756 | 83 | #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \ |
mbed_official | 76:aeb1df146756 | 84 | ((TRIGGER) == EXTI_Trigger_Falling) || \ |
mbed_official | 76:aeb1df146756 | 85 | ((TRIGGER) == EXTI_Trigger_Rising_Falling)) |
mbed_official | 76:aeb1df146756 | 86 | /** |
mbed_official | 76:aeb1df146756 | 87 | * @brief EXTI Init Structure definition |
mbed_official | 76:aeb1df146756 | 88 | */ |
mbed_official | 76:aeb1df146756 | 89 | |
mbed_official | 76:aeb1df146756 | 90 | typedef struct |
mbed_official | 76:aeb1df146756 | 91 | { |
mbed_official | 76:aeb1df146756 | 92 | uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled. |
mbed_official | 76:aeb1df146756 | 93 | This parameter can be any combination of @ref EXTI_Lines */ |
mbed_official | 76:aeb1df146756 | 94 | |
mbed_official | 76:aeb1df146756 | 95 | EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines. |
mbed_official | 76:aeb1df146756 | 96 | This parameter can be a value of @ref EXTIMode_TypeDef */ |
mbed_official | 76:aeb1df146756 | 97 | |
mbed_official | 76:aeb1df146756 | 98 | EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines. |
mbed_official | 76:aeb1df146756 | 99 | This parameter can be a value of @ref EXTITrigger_TypeDef */ |
mbed_official | 76:aeb1df146756 | 100 | |
mbed_official | 76:aeb1df146756 | 101 | FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines. |
mbed_official | 76:aeb1df146756 | 102 | This parameter can be set either to ENABLE or DISABLE */ |
mbed_official | 76:aeb1df146756 | 103 | }EXTI_InitTypeDef; |
mbed_official | 76:aeb1df146756 | 104 | |
mbed_official | 76:aeb1df146756 | 105 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 106 | |
mbed_official | 76:aeb1df146756 | 107 | /** @defgroup EXTI_Exported_Constants |
mbed_official | 76:aeb1df146756 | 108 | * @{ |
mbed_official | 76:aeb1df146756 | 109 | */ |
mbed_official | 76:aeb1df146756 | 110 | |
mbed_official | 76:aeb1df146756 | 111 | /** @defgroup EXTI_Lines |
mbed_official | 76:aeb1df146756 | 112 | * @{ |
mbed_official | 76:aeb1df146756 | 113 | */ |
mbed_official | 76:aeb1df146756 | 114 | |
mbed_official | 76:aeb1df146756 | 115 | #define EXTI_Line0 ((uint32_t)0x00000001) /*!< External interrupt line 0 */ |
mbed_official | 76:aeb1df146756 | 116 | #define EXTI_Line1 ((uint32_t)0x00000002) /*!< External interrupt line 1 */ |
mbed_official | 76:aeb1df146756 | 117 | #define EXTI_Line2 ((uint32_t)0x00000004) /*!< External interrupt line 2 */ |
mbed_official | 76:aeb1df146756 | 118 | #define EXTI_Line3 ((uint32_t)0x00000008) /*!< External interrupt line 3 */ |
mbed_official | 76:aeb1df146756 | 119 | #define EXTI_Line4 ((uint32_t)0x00000010) /*!< External interrupt line 4 */ |
mbed_official | 76:aeb1df146756 | 120 | #define EXTI_Line5 ((uint32_t)0x00000020) /*!< External interrupt line 5 */ |
mbed_official | 76:aeb1df146756 | 121 | #define EXTI_Line6 ((uint32_t)0x00000040) /*!< External interrupt line 6 */ |
mbed_official | 76:aeb1df146756 | 122 | #define EXTI_Line7 ((uint32_t)0x00000080) /*!< External interrupt line 7 */ |
mbed_official | 76:aeb1df146756 | 123 | #define EXTI_Line8 ((uint32_t)0x00000100) /*!< External interrupt line 8 */ |
mbed_official | 76:aeb1df146756 | 124 | #define EXTI_Line9 ((uint32_t)0x00000200) /*!< External interrupt line 9 */ |
mbed_official | 76:aeb1df146756 | 125 | #define EXTI_Line10 ((uint32_t)0x00000400) /*!< External interrupt line 10 */ |
mbed_official | 76:aeb1df146756 | 126 | #define EXTI_Line11 ((uint32_t)0x00000800) /*!< External interrupt line 11 */ |
mbed_official | 76:aeb1df146756 | 127 | #define EXTI_Line12 ((uint32_t)0x00001000) /*!< External interrupt line 12 */ |
mbed_official | 76:aeb1df146756 | 128 | #define EXTI_Line13 ((uint32_t)0x00002000) /*!< External interrupt line 13 */ |
mbed_official | 76:aeb1df146756 | 129 | #define EXTI_Line14 ((uint32_t)0x00004000) /*!< External interrupt line 14 */ |
mbed_official | 76:aeb1df146756 | 130 | #define EXTI_Line15 ((uint32_t)0x00008000) /*!< External interrupt line 15 */ |
mbed_official | 76:aeb1df146756 | 131 | #define EXTI_Line16 ((uint32_t)0x00010000) /*!< External interrupt line 16 |
mbed_official | 76:aeb1df146756 | 132 | Connected to the PVD Output */ |
mbed_official | 76:aeb1df146756 | 133 | #define EXTI_Line17 ((uint32_t)0x00020000) /*!< External interrupt line 17 |
mbed_official | 76:aeb1df146756 | 134 | Connected to the RTC Alarm |
mbed_official | 76:aeb1df146756 | 135 | event */ |
mbed_official | 76:aeb1df146756 | 136 | #define EXTI_Line18 ((uint32_t)0x00040000) /*!< External interrupt line 18 |
mbed_official | 76:aeb1df146756 | 137 | Connected to the USB Device |
mbed_official | 76:aeb1df146756 | 138 | FS Wakeup from suspend event */ |
mbed_official | 76:aeb1df146756 | 139 | #define EXTI_Line19 ((uint32_t)0x00080000) /*!< External interrupt line 19 |
mbed_official | 76:aeb1df146756 | 140 | Connected to the RTC Tamper |
mbed_official | 76:aeb1df146756 | 141 | and Time Stamp events */ |
mbed_official | 76:aeb1df146756 | 142 | #define EXTI_Line20 ((uint32_t)0x00100000) /*!< External interrupt line 20 |
mbed_official | 76:aeb1df146756 | 143 | Connected to the RTC Wakeup |
mbed_official | 76:aeb1df146756 | 144 | event */ |
mbed_official | 76:aeb1df146756 | 145 | #define EXTI_Line21 ((uint32_t)0x00200000) /*!< External interrupt line 21 |
mbed_official | 76:aeb1df146756 | 146 | Connected to the Comparator 1 |
mbed_official | 76:aeb1df146756 | 147 | event */ |
mbed_official | 76:aeb1df146756 | 148 | |
mbed_official | 76:aeb1df146756 | 149 | #define EXTI_Line22 ((uint32_t)0x00400000) /*!< External interrupt line 22 |
mbed_official | 76:aeb1df146756 | 150 | Connected to the Comparator 2 |
mbed_official | 76:aeb1df146756 | 151 | event */ |
mbed_official | 76:aeb1df146756 | 152 | |
mbed_official | 76:aeb1df146756 | 153 | #define EXTI_Line23 ((uint32_t)0x00800000) /*!< External interrupt line 23 |
mbed_official | 76:aeb1df146756 | 154 | Comparator channel acquisition event */ |
mbed_official | 76:aeb1df146756 | 155 | |
mbed_official | 76:aeb1df146756 | 156 | #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFF000000) == 0x00) && ((LINE) != (uint16_t)0x00)) |
mbed_official | 76:aeb1df146756 | 157 | |
mbed_official | 76:aeb1df146756 | 158 | #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \ |
mbed_official | 76:aeb1df146756 | 159 | ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \ |
mbed_official | 76:aeb1df146756 | 160 | ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \ |
mbed_official | 76:aeb1df146756 | 161 | ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \ |
mbed_official | 76:aeb1df146756 | 162 | ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \ |
mbed_official | 76:aeb1df146756 | 163 | ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \ |
mbed_official | 76:aeb1df146756 | 164 | ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \ |
mbed_official | 76:aeb1df146756 | 165 | ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \ |
mbed_official | 76:aeb1df146756 | 166 | ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \ |
mbed_official | 76:aeb1df146756 | 167 | ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19) || \ |
mbed_official | 76:aeb1df146756 | 168 | ((LINE) == EXTI_Line20) || ((LINE) == EXTI_Line21) || \ |
mbed_official | 76:aeb1df146756 | 169 | ((LINE) == EXTI_Line22) || ((LINE) == EXTI_Line23)) |
mbed_official | 76:aeb1df146756 | 170 | |
mbed_official | 76:aeb1df146756 | 171 | /** |
mbed_official | 76:aeb1df146756 | 172 | * @} |
mbed_official | 76:aeb1df146756 | 173 | */ |
mbed_official | 76:aeb1df146756 | 174 | |
mbed_official | 76:aeb1df146756 | 175 | /** |
mbed_official | 76:aeb1df146756 | 176 | * @} |
mbed_official | 76:aeb1df146756 | 177 | */ |
mbed_official | 76:aeb1df146756 | 178 | |
mbed_official | 76:aeb1df146756 | 179 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 180 | /* Exported functions ------------------------------------------------------- */ |
mbed_official | 76:aeb1df146756 | 181 | /* Function used to set the EXTI configuration to the default reset state *****/ |
mbed_official | 76:aeb1df146756 | 182 | void EXTI_DeInit(void); |
mbed_official | 76:aeb1df146756 | 183 | |
mbed_official | 76:aeb1df146756 | 184 | /* Initialization and Configuration functions *********************************/ |
mbed_official | 76:aeb1df146756 | 185 | void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct); |
mbed_official | 76:aeb1df146756 | 186 | void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct); |
mbed_official | 76:aeb1df146756 | 187 | void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line); |
mbed_official | 76:aeb1df146756 | 188 | |
mbed_official | 76:aeb1df146756 | 189 | /* Interrupts and flags management functions **********************************/ |
mbed_official | 76:aeb1df146756 | 190 | FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line); |
mbed_official | 76:aeb1df146756 | 191 | void EXTI_ClearFlag(uint32_t EXTI_Line); |
mbed_official | 76:aeb1df146756 | 192 | ITStatus EXTI_GetITStatus(uint32_t EXTI_Line); |
mbed_official | 76:aeb1df146756 | 193 | void EXTI_ClearITPendingBit(uint32_t EXTI_Line); |
mbed_official | 76:aeb1df146756 | 194 | |
mbed_official | 76:aeb1df146756 | 195 | #ifdef __cplusplus |
mbed_official | 76:aeb1df146756 | 196 | } |
mbed_official | 76:aeb1df146756 | 197 | #endif |
mbed_official | 76:aeb1df146756 | 198 | |
mbed_official | 76:aeb1df146756 | 199 | #endif /* __STM32L1xx_EXTI_H */ |
mbed_official | 76:aeb1df146756 | 200 | |
mbed_official | 76:aeb1df146756 | 201 | /** |
mbed_official | 76:aeb1df146756 | 202 | * @} |
mbed_official | 76:aeb1df146756 | 203 | */ |
mbed_official | 76:aeb1df146756 | 204 | |
mbed_official | 76:aeb1df146756 | 205 | /** |
mbed_official | 76:aeb1df146756 | 206 | * @} |
mbed_official | 76:aeb1df146756 | 207 | */ |
mbed_official | 76:aeb1df146756 | 208 | |
mbed_official | 76:aeb1df146756 | 209 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |