30 #ifndef __STM32F4xx_SYSCFG_H
31 #define __STM32F4xx_SYSCFG_H
38 #include "stm32f4xx.h"
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)
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))
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))
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)
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))
142 #define SYSCFG_ETH_MediaInterface_MII ((uint32_t)0x00000000)
143 #define SYSCFG_ETH_MediaInterface_RMII ((uint32_t)0x00000001)
145 #define IS_SYSCFG_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == SYSCFG_ETH_MediaInterface_MII) || \
146 ((INTERFACE) == SYSCFG_ETH_MediaInterface_RMII))