Rajath Ravi / Mbed 2 deprecated ravi_blinkycode

Dependencies:   mbed

Committer:
rajathr
Date:
Sat Oct 23 05:49:09 2021 +0000
Revision:
0:34ee385f4d2d
At 23rd Oct 21 - All Code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rajathr 0:34ee385f4d2d 1 /**
rajathr 0:34ee385f4d2d 2 ******************************************************************************
rajathr 0:34ee385f4d2d 3 * @file stm32f4xx_exti_mort.h
rajathr 0:34ee385f4d2d 4 * @author MCD Application Team
rajathr 0:34ee385f4d2d 5 * @version V1.8.0
rajathr 0:34ee385f4d2d 6 * @date 04-November-2016
rajathr 0:34ee385f4d2d 7 * @brief This file contains all the functions prototypes for the EXTI_MORT firmware
rajathr 0:34ee385f4d2d 8 * library.
rajathr 0:34ee385f4d2d 9 ******************************************************************************
rajathr 0:34ee385f4d2d 10 * @attention
rajathr 0:34ee385f4d2d 11 *
rajathr 0:34ee385f4d2d 12 * <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
rajathr 0:34ee385f4d2d 13 *
rajathr 0:34ee385f4d2d 14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
rajathr 0:34ee385f4d2d 15 * You may not use this file except in compliance with the License.
rajathr 0:34ee385f4d2d 16 * You may obtain a copy of the License at:
rajathr 0:34ee385f4d2d 17 *
rajathr 0:34ee385f4d2d 18 * http://www.st.com/software_license_agreement_liberty_v2
rajathr 0:34ee385f4d2d 19 *
rajathr 0:34ee385f4d2d 20 * Unless required by applicable law or agreed to in writing, software
rajathr 0:34ee385f4d2d 21 * distributed under the License is distributed on an "AS IS" BASIS,
rajathr 0:34ee385f4d2d 22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rajathr 0:34ee385f4d2d 23 * See the License for the specific language governing permissions and
rajathr 0:34ee385f4d2d 24 * limitations under the License.
rajathr 0:34ee385f4d2d 25 *
rajathr 0:34ee385f4d2d 26 ******************************************************************************
rajathr 0:34ee385f4d2d 27 */
rajathr 0:34ee385f4d2d 28
rajathr 0:34ee385f4d2d 29 /* Define to prevent recursive inclusion -------------------------------------*/
rajathr 0:34ee385f4d2d 30 #ifndef __STM32F4xx_EXTI_MORT_H
rajathr 0:34ee385f4d2d 31 #define __STM32F4xx_EXTI_MORT_H
rajathr 0:34ee385f4d2d 32
rajathr 0:34ee385f4d2d 33 #ifdef __cplusplus
rajathr 0:34ee385f4d2d 34 extern "C" {
rajathr 0:34ee385f4d2d 35 #endif
rajathr 0:34ee385f4d2d 36
rajathr 0:34ee385f4d2d 37 /* Includes ------------------------------------------------------------------*/
rajathr 0:34ee385f4d2d 38 #include "stm32f4xx_mort2.h"
rajathr 0:34ee385f4d2d 39
rajathr 0:34ee385f4d2d 40 /** @addtogroup STM32F4xx_StdPeriph_Driver
rajathr 0:34ee385f4d2d 41 * @{
rajathr 0:34ee385f4d2d 42 */
rajathr 0:34ee385f4d2d 43
rajathr 0:34ee385f4d2d 44 /** @addtogroup EXTI_MORT
rajathr 0:34ee385f4d2d 45 * @{
rajathr 0:34ee385f4d2d 46 */
rajathr 0:34ee385f4d2d 47
rajathr 0:34ee385f4d2d 48 /* Exported types ------------------------------------------------------------*/
rajathr 0:34ee385f4d2d 49
rajathr 0:34ee385f4d2d 50 /**
rajathr 0:34ee385f4d2d 51 * @brief EXTI_MORT mode enumeration
rajathr 0:34ee385f4d2d 52 */
rajathr 0:34ee385f4d2d 53
rajathr 0:34ee385f4d2d 54 typedef enum
rajathr 0:34ee385f4d2d 55 {
rajathr 0:34ee385f4d2d 56 EXTI_Mode_Interrupt = 0x00,
rajathr 0:34ee385f4d2d 57 EXTI_Mode_Event = 0x04
rajathr 0:34ee385f4d2d 58 }EXTIMode_TypeDef_mort;
rajathr 0:34ee385f4d2d 59
rajathr 0:34ee385f4d2d 60 #define IS_EXTI_MODE_MORT(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event))
rajathr 0:34ee385f4d2d 61
rajathr 0:34ee385f4d2d 62 /**
rajathr 0:34ee385f4d2d 63 * @brief EXTI_MORT Trigger enumeration
rajathr 0:34ee385f4d2d 64 */
rajathr 0:34ee385f4d2d 65
rajathr 0:34ee385f4d2d 66 typedef enum
rajathr 0:34ee385f4d2d 67 {
rajathr 0:34ee385f4d2d 68 EXTI_Trigger_Rising = 0x08,
rajathr 0:34ee385f4d2d 69 EXTI_Trigger_Falling = 0x0C,
rajathr 0:34ee385f4d2d 70 EXTI_Trigger_Rising_Falling = 0x10
rajathr 0:34ee385f4d2d 71 }EXTITrigger_TypeDef_mort;
rajathr 0:34ee385f4d2d 72
rajathr 0:34ee385f4d2d 73 #define IS_EXTI_TRIGGER_MORT(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \
rajathr 0:34ee385f4d2d 74 ((TRIGGER) == EXTI_Trigger_Falling) || \
rajathr 0:34ee385f4d2d 75 ((TRIGGER) == EXTI_Trigger_Rising_Falling))
rajathr 0:34ee385f4d2d 76 /**
rajathr 0:34ee385f4d2d 77 * @brief EXTI_MORT Init Structure definition
rajathr 0:34ee385f4d2d 78 */
rajathr 0:34ee385f4d2d 79
rajathr 0:34ee385f4d2d 80 typedef struct
rajathr 0:34ee385f4d2d 81 {
rajathr 0:34ee385f4d2d 82 uint32_t EXTI_Line; /*!< Specifies the EXTI_MORT lines to be enabled or disabled.
rajathr 0:34ee385f4d2d 83 This parameter can be any combination value of @ref EXTI_Lines */
rajathr 0:34ee385f4d2d 84
rajathr 0:34ee385f4d2d 85 EXTIMode_TypeDef_mort EXTI_Mode; /*!< Specifies the mode for the EXTI_MORT lines.
rajathr 0:34ee385f4d2d 86 This parameter can be a value of @ref EXTIMode_TypeDef_mort */
rajathr 0:34ee385f4d2d 87
rajathr 0:34ee385f4d2d 88 EXTITrigger_TypeDef_mort EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI_MORT lines.
rajathr 0:34ee385f4d2d 89 This parameter can be a value of @ref EXTITrigger_TypeDef_mort */
rajathr 0:34ee385f4d2d 90
rajathr 0:34ee385f4d2d 91 FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI_MORT lines.
rajathr 0:34ee385f4d2d 92 This parameter can be set either to ENABLE or DISABLE */
rajathr 0:34ee385f4d2d 93 }EXTI_InitTypeDef_mort;
rajathr 0:34ee385f4d2d 94
rajathr 0:34ee385f4d2d 95 /* Exported constants --------------------------------------------------------*/
rajathr 0:34ee385f4d2d 96
rajathr 0:34ee385f4d2d 97 /** @defgroup EXTI_Exported_Constants
rajathr 0:34ee385f4d2d 98 * @{
rajathr 0:34ee385f4d2d 99 */
rajathr 0:34ee385f4d2d 100
rajathr 0:34ee385f4d2d 101 /** @defgroup EXTI_Lines
rajathr 0:34ee385f4d2d 102 * @{
rajathr 0:34ee385f4d2d 103 */
rajathr 0:34ee385f4d2d 104
rajathr 0:34ee385f4d2d 105 #define EXTI_Line0_MORT ((uint32_t)0x00001) /*!< External interrupt line 0 */
rajathr 0:34ee385f4d2d 106 #define EXTI_Line1_MORT ((uint32_t)0x00002) /*!< External interrupt line 1 */
rajathr 0:34ee385f4d2d 107 #define EXTI_Line2_MORT ((uint32_t)0x00004) /*!< External interrupt line 2 */
rajathr 0:34ee385f4d2d 108 #define EXTI_Line3_MORT ((uint32_t)0x00008) /*!< External interrupt line 3 */
rajathr 0:34ee385f4d2d 109 #define EXTI_Line4_MORT ((uint32_t)0x00010) /*!< External interrupt line 4 */
rajathr 0:34ee385f4d2d 110 #define EXTI_Line5_MORT ((uint32_t)0x00020) /*!< External interrupt line 5 */
rajathr 0:34ee385f4d2d 111 #define EXTI_Line6_MORT ((uint32_t)0x00040) /*!< External interrupt line 6 */
rajathr 0:34ee385f4d2d 112 #define EXTI_Line7_MORT ((uint32_t)0x00080) /*!< External interrupt line 7 */
rajathr 0:34ee385f4d2d 113 #define EXTI_Line8_MORT ((uint32_t)0x00100) /*!< External interrupt line 8 */
rajathr 0:34ee385f4d2d 114 #define EXTI_Line9_MORT ((uint32_t)0x00200) /*!< External interrupt line 9 */
rajathr 0:34ee385f4d2d 115 #define EXTI_Line10_MORT ((uint32_t)0x00400) /*!< External interrupt line 10 */
rajathr 0:34ee385f4d2d 116 #define EXTI_Line11_MORT ((uint32_t)0x00800) /*!< External interrupt line 11 */
rajathr 0:34ee385f4d2d 117 #define EXTI_Line12_MORT ((uint32_t)0x01000) /*!< External interrupt line 12 */
rajathr 0:34ee385f4d2d 118 #define EXTI_Line13_MORT ((uint32_t)0x02000) /*!< External interrupt line 13 */
rajathr 0:34ee385f4d2d 119 #define EXTI_Line14_MORT ((uint32_t)0x04000) /*!< External interrupt line 14 */
rajathr 0:34ee385f4d2d 120 #define EXTI_Line15_MORT ((uint32_t)0x08000) /*!< External interrupt line 15 */
rajathr 0:34ee385f4d2d 121 #define EXTI_Line16_MORT ((uint32_t)0x10000) /*!< External interrupt line 16 Connected to the PVD Output */
rajathr 0:34ee385f4d2d 122 #define EXTI_Line17_MORT ((uint32_t)0x20000) /*!< External interrupt line 17 Connected to the RTC Alarm event */
rajathr 0:34ee385f4d2d 123 #define EXTI_Line18_MORT ((uint32_t)0x40000) /*!< External interrupt line 18 Connected to the USB OTG FS Wakeup from suspend event */
rajathr 0:34ee385f4d2d 124 #define EXTI_Line19_MORT ((uint32_t)0x80000) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */
rajathr 0:34ee385f4d2d 125 #define EXTI_Line20_MORT ((uint32_t)0x00100000) /*!< External interrupt line 20 Connected to the USB OTG HS (configured in FS) Wakeup event */
rajathr 0:34ee385f4d2d 126 #define EXTI_Line21_MORT ((uint32_t)0x00200000) /*!< External interrupt line 21 Connected to the RTC Tamper and Time Stamp events */
rajathr 0:34ee385f4d2d 127 #define EXTI_Line22_MORT ((uint32_t)0x00400000) /*!< External interrupt line 22 Connected to the RTC Wakeup event */
rajathr 0:34ee385f4d2d 128 #define EXTI_Line23_MORT ((uint32_t)0x00800000) /*!< External interrupt line 23 Connected to the LPTIM Wakeup event */
rajathr 0:34ee385f4d2d 129
rajathr 0:34ee385f4d2d 130
rajathr 0:34ee385f4d2d 131 #define IS_EXTI_LINE_MORT(LINE) ((((LINE) & (uint32_t)0xFF800000) == 0x00) && ((LINE) != (uint16_t)0x00))
rajathr 0:34ee385f4d2d 132
rajathr 0:34ee385f4d2d 133 #define IS_GET_EXTI_LINE_MORT(LINE) (((LINE) == EXTI_Line0_MORT) || ((LINE) == EXTI_Line1_MORT) || \
rajathr 0:34ee385f4d2d 134 ((LINE) == EXTI_Line2_MORT) || ((LINE) == EXTI_Line3_MORT) || \
rajathr 0:34ee385f4d2d 135 ((LINE) == EXTI_Line4_MORT) || ((LINE) == EXTI_Line5_MORT) || \
rajathr 0:34ee385f4d2d 136 ((LINE) == EXTI_Line6_MORT) || ((LINE) == EXTI_Line7_MORT) || \
rajathr 0:34ee385f4d2d 137 ((LINE) == EXTI_Line8_MORT) || ((LINE) == EXTI_Line9_MORT) || \
rajathr 0:34ee385f4d2d 138 ((LINE) == EXTI_Line10_MORT) || ((LINE) == EXTI_Line11_MORT) || \
rajathr 0:34ee385f4d2d 139 ((LINE) == EXTI_Line12_MORT) || ((LINE) == EXTI_Line13_MORT) || \
rajathr 0:34ee385f4d2d 140 ((LINE) == EXTI_Line14_MORT) || ((LINE) == EXTI_Line15_MORT) || \
rajathr 0:34ee385f4d2d 141 ((LINE) == EXTI_Line16_MORT) || ((LINE) == EXTI_Line17_MORT) || \
rajathr 0:34ee385f4d2d 142 ((LINE) == EXTI_Line18_MORT) || ((LINE) == EXTI_Line19_MORT) || \
rajathr 0:34ee385f4d2d 143 ((LINE) == EXTI_Line20_MORT) || ((LINE) == EXTI_Line21_MORT) ||\
rajathr 0:34ee385f4d2d 144 ((LINE) == EXTI_Line22_MORT) || ((LINE) == EXTI_Line23_MORT))
rajathr 0:34ee385f4d2d 145
rajathr 0:34ee385f4d2d 146 /**
rajathr 0:34ee385f4d2d 147 * @}
rajathr 0:34ee385f4d2d 148 */
rajathr 0:34ee385f4d2d 149
rajathr 0:34ee385f4d2d 150 /**
rajathr 0:34ee385f4d2d 151 * @}
rajathr 0:34ee385f4d2d 152 */
rajathr 0:34ee385f4d2d 153
rajathr 0:34ee385f4d2d 154 /* Exported macro ------------------------------------------------------------*/
rajathr 0:34ee385f4d2d 155 /* Exported functions --------------------------------------------------------*/
rajathr 0:34ee385f4d2d 156
rajathr 0:34ee385f4d2d 157 /* Function used to set the EXTI_MORT configuration to the default reset state *****/
rajathr 0:34ee385f4d2d 158 void EXTI_DeInit_mort(void);
rajathr 0:34ee385f4d2d 159
rajathr 0:34ee385f4d2d 160 /* Initialization and Configuration functions *********************************/
rajathr 0:34ee385f4d2d 161 void EXTI_Init_mort(EXTI_InitTypeDef_mort* EXTI_InitStruct);
rajathr 0:34ee385f4d2d 162 void EXTI_StructInit_mort(EXTI_InitTypeDef_mort* EXTI_InitStruct);
rajathr 0:34ee385f4d2d 163 void EXTI_GenerateSWInterrupt_mort(uint32_t EXTI_Line);
rajathr 0:34ee385f4d2d 164
rajathr 0:34ee385f4d2d 165 /* Interrupts and flags management functions **********************************/
rajathr 0:34ee385f4d2d 166 FlagStatus EXTI_GetFlagStatus_mort(uint32_t EXTI_Line);
rajathr 0:34ee385f4d2d 167 void EXTI_ClearFlag_mort(uint32_t EXTI_Line);
rajathr 0:34ee385f4d2d 168 ITStatus EXTI_GetITStatus_mort(uint32_t EXTI_Line);
rajathr 0:34ee385f4d2d 169 void EXTI_ClearITPendingBit_mort(uint32_t EXTI_Line);
rajathr 0:34ee385f4d2d 170
rajathr 0:34ee385f4d2d 171 #ifdef __cplusplus
rajathr 0:34ee385f4d2d 172 }
rajathr 0:34ee385f4d2d 173 #endif
rajathr 0:34ee385f4d2d 174
rajathr 0:34ee385f4d2d 175 #endif /* __STM32F4xx_EXTI_H */
rajathr 0:34ee385f4d2d 176
rajathr 0:34ee385f4d2d 177 /**
rajathr 0:34ee385f4d2d 178 * @}
rajathr 0:34ee385f4d2d 179 */
rajathr 0:34ee385f4d2d 180
rajathr 0:34ee385f4d2d 181 /**
rajathr 0:34ee385f4d2d 182 * @}
rajathr 0:34ee385f4d2d 183 */
rajathr 0:34ee385f4d2d 184
rajathr 0:34ee385f4d2d 185 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
rajathr 0:34ee385f4d2d 186
rajathr 0:34ee385f4d2d 187
rajathr 0:34ee385f4d2d 188
rajathr 0:34ee385f4d2d 189
rajathr 0:34ee385f4d2d 190
rajathr 0:34ee385f4d2d 191