Mangue Baja Box

Dependencies:   mbed

Committer:
einsteingustavo
Date:
Mon Jul 29 20:38:00 2019 +0000
Revision:
0:0dee8840a1c0
Mangue Baja Box

Who changed what in which revision?

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