STM32F4 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
stm32f4xx_syscfg.h
Go to the documentation of this file.
1 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F4xx_SYSCFG_H
31 #define __STM32F4xx_SYSCFG_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f4xx.h"
39 
48 /* Exported types ------------------------------------------------------------*/
49 /* Exported constants --------------------------------------------------------*/
50 
58 #define EXTI_PortSourceGPIOA ((uint8_t)0x00)
59 #define EXTI_PortSourceGPIOB ((uint8_t)0x01)
60 #define EXTI_PortSourceGPIOC ((uint8_t)0x02)
61 #define EXTI_PortSourceGPIOD ((uint8_t)0x03)
62 #define EXTI_PortSourceGPIOE ((uint8_t)0x04)
63 #define EXTI_PortSourceGPIOF ((uint8_t)0x05)
64 #define EXTI_PortSourceGPIOG ((uint8_t)0x06)
65 #define EXTI_PortSourceGPIOH ((uint8_t)0x07)
66 #define EXTI_PortSourceGPIOI ((uint8_t)0x08)
67 
68 #define IS_EXTI_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == EXTI_PortSourceGPIOA) || \
69  ((PORTSOURCE) == EXTI_PortSourceGPIOB) || \
70  ((PORTSOURCE) == EXTI_PortSourceGPIOC) || \
71  ((PORTSOURCE) == EXTI_PortSourceGPIOD) || \
72  ((PORTSOURCE) == EXTI_PortSourceGPIOE) || \
73  ((PORTSOURCE) == EXTI_PortSourceGPIOF) || \
74  ((PORTSOURCE) == EXTI_PortSourceGPIOG) || \
75  ((PORTSOURCE) == EXTI_PortSourceGPIOH) || \
76  ((PORTSOURCE) == EXTI_PortSourceGPIOI))
77 
85 #define EXTI_PinSource0 ((uint8_t)0x00)
86 #define EXTI_PinSource1 ((uint8_t)0x01)
87 #define EXTI_PinSource2 ((uint8_t)0x02)
88 #define EXTI_PinSource3 ((uint8_t)0x03)
89 #define EXTI_PinSource4 ((uint8_t)0x04)
90 #define EXTI_PinSource5 ((uint8_t)0x05)
91 #define EXTI_PinSource6 ((uint8_t)0x06)
92 #define EXTI_PinSource7 ((uint8_t)0x07)
93 #define EXTI_PinSource8 ((uint8_t)0x08)
94 #define EXTI_PinSource9 ((uint8_t)0x09)
95 #define EXTI_PinSource10 ((uint8_t)0x0A)
96 #define EXTI_PinSource11 ((uint8_t)0x0B)
97 #define EXTI_PinSource12 ((uint8_t)0x0C)
98 #define EXTI_PinSource13 ((uint8_t)0x0D)
99 #define EXTI_PinSource14 ((uint8_t)0x0E)
100 #define EXTI_PinSource15 ((uint8_t)0x0F)
101 #define IS_EXTI_PIN_SOURCE(PINSOURCE) (((PINSOURCE) == EXTI_PinSource0) || \
102  ((PINSOURCE) == EXTI_PinSource1) || \
103  ((PINSOURCE) == EXTI_PinSource2) || \
104  ((PINSOURCE) == EXTI_PinSource3) || \
105  ((PINSOURCE) == EXTI_PinSource4) || \
106  ((PINSOURCE) == EXTI_PinSource5) || \
107  ((PINSOURCE) == EXTI_PinSource6) || \
108  ((PINSOURCE) == EXTI_PinSource7) || \
109  ((PINSOURCE) == EXTI_PinSource8) || \
110  ((PINSOURCE) == EXTI_PinSource9) || \
111  ((PINSOURCE) == EXTI_PinSource10) || \
112  ((PINSOURCE) == EXTI_PinSource11) || \
113  ((PINSOURCE) == EXTI_PinSource12) || \
114  ((PINSOURCE) == EXTI_PinSource13) || \
115  ((PINSOURCE) == EXTI_PinSource14) || \
116  ((PINSOURCE) == EXTI_PinSource15))
117 
125 #define SYSCFG_MemoryRemap_Flash ((uint8_t)0x00)
126 #define SYSCFG_MemoryRemap_SystemFlash ((uint8_t)0x01)
127 #define SYSCFG_MemoryRemap_FSMC ((uint8_t)0x02)
128 #define SYSCFG_MemoryRemap_SRAM ((uint8_t)0x03)
129 
130 #define IS_SYSCFG_MEMORY_REMAP_CONFING(REMAP) (((REMAP) == SYSCFG_MemoryRemap_Flash) || \
131  ((REMAP) == SYSCFG_MemoryRemap_SystemFlash) || \
132  ((REMAP) == SYSCFG_MemoryRemap_SRAM) || \
133  ((REMAP) == SYSCFG_MemoryRemap_FSMC))
134 
142 #define SYSCFG_ETH_MediaInterface_MII ((uint32_t)0x00000000)
143 #define SYSCFG_ETH_MediaInterface_RMII ((uint32_t)0x00000001)
144 
145 #define IS_SYSCFG_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == SYSCFG_ETH_MediaInterface_MII) || \
146  ((INTERFACE) == SYSCFG_ETH_MediaInterface_RMII))
147 
155 /* Exported macro ------------------------------------------------------------*/
156 /* Exported functions --------------------------------------------------------*/
157 
158 void SYSCFG_DeInit(void);
159 void SYSCFG_MemoryRemapConfig(uint8_t SYSCFG_MemoryRemap);
160 void SYSCFG_EXTILineConfig(uint8_t EXTI_PortSourceGPIOx, uint8_t EXTI_PinSourcex);
161 void SYSCFG_ETH_MediaInterfaceConfig(uint32_t SYSCFG_ETH_MediaInterface);
162 void SYSCFG_CompensationCellCmd(FunctionalState NewState);
163 FlagStatus SYSCFG_GetCompensationCellStatus(void);
164 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #endif /*__STM32F4xx_SYSCFG_H */
170 
179 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/