ARMEBS4  revision-26.06.2015
stm32f4xx_syscfg.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file stm32f4xx_syscfg.h
4  * @author MCD Application Team
5  * @version V1.0.0
6  * @date 30-September-2011
7  * @brief This file contains all the functions prototypes for the SYSCFG firmware
8  * library.
9  ******************************************************************************
10  * @attention
11  *
12  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18  *
19  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
20  ******************************************************************************
21  */
22 
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef __STM32F4xx_SYSCFG_H
25 #define __STM32F4xx_SYSCFG_H
26 
27 #ifdef __cplusplus
28  extern "C" {
29 #endif
30 
31 /* Includes ------------------------------------------------------------------*/
32 #include "stm32/stm32f4xx.h"
33 
34 /** @addtogroup STM32F4xx_StdPeriph_Driver
35  * @{
36  */
37 
38 /** @addtogroup SYSCFG
39  * @{
40  */
41 
42 /* Exported types ------------------------------------------------------------*/
43 /* Exported constants --------------------------------------------------------*/
44 
45 /** @defgroup SYSCFG_Exported_Constants
46  * @{
47  */
48 
49 /** @defgroup SYSCFG_EXTI_Port_Sources
50  * @{
51  */
52 #define EXTI_PortSourceGPIOA ((uint8_t)0x00)
53 #define EXTI_PortSourceGPIOB ((uint8_t)0x01)
54 #define EXTI_PortSourceGPIOC ((uint8_t)0x02)
55 #define EXTI_PortSourceGPIOD ((uint8_t)0x03)
56 #define EXTI_PortSourceGPIOE ((uint8_t)0x04)
57 #define EXTI_PortSourceGPIOF ((uint8_t)0x05)
58 #define EXTI_PortSourceGPIOG ((uint8_t)0x06)
59 #define EXTI_PortSourceGPIOH ((uint8_t)0x07)
60 #define EXTI_PortSourceGPIOI ((uint8_t)0x08)
61 
62 #define IS_EXTI_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == EXTI_PortSourceGPIOA) || \
63  ((PORTSOURCE) == EXTI_PortSourceGPIOB) || \
64  ((PORTSOURCE) == EXTI_PortSourceGPIOC) || \
65  ((PORTSOURCE) == EXTI_PortSourceGPIOD) || \
66  ((PORTSOURCE) == EXTI_PortSourceGPIOE) || \
67  ((PORTSOURCE) == EXTI_PortSourceGPIOF) || \
68  ((PORTSOURCE) == EXTI_PortSourceGPIOG) || \
69  ((PORTSOURCE) == EXTI_PortSourceGPIOH) || \
70  ((PORTSOURCE) == EXTI_PortSourceGPIOI))
71 /**
72  * @}
73  */
74 
75 
76 /** @defgroup SYSCFG_EXTI_Pin_Sources
77  * @{
78  */
79 #define EXTI_PinSource0 ((uint8_t)0x00)
80 #define EXTI_PinSource1 ((uint8_t)0x01)
81 #define EXTI_PinSource2 ((uint8_t)0x02)
82 #define EXTI_PinSource3 ((uint8_t)0x03)
83 #define EXTI_PinSource4 ((uint8_t)0x04)
84 #define EXTI_PinSource5 ((uint8_t)0x05)
85 #define EXTI_PinSource6 ((uint8_t)0x06)
86 #define EXTI_PinSource7 ((uint8_t)0x07)
87 #define EXTI_PinSource8 ((uint8_t)0x08)
88 #define EXTI_PinSource9 ((uint8_t)0x09)
89 #define EXTI_PinSource10 ((uint8_t)0x0A)
90 #define EXTI_PinSource11 ((uint8_t)0x0B)
91 #define EXTI_PinSource12 ((uint8_t)0x0C)
92 #define EXTI_PinSource13 ((uint8_t)0x0D)
93 #define EXTI_PinSource14 ((uint8_t)0x0E)
94 #define EXTI_PinSource15 ((uint8_t)0x0F)
95 #define IS_EXTI_PIN_SOURCE(PINSOURCE) (((PINSOURCE) == EXTI_PinSource0) || \
96  ((PINSOURCE) == EXTI_PinSource1) || \
97  ((PINSOURCE) == EXTI_PinSource2) || \
98  ((PINSOURCE) == EXTI_PinSource3) || \
99  ((PINSOURCE) == EXTI_PinSource4) || \
100  ((PINSOURCE) == EXTI_PinSource5) || \
101  ((PINSOURCE) == EXTI_PinSource6) || \
102  ((PINSOURCE) == EXTI_PinSource7) || \
103  ((PINSOURCE) == EXTI_PinSource8) || \
104  ((PINSOURCE) == EXTI_PinSource9) || \
105  ((PINSOURCE) == EXTI_PinSource10) || \
106  ((PINSOURCE) == EXTI_PinSource11) || \
107  ((PINSOURCE) == EXTI_PinSource12) || \
108  ((PINSOURCE) == EXTI_PinSource13) || \
109  ((PINSOURCE) == EXTI_PinSource14) || \
110  ((PINSOURCE) == EXTI_PinSource15))
111 /**
112  * @}
113  */
114 
115 
116 /** @defgroup SYSCFG_Memory_Remap_Config
117  * @{
118  */
119 #define SYSCFG_MemoryRemap_Flash ((uint8_t)0x00)
120 #define SYSCFG_MemoryRemap_SystemFlash ((uint8_t)0x01)
121 #define SYSCFG_MemoryRemap_FSMC ((uint8_t)0x02)
122 #define SYSCFG_MemoryRemap_SRAM ((uint8_t)0x03)
123 
124 #define IS_SYSCFG_MEMORY_REMAP_CONFING(REMAP) (((REMAP) == SYSCFG_MemoryRemap_Flash) || \
125  ((REMAP) == SYSCFG_MemoryRemap_SystemFlash) || \
126  ((REMAP) == SYSCFG_MemoryRemap_SRAM) || \
127  ((REMAP) == SYSCFG_MemoryRemap_FSMC))
128 /**
129  * @}
130  */
131 
132 
133 /** @defgroup SYSCFG_ETHERNET_Media_Interface
134  * @{
135  */
136 #define SYSCFG_ETH_MediaInterface_MII ((uint32_t)0x00000000)
137 #define SYSCFG_ETH_MediaInterface_RMII ((uint32_t)0x00000001)
138 
139 #define IS_SYSCFG_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == SYSCFG_ETH_MediaInterface_MII) || \
140  ((INTERFACE) == SYSCFG_ETH_MediaInterface_RMII))
141 /**
142  * @}
143  */
144 
145 /**
146  * @}
147  */
148 
149 /* Exported macro ------------------------------------------------------------*/
150 /* Exported functions --------------------------------------------------------*/
151 
152 void SYSCFG_DeInit(void);
153 void SYSCFG_MemoryRemapConfig(uint8_t SYSCFG_MemoryRemap);
154 void SYSCFG_EXTILineConfig(uint8_t EXTI_PortSourceGPIOx, uint8_t EXTI_PinSourcex);
155 void SYSCFG_ETH_MediaInterfaceConfig(uint32_t SYSCFG_ETH_MediaInterface);
156 void SYSCFG_CompensationCellCmd(FunctionalState NewState);
157 FlagStatus SYSCFG_GetCompensationCellStatus(void);
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif /*__STM32F4xx_SYSCFG_H */
164 
165 /**
166  * @}
167  */
168 
169 /**
170  * @}
171  */
172 
173 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
CMSIS Cortex-M4 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...