stm32f10x_gpio.h 19 KB

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