mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Dec 02 11:30:05 2013 +0000
Revision:
52:a51c77007319
Child:
70:c1fbde68b492
Synchronized with git revision 49df530ae72ce97ccc773d1f2c13b38e868e6abd

Full URL: https://github.com/mbedmicro/mbed/commit/49df530ae72ce97ccc773d1f2c13b38e868e6abd/

Add STMicroelectronics NUCLEO_F103RB target

Who changed what in which revision?

UserRevisionLine numberNew 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 52:a51c77007319 5 * @version V3.5.0
mbed_official 52:a51c77007319 6 * @date 11-March-2011
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 52:a51c77007319 9 ******************************************************************************
mbed_official 52:a51c77007319 10 * @attention
mbed_official 52:a51c77007319 11 *
mbed_official 52:a51c77007319 12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
mbed_official 52:a51c77007319 13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
mbed_official 52:a51c77007319 14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
mbed_official 52:a51c77007319 15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
mbed_official 52:a51c77007319 16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
mbed_official 52:a51c77007319 17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
mbed_official 52:a51c77007319 18 *
mbed_official 52:a51c77007319 19 * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
mbed_official 52:a51c77007319 20 ******************************************************************************
mbed_official 52:a51c77007319 21 */
mbed_official 52:a51c77007319 22
mbed_official 52:a51c77007319 23 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 52:a51c77007319 24 #ifndef __STM32F10x_EXTI_H
mbed_official 52:a51c77007319 25 #define __STM32F10x_EXTI_H
mbed_official 52:a51c77007319 26
mbed_official 52:a51c77007319 27 #ifdef __cplusplus
mbed_official 52:a51c77007319 28 extern "C" {
mbed_official 52:a51c77007319 29 #endif
mbed_official 52:a51c77007319 30
mbed_official 52:a51c77007319 31 /* Includes ------------------------------------------------------------------*/
mbed_official 52:a51c77007319 32 #include "stm32f10x.h"
mbed_official 52:a51c77007319 33
mbed_official 52:a51c77007319 34 /** @addtogroup STM32F10x_StdPeriph_Driver
mbed_official 52:a51c77007319 35 * @{
mbed_official 52:a51c77007319 36 */
mbed_official 52:a51c77007319 37
mbed_official 52:a51c77007319 38 /** @addtogroup EXTI
mbed_official 52:a51c77007319 39 * @{
mbed_official 52:a51c77007319 40 */
mbed_official 52:a51c77007319 41
mbed_official 52:a51c77007319 42 /** @defgroup EXTI_Exported_Types
mbed_official 52:a51c77007319 43 * @{
mbed_official 52:a51c77007319 44 */
mbed_official 52:a51c77007319 45
mbed_official 52:a51c77007319 46 /**
mbed_official 52:a51c77007319 47 * @brief EXTI mode enumeration
mbed_official 52:a51c77007319 48 */
mbed_official 52:a51c77007319 49
mbed_official 52:a51c77007319 50 typedef enum
mbed_official 52:a51c77007319 51 {
mbed_official 52:a51c77007319 52 EXTI_Mode_Interrupt = 0x00,
mbed_official 52:a51c77007319 53 EXTI_Mode_Event = 0x04
mbed_official 52:a51c77007319 54 }EXTIMode_TypeDef;
mbed_official 52:a51c77007319 55
mbed_official 52:a51c77007319 56 #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event))
mbed_official 52:a51c77007319 57
mbed_official 52:a51c77007319 58 /**
mbed_official 52:a51c77007319 59 * @brief EXTI Trigger enumeration
mbed_official 52:a51c77007319 60 */
mbed_official 52:a51c77007319 61
mbed_official 52:a51c77007319 62 typedef enum
mbed_official 52:a51c77007319 63 {
mbed_official 52:a51c77007319 64 EXTI_Trigger_Rising = 0x08,
mbed_official 52:a51c77007319 65 EXTI_Trigger_Falling = 0x0C,
mbed_official 52:a51c77007319 66 EXTI_Trigger_Rising_Falling = 0x10
mbed_official 52:a51c77007319 67 }EXTITrigger_TypeDef;
mbed_official 52:a51c77007319 68
mbed_official 52:a51c77007319 69 #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \
mbed_official 52:a51c77007319 70 ((TRIGGER) == EXTI_Trigger_Falling) || \
mbed_official 52:a51c77007319 71 ((TRIGGER) == EXTI_Trigger_Rising_Falling))
mbed_official 52:a51c77007319 72 /**
mbed_official 52:a51c77007319 73 * @brief EXTI Init Structure definition
mbed_official 52:a51c77007319 74 */
mbed_official 52:a51c77007319 75
mbed_official 52:a51c77007319 76 typedef struct
mbed_official 52:a51c77007319 77 {
mbed_official 52:a51c77007319 78 uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled.
mbed_official 52:a51c77007319 79 This parameter can be any combination of @ref EXTI_Lines */
mbed_official 52:a51c77007319 80
mbed_official 52:a51c77007319 81 EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines.
mbed_official 52:a51c77007319 82 This parameter can be a value of @ref EXTIMode_TypeDef */
mbed_official 52:a51c77007319 83
mbed_official 52:a51c77007319 84 EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines.
mbed_official 52:a51c77007319 85 This parameter can be a value of @ref EXTIMode_TypeDef */
mbed_official 52:a51c77007319 86
mbed_official 52:a51c77007319 87 FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines.
mbed_official 52:a51c77007319 88 This parameter can be set either to ENABLE or DISABLE */
mbed_official 52:a51c77007319 89 }EXTI_InitTypeDef;
mbed_official 52:a51c77007319 90
mbed_official 52:a51c77007319 91 /**
mbed_official 52:a51c77007319 92 * @}
mbed_official 52:a51c77007319 93 */
mbed_official 52:a51c77007319 94
mbed_official 52:a51c77007319 95 /** @defgroup EXTI_Exported_Constants
mbed_official 52:a51c77007319 96 * @{
mbed_official 52:a51c77007319 97 */
mbed_official 52:a51c77007319 98
mbed_official 52:a51c77007319 99 /** @defgroup EXTI_Lines
mbed_official 52:a51c77007319 100 * @{
mbed_official 52:a51c77007319 101 */
mbed_official 52:a51c77007319 102
mbed_official 52:a51c77007319 103 #define EXTI_Line0 ((uint32_t)0x00001) /*!< External interrupt line 0 */
mbed_official 52:a51c77007319 104 #define EXTI_Line1 ((uint32_t)0x00002) /*!< External interrupt line 1 */
mbed_official 52:a51c77007319 105 #define EXTI_Line2 ((uint32_t)0x00004) /*!< External interrupt line 2 */
mbed_official 52:a51c77007319 106 #define EXTI_Line3 ((uint32_t)0x00008) /*!< External interrupt line 3 */
mbed_official 52:a51c77007319 107 #define EXTI_Line4 ((uint32_t)0x00010) /*!< External interrupt line 4 */
mbed_official 52:a51c77007319 108 #define EXTI_Line5 ((uint32_t)0x00020) /*!< External interrupt line 5 */
mbed_official 52:a51c77007319 109 #define EXTI_Line6 ((uint32_t)0x00040) /*!< External interrupt line 6 */
mbed_official 52:a51c77007319 110 #define EXTI_Line7 ((uint32_t)0x00080) /*!< External interrupt line 7 */
mbed_official 52:a51c77007319 111 #define EXTI_Line8 ((uint32_t)0x00100) /*!< External interrupt line 8 */
mbed_official 52:a51c77007319 112 #define EXTI_Line9 ((uint32_t)0x00200) /*!< External interrupt line 9 */
mbed_official 52:a51c77007319 113 #define EXTI_Line10 ((uint32_t)0x00400) /*!< External interrupt line 10 */
mbed_official 52:a51c77007319 114 #define EXTI_Line11 ((uint32_t)0x00800) /*!< External interrupt line 11 */
mbed_official 52:a51c77007319 115 #define EXTI_Line12 ((uint32_t)0x01000) /*!< External interrupt line 12 */
mbed_official 52:a51c77007319 116 #define EXTI_Line13 ((uint32_t)0x02000) /*!< External interrupt line 13 */
mbed_official 52:a51c77007319 117 #define EXTI_Line14 ((uint32_t)0x04000) /*!< External interrupt line 14 */
mbed_official 52:a51c77007319 118 #define EXTI_Line15 ((uint32_t)0x08000) /*!< External interrupt line 15 */
mbed_official 52:a51c77007319 119 #define EXTI_Line16 ((uint32_t)0x10000) /*!< External interrupt line 16 Connected to the PVD Output */
mbed_official 52:a51c77007319 120 #define EXTI_Line17 ((uint32_t)0x20000) /*!< External interrupt line 17 Connected to the RTC Alarm event */
mbed_official 52:a51c77007319 121 #define EXTI_Line18 ((uint32_t)0x40000) /*!< External interrupt line 18 Connected to the USB Device/USB OTG FS
mbed_official 52:a51c77007319 122 Wakeup from suspend event */
mbed_official 52:a51c77007319 123 #define EXTI_Line19 ((uint32_t)0x80000) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */
mbed_official 52:a51c77007319 124
mbed_official 52:a51c77007319 125 #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFFF00000) == 0x00) && ((LINE) != (uint16_t)0x00))
mbed_official 52:a51c77007319 126 #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \
mbed_official 52:a51c77007319 127 ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \
mbed_official 52:a51c77007319 128 ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \
mbed_official 52:a51c77007319 129 ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \
mbed_official 52:a51c77007319 130 ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \
mbed_official 52:a51c77007319 131 ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \
mbed_official 52:a51c77007319 132 ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \
mbed_official 52:a51c77007319 133 ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \
mbed_official 52:a51c77007319 134 ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \
mbed_official 52:a51c77007319 135 ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19))
mbed_official 52:a51c77007319 136
mbed_official 52:a51c77007319 137
mbed_official 52:a51c77007319 138 /**
mbed_official 52:a51c77007319 139 * @}
mbed_official 52:a51c77007319 140 */
mbed_official 52:a51c77007319 141
mbed_official 52:a51c77007319 142 /**
mbed_official 52:a51c77007319 143 * @}
mbed_official 52:a51c77007319 144 */
mbed_official 52:a51c77007319 145
mbed_official 52:a51c77007319 146 /** @defgroup EXTI_Exported_Macros
mbed_official 52:a51c77007319 147 * @{
mbed_official 52:a51c77007319 148 */
mbed_official 52:a51c77007319 149
mbed_official 52:a51c77007319 150 /**
mbed_official 52:a51c77007319 151 * @}
mbed_official 52:a51c77007319 152 */
mbed_official 52:a51c77007319 153
mbed_official 52:a51c77007319 154 /** @defgroup EXTI_Exported_Functions
mbed_official 52:a51c77007319 155 * @{
mbed_official 52:a51c77007319 156 */
mbed_official 52:a51c77007319 157
mbed_official 52:a51c77007319 158 void EXTI_DeInit(void);
mbed_official 52:a51c77007319 159 void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct);
mbed_official 52:a51c77007319 160 void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct);
mbed_official 52:a51c77007319 161 void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line);
mbed_official 52:a51c77007319 162 FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line);
mbed_official 52:a51c77007319 163 void EXTI_ClearFlag(uint32_t EXTI_Line);
mbed_official 52:a51c77007319 164 ITStatus EXTI_GetITStatus(uint32_t EXTI_Line);
mbed_official 52:a51c77007319 165 void EXTI_ClearITPendingBit(uint32_t EXTI_Line);
mbed_official 52:a51c77007319 166
mbed_official 52:a51c77007319 167 #ifdef __cplusplus
mbed_official 52:a51c77007319 168 }
mbed_official 52:a51c77007319 169 #endif
mbed_official 52:a51c77007319 170
mbed_official 52:a51c77007319 171 #endif /* __STM32F10x_EXTI_H */
mbed_official 52:a51c77007319 172 /**
mbed_official 52:a51c77007319 173 * @}
mbed_official 52:a51c77007319 174 */
mbed_official 52:a51c77007319 175
mbed_official 52:a51c77007319 176 /**
mbed_official 52:a51c77007319 177 * @}
mbed_official 52:a51c77007319 178 */
mbed_official 52:a51c77007319 179
mbed_official 52:a51c77007319 180 /**
mbed_official 52:a51c77007319 181 * @}
mbed_official 52:a51c77007319 182 */
mbed_official 52:a51c77007319 183
mbed_official 52:a51c77007319 184 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/