]> jspc29.x-matter.uni-frankfurt.de Git - mvd_firmware.git/blob
b8aa49a2a8b995c532948b53e3542c59d2054c7b
[mvd_firmware.git] /
1 /**\r
2   ******************************************************************************\r
3   * @file    stm32f10x_gpio.h\r
4   * @author  MCD Application Team\r
5   * @version V3.5.0\r
6   * @date    11-March-2011\r
7   * @brief   This file contains all the functions prototypes for the GPIO \r
8   *          firmware library.\r
9   ******************************************************************************\r
10   * @attention\r
11   *\r
12   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS\r
13   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE\r
14   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY\r
15   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING\r
16   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE\r
17   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.\r
18   *\r
19   * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>\r
20   ******************************************************************************\r
21   */\r
22 \r
23 /* Define to prevent recursive inclusion -------------------------------------*/\r
24 #ifndef __STM32F10x_GPIO_H\r
25 #define __STM32F10x_GPIO_H\r
26 \r
27 #ifdef __cplusplus\r
28  extern "C" {\r
29 #endif\r
30 \r
31 /* Includes ------------------------------------------------------------------*/\r
32 #include "stm32f10x.h"\r
33 \r
34 /** @addtogroup STM32F10x_StdPeriph_Driver\r
35   * @{\r
36   */\r
37 \r
38 /** @addtogroup GPIO\r
39   * @{\r
40   */\r
41 \r
42 /** @defgroup GPIO_Exported_Types\r
43   * @{\r
44   */\r
45 \r
46 #define IS_GPIO_ALL_PERIPH(PERIPH) (((PERIPH) == GPIOA) || \\r
47                                     ((PERIPH) == GPIOB) || \\r
48                                     ((PERIPH) == GPIOC) || \\r
49                                     ((PERIPH) == GPIOD) || \\r
50                                     ((PERIPH) == GPIOE) || \\r
51                                     ((PERIPH) == GPIOF) || \\r
52                                     ((PERIPH) == GPIOG))\r
53                                      \r
54 /** \r
55   * @brief  Output Maximum frequency selection  \r
56   */\r
57 \r
58 typedef enum\r
59\r
60   GPIO_Speed_10MHz = 1,\r
61   GPIO_Speed_2MHz, \r
62   GPIO_Speed_50MHz\r
63 }GPIOSpeed_TypeDef;\r
64 #define IS_GPIO_SPEED(SPEED) (((SPEED) == GPIO_Speed_10MHz) || ((SPEED) == GPIO_Speed_2MHz) || \\r
65                               ((SPEED) == GPIO_Speed_50MHz))\r
66 \r
67 /** \r
68   * @brief  Configuration Mode enumeration  \r
69   */\r
70 \r
71 typedef enum\r
72 { GPIO_Mode_AIN = 0x0,\r
73   GPIO_Mode_IN_FLOATING = 0x04,\r
74   GPIO_Mode_IPD = 0x28,\r
75   GPIO_Mode_IPU = 0x48,\r
76   GPIO_Mode_Out_OD = 0x14,\r
77   GPIO_Mode_Out_PP = 0x10,\r
78   GPIO_Mode_AF_OD = 0x1C,\r
79   GPIO_Mode_AF_PP = 0x18\r
80 }GPIOMode_TypeDef;\r
81 \r
82 #define IS_GPIO_MODE(MODE) (((MODE) == GPIO_Mode_AIN) || ((MODE) == GPIO_Mode_IN_FLOATING) || \\r
83                             ((MODE) == GPIO_Mode_IPD) || ((MODE) == GPIO_Mode_IPU) || \\r
84                             ((MODE) == GPIO_Mode_Out_OD) || ((MODE) == GPIO_Mode_Out_PP) || \\r
85                             ((MODE) == GPIO_Mode_AF_OD) || ((MODE) == GPIO_Mode_AF_PP))\r
86 \r
87 /** \r
88   * @brief  GPIO Init structure definition  \r
89   */\r
90 \r
91 typedef struct\r
92 {\r
93   uint16_t GPIO_Pin;             /*!< Specifies the GPIO pins to be configured.\r
94                                       This parameter can be any value of @ref GPIO_pins_define */\r
95 \r
96   GPIOSpeed_TypeDef GPIO_Speed;  /*!< Specifies the speed for the selected pins.\r
97                                       This parameter can be a value of @ref GPIOSpeed_TypeDef */\r
98 \r
99   GPIOMode_TypeDef GPIO_Mode;    /*!< Specifies the operating mode for the selected pins.\r
100                                       This parameter can be a value of @ref GPIOMode_TypeDef */\r
101 }GPIO_InitTypeDef;\r
102 \r
103 \r
104 /** \r
105   * @brief  Bit_SET and Bit_RESET enumeration  \r
106   */\r
107 \r
108 typedef enum\r
109 { Bit_RESET = 0,\r
110   Bit_SET\r
111 }BitAction;\r
112 \r
113 #define IS_GPIO_BIT_ACTION(ACTION) (((ACTION) == Bit_RESET) || ((ACTION) == Bit_SET))\r
114 \r
115 /**\r
116   * @}\r
117   */\r
118 \r
119 /** @defgroup GPIO_Exported_Constants\r
120   * @{\r
121   */\r
122 \r
123 /** @defgroup GPIO_pins_define \r
124   * @{\r
125   */\r
126 \r
127 #define GPIO_Pin_0                 ((uint16_t)0x0001)  /*!< Pin 0 selected */\r
128 #define GPIO_Pin_1                 ((uint16_t)0x0002)  /*!< Pin 1 selected */\r
129 #define GPIO_Pin_2                 ((uint16_t)0x0004)  /*!< Pin 2 selected */\r
130 #define GPIO_Pin_3                 ((uint16_t)0x0008)  /*!< Pin 3 selected */\r
131 #define GPIO_Pin_4                 ((uint16_t)0x0010)  /*!< Pin 4 selected */\r
132 #define GPIO_Pin_5                 ((uint16_t)0x0020)  /*!< Pin 5 selected */\r
133 #define GPIO_Pin_6                 ((uint16_t)0x0040)  /*!< Pin 6 selected */\r
134 #define GPIO_Pin_7                 ((uint16_t)0x0080)  /*!< Pin 7 selected */\r
135 #define GPIO_Pin_8                 ((uint16_t)0x0100)  /*!< Pin 8 selected */\r
136 #define GPIO_Pin_9                 ((uint16_t)0x0200)  /*!< Pin 9 selected */\r
137 #define GPIO_Pin_10                ((uint16_t)0x0400)  /*!< Pin 10 selected */\r
138 #define GPIO_Pin_11                ((uint16_t)0x0800)  /*!< Pin 11 selected */\r
139 #define GPIO_Pin_12                ((uint16_t)0x1000)  /*!< Pin 12 selected */\r
140 #define GPIO_Pin_13                ((uint16_t)0x2000)  /*!< Pin 13 selected */\r
141 #define GPIO_Pin_14                ((uint16_t)0x4000)  /*!< Pin 14 selected */\r
142 #define GPIO_Pin_15                ((uint16_t)0x8000)  /*!< Pin 15 selected */\r
143 #define GPIO_Pin_All               ((uint16_t)0xFFFF)  /*!< All pins selected */\r
144 \r
145 #define IS_GPIO_PIN(PIN) ((((PIN) & (uint16_t)0x00) == 0x00) && ((PIN) != (uint16_t)0x00))\r
146 \r
147 #define IS_GET_GPIO_PIN(PIN) (((PIN) == GPIO_Pin_0) || \\r
148                               ((PIN) == GPIO_Pin_1) || \\r
149                               ((PIN) == GPIO_Pin_2) || \\r
150                               ((PIN) == GPIO_Pin_3) || \\r
151                               ((PIN) == GPIO_Pin_4) || \\r
152                               ((PIN) == GPIO_Pin_5) || \\r
153                               ((PIN) == GPIO_Pin_6) || \\r
154                               ((PIN) == GPIO_Pin_7) || \\r
155                               ((PIN) == GPIO_Pin_8) || \\r
156                               ((PIN) == GPIO_Pin_9) || \\r
157                               ((PIN) == GPIO_Pin_10) || \\r
158                               ((PIN) == GPIO_Pin_11) || \\r
159                               ((PIN) == GPIO_Pin_12) || \\r
160                               ((PIN) == GPIO_Pin_13) || \\r
161                               ((PIN) == GPIO_Pin_14) || \\r
162                               ((PIN) == GPIO_Pin_15))\r
163 \r
164 /**\r
165   * @}\r
166   */\r
167 \r
168 /** @defgroup GPIO_Remap_define \r
169   * @{\r
170   */\r
171 \r
172 #define GPIO_Remap_SPI1             ((uint32_t)0x00000001)  /*!< SPI1 Alternate Function mapping */\r
173 #define GPIO_Remap_I2C1             ((uint32_t)0x00000002)  /*!< I2C1 Alternate Function mapping */\r
174 #define GPIO_Remap_USART1           ((uint32_t)0x00000004)  /*!< USART1 Alternate Function mapping */\r
175 #define GPIO_Remap_USART2           ((uint32_t)0x00000008)  /*!< USART2 Alternate Function mapping */\r
176 #define GPIO_PartialRemap_USART3    ((uint32_t)0x00140010)  /*!< USART3 Partial Alternate Function mapping */\r
177 #define GPIO_FullRemap_USART3       ((uint32_t)0x00140030)  /*!< USART3 Full Alternate Function mapping */\r
178 #define GPIO_PartialRemap_TIM1      ((uint32_t)0x00160040)  /*!< TIM1 Partial Alternate Function mapping */\r
179 #define GPIO_FullRemap_TIM1         ((uint32_t)0x001600C0)  /*!< TIM1 Full Alternate Function mapping */\r
180 #define GPIO_PartialRemap1_TIM2     ((uint32_t)0x00180100)  /*!< TIM2 Partial1 Alternate Function mapping */\r
181 #define GPIO_PartialRemap2_TIM2     ((uint32_t)0x00180200)  /*!< TIM2 Partial2 Alternate Function mapping */\r
182 #define GPIO_FullRemap_TIM2         ((uint32_t)0x00180300)  /*!< TIM2 Full Alternate Function mapping */\r
183 #define GPIO_PartialRemap_TIM3      ((uint32_t)0x001A0800)  /*!< TIM3 Partial Alternate Function mapping */\r
184 #define GPIO_FullRemap_TIM3         ((uint32_t)0x001A0C00)  /*!< TIM3 Full Alternate Function mapping */\r
185 #define GPIO_Remap_TIM4             ((uint32_t)0x00001000)  /*!< TIM4 Alternate Function mapping */\r
186 #define GPIO_Remap1_CAN1            ((uint32_t)0x001D4000)  /*!< CAN1 Alternate Function mapping */\r
187 #define GPIO_Remap2_CAN1            ((uint32_t)0x001D6000)  /*!< CAN1 Alternate Function mapping */\r
188 #define GPIO_Remap_PD01             ((uint32_t)0x00008000)  /*!< PD01 Alternate Function mapping */\r
189 #define GPIO_Remap_TIM5CH4_LSI      ((uint32_t)0x00200001)  /*!< LSI connected to TIM5 Channel4 input capture for calibration */\r
190 #define GPIO_Remap_ADC1_ETRGINJ     ((uint32_t)0x00200002)  /*!< ADC1 External Trigger Injected Conversion remapping */\r
191 #define GPIO_Remap_ADC1_ETRGREG     ((uint32_t)0x00200004)  /*!< ADC1 External Trigger Regular Conversion remapping */\r
192 #define GPIO_Remap_ADC2_ETRGINJ     ((uint32_t)0x00200008)  /*!< ADC2 External Trigger Injected Conversion remapping */\r
193 #define GPIO_Remap_ADC2_ETRGREG     ((uint32_t)0x00200010)  /*!< ADC2 External Trigger Regular Conversion remapping */\r
194 #define GPIO_Remap_ETH              ((uint32_t)0x00200020)  /*!< Ethernet remapping (only for Connectivity line devices) */\r
195 #define GPIO_Remap_CAN2             ((uint32_t)0x00200040)  /*!< CAN2 remapping (only for Connectivity line devices) */\r
196 #define GPIO_Remap_SWJ_NoJTRST      ((uint32_t)0x00300100)  /*!< Full SWJ Enabled (JTAG-DP + SW-DP) but without JTRST */\r
197 #define GPIO_Remap_SWJ_JTAGDisable  ((uint32_t)0x00300200)  /*!< JTAG-DP Disabled and SW-DP Enabled */\r
198 #define GPIO_Remap_SWJ_Disable      ((uint32_t)0x00300400)  /*!< Full SWJ Disabled (JTAG-DP + SW-DP) */\r
199 #define GPIO_Remap_SPI3             ((uint32_t)0x00201100)  /*!< SPI3/I2S3 Alternate Function mapping (only for Connectivity line devices) */\r
200 #define GPIO_Remap_TIM2ITR1_PTP_SOF ((uint32_t)0x00202000)  /*!< Ethernet PTP output or USB OTG SOF (Start of Frame) connected\r
201                                                                  to TIM2 Internal Trigger 1 for calibration\r
202                                                                  (only for Connectivity line devices) */\r
203 #define GPIO_Remap_PTP_PPS          ((uint32_t)0x00204000)  /*!< Ethernet MAC PPS_PTS output on PB05 (only for Connectivity line devices) */\r
204 \r
205 #define GPIO_Remap_TIM15            ((uint32_t)0x80000001)  /*!< TIM15 Alternate Function mapping (only for Value line devices) */\r
206 #define GPIO_Remap_TIM16            ((uint32_t)0x80000002)  /*!< TIM16 Alternate Function mapping (only for Value line devices) */\r
207 #define GPIO_Remap_TIM17            ((uint32_t)0x80000004)  /*!< TIM17 Alternate Function mapping (only for Value line devices) */\r
208 #define GPIO_Remap_CEC              ((uint32_t)0x80000008)  /*!< CEC Alternate Function mapping (only for Value line devices) */\r
209 #define GPIO_Remap_TIM1_DMA         ((uint32_t)0x80000010)  /*!< TIM1 DMA requests mapping (only for Value line devices) */\r
210 \r
211 #define GPIO_Remap_TIM9             ((uint32_t)0x80000020)  /*!< TIM9 Alternate Function mapping (only for XL-density devices) */\r
212 #define GPIO_Remap_TIM10            ((uint32_t)0x80000040)  /*!< TIM10 Alternate Function mapping (only for XL-density devices) */\r
213 #define GPIO_Remap_TIM11            ((uint32_t)0x80000080)  /*!< TIM11 Alternate Function mapping (only for XL-density devices) */\r
214 #define GPIO_Remap_TIM13            ((uint32_t)0x80000100)  /*!< TIM13 Alternate Function mapping (only for High density Value line and XL-density devices) */\r
215 #define GPIO_Remap_TIM14            ((uint32_t)0x80000200)  /*!< TIM14 Alternate Function mapping (only for High density Value line and XL-density devices) */\r
216 #define GPIO_Remap_FSMC_NADV        ((uint32_t)0x80000400)  /*!< FSMC_NADV Alternate Function mapping (only for High density Value line and XL-density devices) */\r
217 \r
218 #define GPIO_Remap_TIM67_DAC_DMA    ((uint32_t)0x80000800)  /*!< TIM6/TIM7 and DAC DMA requests remapping (only for High density Value line devices) */\r
219 #define GPIO_Remap_TIM12            ((uint32_t)0x80001000)  /*!< TIM12 Alternate Function mapping (only for High density Value line devices) */\r
220 #define GPIO_Remap_MISC             ((uint32_t)0x80002000)  /*!< Miscellaneous Remap (DMA2 Channel5 Position and DAC Trigger remapping, \r
221                                                                  only for High density Value line devices) */                                                       \r
222 \r
223 #define IS_GPIO_REMAP(REMAP) (((REMAP) == GPIO_Remap_SPI1) || ((REMAP) == GPIO_Remap_I2C1) || \\r
224                               ((REMAP) == GPIO_Remap_USART1) || ((REMAP) == GPIO_Remap_USART2) || \\r
225                               ((REMAP) == GPIO_PartialRemap_USART3) || ((REMAP) == GPIO_FullRemap_USART3) || \\r
226                               ((REMAP) == GPIO_PartialRemap_TIM1) || ((REMAP) == GPIO_FullRemap_TIM1) || \\r
227                               ((REMAP) == GPIO_PartialRemap1_TIM2) || ((REMAP) == GPIO_PartialRemap2_TIM2) || \\r
228                               ((REMAP) == GPIO_FullRemap_TIM2) || ((REMAP) == GPIO_PartialRemap_TIM3) || \\r
229                               ((REMAP) == GPIO_FullRemap_TIM3) || ((REMAP) == GPIO_Remap_TIM4) || \\r
230                               ((REMAP) == GPIO_Remap1_CAN1) || ((REMAP) == GPIO_Remap2_CAN1) || \\r
231                               ((REMAP) == GPIO_Remap_PD01) || ((REMAP) == GPIO_Remap_TIM5CH4_LSI) || \\r
232                               ((REMAP) == GPIO_Remap_ADC1_ETRGINJ) ||((REMAP) == GPIO_Remap_ADC1_ETRGREG) || \\r
233                               ((REMAP) == GPIO_Remap_ADC2_ETRGINJ) ||((REMAP) == GPIO_Remap_ADC2_ETRGREG) || \\r
234                               ((REMAP) == GPIO_Remap_ETH) ||((REMAP) == GPIO_Remap_CAN2) || \\r
235                               ((REMAP) == GPIO_Remap_SWJ_NoJTRST) || ((REMAP) == GPIO_Remap_SWJ_JTAGDisable) || \\r
236                               ((REMAP) == GPIO_Remap_SWJ_Disable)|| ((REMAP) == GPIO_Remap_SPI3) || \\r
237                               ((REMAP) == GPIO_Remap_TIM2ITR1_PTP_SOF) || ((REMAP) == GPIO_Remap_PTP_PPS) || \\r
238                               ((REMAP) == GPIO_Remap_TIM15) || ((REMAP) == GPIO_Remap_TIM16) || \\r
239                               ((REMAP) == GPIO_Remap_TIM17) || ((REMAP) == GPIO_Remap_CEC) || \\r
240                               ((REMAP) == GPIO_Remap_TIM1_DMA) || ((REMAP) == GPIO_Remap_TIM9) || \\r
241                               ((REMAP) == GPIO_Remap_TIM10) || ((REMAP) == GPIO_Remap_TIM11) || \\r
242                               ((REMAP) == GPIO_Remap_TIM13) || ((REMAP) == GPIO_Remap_TIM14) || \\r
243                               ((REMAP) == GPIO_Remap_FSMC_NADV) || ((REMAP) == GPIO_Remap_TIM67_DAC_DMA) || \\r
244                               ((REMAP) == GPIO_Remap_TIM12) || ((REMAP) == GPIO_Remap_MISC))\r
245                               \r
246 /**\r
247   * @}\r
248   */ \r
249 \r
250 /** @defgroup GPIO_Port_Sources \r
251   * @{\r
252   */\r
253 \r
254 #define GPIO_PortSourceGPIOA       ((uint8_t)0x00)\r
255 #define GPIO_PortSourceGPIOB       ((uint8_t)0x01)\r
256 #define GPIO_PortSourceGPIOC       ((uint8_t)0x02)\r
257 #define GPIO_PortSourceGPIOD       ((uint8_t)0x03)\r
258 #define GPIO_PortSourceGPIOE       ((uint8_t)0x04)\r
259 #define GPIO_PortSourceGPIOF       ((uint8_t)0x05)\r
260 #define GPIO_PortSourceGPIOG       ((uint8_t)0x06)\r
261 #define IS_GPIO_EVENTOUT_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == GPIO_PortSourceGPIOA) || \\r
262                                                   ((PORTSOURCE) == GPIO_PortSourceGPIOB) || \\r
263                                                   ((PORTSOURCE) == GPIO_PortSourceGPIOC) || \\r
264                                                   ((PORTSOURCE) == GPIO_PortSourceGPIOD) || \\r
265                                                   ((PORTSOURCE) == GPIO_PortSourceGPIOE))\r
266 \r
267 #define IS_GPIO_EXTI_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == GPIO_PortSourceGPIOA) || \\r
268                                               ((PORTSOURCE) == GPIO_PortSourceGPIOB) || \\r
269                                               ((PORTSOURCE) == GPIO_PortSourceGPIOC) || \\r
270                                               ((PORTSOURCE) == GPIO_PortSourceGPIOD) || \\r
271                                               ((PORTSOURCE) == GPIO_PortSourceGPIOE) || \\r
272                                               ((PORTSOURCE) == GPIO_PortSourceGPIOF) || \\r
273                                               ((PORTSOURCE) == GPIO_PortSourceGPIOG))\r
274 \r
275 /**\r
276   * @}\r
277   */\r
278 \r
279 /** @defgroup GPIO_Pin_sources \r
280   * @{\r
281   */\r
282 \r
283 #define GPIO_PinSource0            ((uint8_t)0x00)\r
284 #define GPIO_PinSource1            ((uint8_t)0x01)\r
285 #define GPIO_PinSource2            ((uint8_t)0x02)\r
286 #define GPIO_PinSource3            ((uint8_t)0x03)\r
287 #define GPIO_PinSource4            ((uint8_t)0x04)\r
288 #define GPIO_PinSource5            ((uint8_t)0x05)\r
289 #define GPIO_PinSource6            ((uint8_t)0x06)\r
290 #define GPIO_PinSource7            ((uint8_t)0x07)\r
291 #define GPIO_PinSource8            ((uint8_t)0x08)\r
292 #define GPIO_PinSource9            ((uint8_t)0x09)\r
293 #define GPIO_PinSource10           ((uint8_t)0x0A)\r
294 #define GPIO_PinSource11           ((uint8_t)0x0B)\r
295 #define GPIO_PinSource12           ((uint8_t)0x0C)\r
296 #define GPIO_PinSource13           ((uint8_t)0x0D)\r
297 #define GPIO_PinSource14           ((uint8_t)0x0E)\r
298 #define GPIO_PinSource15           ((uint8_t)0x0F)\r
299 \r
300 #define IS_GPIO_PIN_SOURCE(PINSOURCE) (((PINSOURCE) == GPIO_PinSource0) || \\r
301                                        ((PINSOURCE) == GPIO_PinSource1) || \\r
302                                        ((PINSOURCE) == GPIO_PinSource2) || \\r
303                                        ((PINSOURCE) == GPIO_PinSource3) || \\r
304                                        ((PINSOURCE) == GPIO_PinSource4) || \\r
305                                        ((PINSOURCE) == GPIO_PinSource5) || \\r
306                                        ((PINSOURCE) == GPIO_PinSource6) || \\r
307                                        ((PINSOURCE) == GPIO_PinSource7) || \\r
308                                        ((PINSOURCE) == GPIO_PinSource8) || \\r
309                                        ((PINSOURCE) == GPIO_PinSource9) || \\r
310                                        ((PINSOURCE) == GPIO_PinSource10) || \\r
311                                        ((PINSOURCE) == GPIO_PinSource11) || \\r
312                                        ((PINSOURCE) == GPIO_PinSource12) || \\r
313                                        ((PINSOURCE) == GPIO_PinSource13) || \\r
314                                        ((PINSOURCE) == GPIO_PinSource14) || \\r
315                                        ((PINSOURCE) == GPIO_PinSource15))\r
316 \r
317 /**\r
318   * @}\r
319   */\r
320 \r
321 /** @defgroup Ethernet_Media_Interface \r
322   * @{\r
323   */ \r
324 #define GPIO_ETH_MediaInterface_MII    ((u32)0x00000000) \r
325 #define GPIO_ETH_MediaInterface_RMII   ((u32)0x00000001)                                       \r
326 \r
327 #define IS_GPIO_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == GPIO_ETH_MediaInterface_MII) || \\r
328                                                 ((INTERFACE) == GPIO_ETH_MediaInterface_RMII))\r
329 \r
330 /**\r
331   * @}\r
332   */                                                \r
333 /**\r
334   * @}\r
335   */\r
336 \r
337 /** @defgroup GPIO_Exported_Macros\r
338   * @{\r
339   */\r
340 \r
341 /**\r
342   * @}\r
343   */\r
344 \r
345 /** @defgroup GPIO_Exported_Functions\r
346   * @{\r
347   */\r
348 \r
349 void GPIO_DeInit(GPIO_TypeDef* GPIOx);\r
350 void GPIO_AFIODeInit(void);\r
351 void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);\r
352 void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);\r
353 uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);\r
354 uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx);\r
355 uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);\r
356 uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx);\r
357 void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);\r
358 void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);\r
359 void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal);\r
360 void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal);\r
361 void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);\r
362 void GPIO_EventOutputConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource);\r
363 void GPIO_EventOutputCmd(FunctionalState NewState);\r
364 void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState);\r
365 void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource);\r
366 void GPIO_ETH_MediaInterfaceConfig(uint32_t GPIO_ETH_MediaInterface);\r
367 \r
368 #ifdef __cplusplus\r
369 }\r
370 #endif\r
371 \r
372 #endif /* __STM32F10x_GPIO_H */\r
373 /**\r
374   * @}\r
375   */\r
376 \r
377 /**\r
378   * @}\r
379   */\r
380 \r
381 /**\r
382   * @}\r
383   */\r
384 \r
385 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/\r