mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/stm32f10x_exti.h@84:f54042cbc282, 2014-02-03 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Feb 03 09:30:05 2014 +0000
- Revision:
- 84:f54042cbc282
- Parent:
- 70:c1fbde68b492
Synchronized with git revision bbbd8699601c42149ccf0c37bc42bb6856ccc4c6
Full URL: https://github.com/mbedmicro/mbed/commit/bbbd8699601c42149ccf0c37bc42bb6856ccc4c6/
[NUCLEO_L152RE/F030_R8] SPI, I2C, Ticker, PWM updates
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 52:a51c77007319 | 1 | /** |
mbed_official | 52:a51c77007319 | 2 | ****************************************************************************** |
mbed_official | 52:a51c77007319 | 3 | * @file stm32f10x_exti.h |
mbed_official | 52:a51c77007319 | 4 | * @author MCD Application Team |
mbed_official | 84:f54042cbc282 | 5 | * @version V3.6.1 |
mbed_official | 84:f54042cbc282 | 6 | * @date 05-March-2012 |
mbed_official | 52:a51c77007319 | 7 | * @brief This file contains all the functions prototypes for the EXTI firmware |
mbed_official | 52:a51c77007319 | 8 | * library. |
mbed_official | 70:c1fbde68b492 | 9 | ******************************************************************************* |
mbed_official | 70:c1fbde68b492 | 10 | * Copyright (c) 2014, STMicroelectronics |
mbed_official | 70:c1fbde68b492 | 11 | * All rights reserved. |
mbed_official | 70:c1fbde68b492 | 12 | * |
mbed_official | 70:c1fbde68b492 | 13 | * Redistribution and use in source and binary forms, with or without |
mbed_official | 70:c1fbde68b492 | 14 | * modification, are permitted provided that the following conditions are met: |
mbed_official | 70:c1fbde68b492 | 15 | * |
mbed_official | 70:c1fbde68b492 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 70:c1fbde68b492 | 17 | * this list of conditions and the following disclaimer. |
mbed_official | 70:c1fbde68b492 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 70:c1fbde68b492 | 19 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 70:c1fbde68b492 | 20 | * and/or other materials provided with the distribution. |
mbed_official | 70:c1fbde68b492 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 70:c1fbde68b492 | 22 | * may be used to endorse or promote products derived from this software |
mbed_official | 70:c1fbde68b492 | 23 | * without specific prior written permission. |
mbed_official | 70:c1fbde68b492 | 24 | * |
mbed_official | 70:c1fbde68b492 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 70:c1fbde68b492 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 70:c1fbde68b492 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 70:c1fbde68b492 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 70:c1fbde68b492 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 70:c1fbde68b492 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 70:c1fbde68b492 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 70:c1fbde68b492 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 70:c1fbde68b492 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 70:c1fbde68b492 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 70:c1fbde68b492 | 35 | ******************************************************************************* |
mbed_official | 70:c1fbde68b492 | 36 | */ |
mbed_official | 52:a51c77007319 | 37 | |
mbed_official | 52:a51c77007319 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 52:a51c77007319 | 39 | #ifndef __STM32F10x_EXTI_H |
mbed_official | 52:a51c77007319 | 40 | #define __STM32F10x_EXTI_H |
mbed_official | 52:a51c77007319 | 41 | |
mbed_official | 52:a51c77007319 | 42 | #ifdef __cplusplus |
mbed_official | 52:a51c77007319 | 43 | extern "C" { |
mbed_official | 52:a51c77007319 | 44 | #endif |
mbed_official | 52:a51c77007319 | 45 | |
mbed_official | 52:a51c77007319 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 52:a51c77007319 | 47 | #include "stm32f10x.h" |
mbed_official | 52:a51c77007319 | 48 | |
mbed_official | 52:a51c77007319 | 49 | /** @addtogroup STM32F10x_StdPeriph_Driver |
mbed_official | 52:a51c77007319 | 50 | * @{ |
mbed_official | 52:a51c77007319 | 51 | */ |
mbed_official | 52:a51c77007319 | 52 | |
mbed_official | 52:a51c77007319 | 53 | /** @addtogroup EXTI |
mbed_official | 52:a51c77007319 | 54 | * @{ |
mbed_official | 52:a51c77007319 | 55 | */ |
mbed_official | 52:a51c77007319 | 56 | |
mbed_official | 52:a51c77007319 | 57 | /** @defgroup EXTI_Exported_Types |
mbed_official | 52:a51c77007319 | 58 | * @{ |
mbed_official | 52:a51c77007319 | 59 | */ |
mbed_official | 52:a51c77007319 | 60 | |
mbed_official | 52:a51c77007319 | 61 | /** |
mbed_official | 52:a51c77007319 | 62 | * @brief EXTI mode enumeration |
mbed_official | 52:a51c77007319 | 63 | */ |
mbed_official | 52:a51c77007319 | 64 | |
mbed_official | 52:a51c77007319 | 65 | typedef enum |
mbed_official | 52:a51c77007319 | 66 | { |
mbed_official | 52:a51c77007319 | 67 | EXTI_Mode_Interrupt = 0x00, |
mbed_official | 52:a51c77007319 | 68 | EXTI_Mode_Event = 0x04 |
mbed_official | 52:a51c77007319 | 69 | }EXTIMode_TypeDef; |
mbed_official | 52:a51c77007319 | 70 | |
mbed_official | 52:a51c77007319 | 71 | #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event)) |
mbed_official | 52:a51c77007319 | 72 | |
mbed_official | 52:a51c77007319 | 73 | /** |
mbed_official | 52:a51c77007319 | 74 | * @brief EXTI Trigger enumeration |
mbed_official | 52:a51c77007319 | 75 | */ |
mbed_official | 52:a51c77007319 | 76 | |
mbed_official | 52:a51c77007319 | 77 | typedef enum |
mbed_official | 52:a51c77007319 | 78 | { |
mbed_official | 52:a51c77007319 | 79 | EXTI_Trigger_Rising = 0x08, |
mbed_official | 52:a51c77007319 | 80 | EXTI_Trigger_Falling = 0x0C, |
mbed_official | 52:a51c77007319 | 81 | EXTI_Trigger_Rising_Falling = 0x10 |
mbed_official | 52:a51c77007319 | 82 | }EXTITrigger_TypeDef; |
mbed_official | 52:a51c77007319 | 83 | |
mbed_official | 52:a51c77007319 | 84 | #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \ |
mbed_official | 52:a51c77007319 | 85 | ((TRIGGER) == EXTI_Trigger_Falling) || \ |
mbed_official | 52:a51c77007319 | 86 | ((TRIGGER) == EXTI_Trigger_Rising_Falling)) |
mbed_official | 52:a51c77007319 | 87 | /** |
mbed_official | 52:a51c77007319 | 88 | * @brief EXTI Init Structure definition |
mbed_official | 52:a51c77007319 | 89 | */ |
mbed_official | 52:a51c77007319 | 90 | |
mbed_official | 52:a51c77007319 | 91 | typedef struct |
mbed_official | 52:a51c77007319 | 92 | { |
mbed_official | 52:a51c77007319 | 93 | uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled. |
mbed_official | 52:a51c77007319 | 94 | This parameter can be any combination of @ref EXTI_Lines */ |
mbed_official | 52:a51c77007319 | 95 | |
mbed_official | 52:a51c77007319 | 96 | EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines. |
mbed_official | 52:a51c77007319 | 97 | This parameter can be a value of @ref EXTIMode_TypeDef */ |
mbed_official | 52:a51c77007319 | 98 | |
mbed_official | 52:a51c77007319 | 99 | EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines. |
mbed_official | 84:f54042cbc282 | 100 | This parameter can be a value of @ref EXTITrigger_TypeDef */ |
mbed_official | 52:a51c77007319 | 101 | |
mbed_official | 52:a51c77007319 | 102 | FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines. |
mbed_official | 52:a51c77007319 | 103 | This parameter can be set either to ENABLE or DISABLE */ |
mbed_official | 52:a51c77007319 | 104 | }EXTI_InitTypeDef; |
mbed_official | 52:a51c77007319 | 105 | |
mbed_official | 52:a51c77007319 | 106 | /** |
mbed_official | 52:a51c77007319 | 107 | * @} |
mbed_official | 52:a51c77007319 | 108 | */ |
mbed_official | 52:a51c77007319 | 109 | |
mbed_official | 52:a51c77007319 | 110 | /** @defgroup EXTI_Exported_Constants |
mbed_official | 52:a51c77007319 | 111 | * @{ |
mbed_official | 52:a51c77007319 | 112 | */ |
mbed_official | 52:a51c77007319 | 113 | |
mbed_official | 52:a51c77007319 | 114 | /** @defgroup EXTI_Lines |
mbed_official | 52:a51c77007319 | 115 | * @{ |
mbed_official | 52:a51c77007319 | 116 | */ |
mbed_official | 52:a51c77007319 | 117 | |
mbed_official | 52:a51c77007319 | 118 | #define EXTI_Line0 ((uint32_t)0x00001) /*!< External interrupt line 0 */ |
mbed_official | 52:a51c77007319 | 119 | #define EXTI_Line1 ((uint32_t)0x00002) /*!< External interrupt line 1 */ |
mbed_official | 52:a51c77007319 | 120 | #define EXTI_Line2 ((uint32_t)0x00004) /*!< External interrupt line 2 */ |
mbed_official | 52:a51c77007319 | 121 | #define EXTI_Line3 ((uint32_t)0x00008) /*!< External interrupt line 3 */ |
mbed_official | 52:a51c77007319 | 122 | #define EXTI_Line4 ((uint32_t)0x00010) /*!< External interrupt line 4 */ |
mbed_official | 52:a51c77007319 | 123 | #define EXTI_Line5 ((uint32_t)0x00020) /*!< External interrupt line 5 */ |
mbed_official | 52:a51c77007319 | 124 | #define EXTI_Line6 ((uint32_t)0x00040) /*!< External interrupt line 6 */ |
mbed_official | 52:a51c77007319 | 125 | #define EXTI_Line7 ((uint32_t)0x00080) /*!< External interrupt line 7 */ |
mbed_official | 52:a51c77007319 | 126 | #define EXTI_Line8 ((uint32_t)0x00100) /*!< External interrupt line 8 */ |
mbed_official | 52:a51c77007319 | 127 | #define EXTI_Line9 ((uint32_t)0x00200) /*!< External interrupt line 9 */ |
mbed_official | 52:a51c77007319 | 128 | #define EXTI_Line10 ((uint32_t)0x00400) /*!< External interrupt line 10 */ |
mbed_official | 52:a51c77007319 | 129 | #define EXTI_Line11 ((uint32_t)0x00800) /*!< External interrupt line 11 */ |
mbed_official | 52:a51c77007319 | 130 | #define EXTI_Line12 ((uint32_t)0x01000) /*!< External interrupt line 12 */ |
mbed_official | 52:a51c77007319 | 131 | #define EXTI_Line13 ((uint32_t)0x02000) /*!< External interrupt line 13 */ |
mbed_official | 52:a51c77007319 | 132 | #define EXTI_Line14 ((uint32_t)0x04000) /*!< External interrupt line 14 */ |
mbed_official | 52:a51c77007319 | 133 | #define EXTI_Line15 ((uint32_t)0x08000) /*!< External interrupt line 15 */ |
mbed_official | 52:a51c77007319 | 134 | #define EXTI_Line16 ((uint32_t)0x10000) /*!< External interrupt line 16 Connected to the PVD Output */ |
mbed_official | 52:a51c77007319 | 135 | #define EXTI_Line17 ((uint32_t)0x20000) /*!< External interrupt line 17 Connected to the RTC Alarm event */ |
mbed_official | 52:a51c77007319 | 136 | #define EXTI_Line18 ((uint32_t)0x40000) /*!< External interrupt line 18 Connected to the USB Device/USB OTG FS |
mbed_official | 52:a51c77007319 | 137 | Wakeup from suspend event */ |
mbed_official | 52:a51c77007319 | 138 | #define EXTI_Line19 ((uint32_t)0x80000) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */ |
mbed_official | 52:a51c77007319 | 139 | |
mbed_official | 52:a51c77007319 | 140 | #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFFF00000) == 0x00) && ((LINE) != (uint16_t)0x00)) |
mbed_official | 52:a51c77007319 | 141 | #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \ |
mbed_official | 52:a51c77007319 | 142 | ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \ |
mbed_official | 52:a51c77007319 | 143 | ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \ |
mbed_official | 52:a51c77007319 | 144 | ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \ |
mbed_official | 52:a51c77007319 | 145 | ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \ |
mbed_official | 52:a51c77007319 | 146 | ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \ |
mbed_official | 52:a51c77007319 | 147 | ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \ |
mbed_official | 52:a51c77007319 | 148 | ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \ |
mbed_official | 52:a51c77007319 | 149 | ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \ |
mbed_official | 52:a51c77007319 | 150 | ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19)) |
mbed_official | 52:a51c77007319 | 151 | |
mbed_official | 52:a51c77007319 | 152 | |
mbed_official | 52:a51c77007319 | 153 | /** |
mbed_official | 52:a51c77007319 | 154 | * @} |
mbed_official | 52:a51c77007319 | 155 | */ |
mbed_official | 52:a51c77007319 | 156 | |
mbed_official | 52:a51c77007319 | 157 | /** |
mbed_official | 52:a51c77007319 | 158 | * @} |
mbed_official | 52:a51c77007319 | 159 | */ |
mbed_official | 52:a51c77007319 | 160 | |
mbed_official | 52:a51c77007319 | 161 | /** @defgroup EXTI_Exported_Macros |
mbed_official | 52:a51c77007319 | 162 | * @{ |
mbed_official | 52:a51c77007319 | 163 | */ |
mbed_official | 52:a51c77007319 | 164 | |
mbed_official | 52:a51c77007319 | 165 | /** |
mbed_official | 52:a51c77007319 | 166 | * @} |
mbed_official | 52:a51c77007319 | 167 | */ |
mbed_official | 52:a51c77007319 | 168 | |
mbed_official | 52:a51c77007319 | 169 | /** @defgroup EXTI_Exported_Functions |
mbed_official | 52:a51c77007319 | 170 | * @{ |
mbed_official | 52:a51c77007319 | 171 | */ |
mbed_official | 52:a51c77007319 | 172 | |
mbed_official | 52:a51c77007319 | 173 | void EXTI_DeInit(void); |
mbed_official | 52:a51c77007319 | 174 | void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct); |
mbed_official | 52:a51c77007319 | 175 | void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct); |
mbed_official | 52:a51c77007319 | 176 | void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line); |
mbed_official | 52:a51c77007319 | 177 | FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line); |
mbed_official | 52:a51c77007319 | 178 | void EXTI_ClearFlag(uint32_t EXTI_Line); |
mbed_official | 52:a51c77007319 | 179 | ITStatus EXTI_GetITStatus(uint32_t EXTI_Line); |
mbed_official | 52:a51c77007319 | 180 | void EXTI_ClearITPendingBit(uint32_t EXTI_Line); |
mbed_official | 52:a51c77007319 | 181 | |
mbed_official | 52:a51c77007319 | 182 | #ifdef __cplusplus |
mbed_official | 52:a51c77007319 | 183 | } |
mbed_official | 52:a51c77007319 | 184 | #endif |
mbed_official | 52:a51c77007319 | 185 | |
mbed_official | 52:a51c77007319 | 186 | #endif /* __STM32F10x_EXTI_H */ |
mbed_official | 52:a51c77007319 | 187 | /** |
mbed_official | 52:a51c77007319 | 188 | * @} |
mbed_official | 52:a51c77007319 | 189 | */ |
mbed_official | 52:a51c77007319 | 190 | |
mbed_official | 52:a51c77007319 | 191 | /** |
mbed_official | 52:a51c77007319 | 192 | * @} |
mbed_official | 52:a51c77007319 | 193 | */ |
mbed_official | 52:a51c77007319 | 194 | |
mbed_official | 52:a51c77007319 | 195 | /** |
mbed_official | 52:a51c77007319 | 196 | * @} |
mbed_official | 52:a51c77007319 | 197 | */ |
mbed_official | 52:a51c77007319 | 198 | |
mbed_official | 84:f54042cbc282 | 199 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |