Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
stm32f10x_gpio.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f10x_gpio.h 00004 * @author MCD Application Team 00005 * @version V3.5.0 00006 * @date 11-March-2011 00007 * @brief This file contains all the functions prototypes for the GPIO 00008 * firmware library. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 00013 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 00014 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 00015 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 00016 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 00017 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 00018 * 00019 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2> 00020 ****************************************************************************** 00021 */ 00022 00023 /* Define to prevent recursive inclusion -------------------------------------*/ 00024 #ifndef __STM32F10x_GPIO_H 00025 #define __STM32F10x_GPIO_H 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 /* Includes ------------------------------------------------------------------*/ 00032 #include "stm32f10x.h" 00033 00034 /** @addtogroup STM32F10x_StdPeriph_Driver 00035 * @{ 00036 */ 00037 00038 /** @addtogroup GPIO 00039 * @{ 00040 */ 00041 00042 /** @defgroup GPIO_Exported_Types 00043 * @{ 00044 */ 00045 00046 #define IS_GPIO_ALL_PERIPH(PERIPH) (((PERIPH) == GPIOA) || \ 00047 ((PERIPH) == GPIOB) || \ 00048 ((PERIPH) == GPIOC) || \ 00049 ((PERIPH) == GPIOD) || \ 00050 ((PERIPH) == GPIOE) || \ 00051 ((PERIPH) == GPIOF) || \ 00052 ((PERIPH) == GPIOG)) 00053 00054 /** 00055 * @brief Output Maximum frequency selection 00056 */ 00057 00058 typedef enum 00059 { 00060 GPIO_Speed_10MHz = 1, 00061 GPIO_Speed_2MHz, 00062 GPIO_Speed_50MHz 00063 }GPIOSpeed_TypeDef; 00064 #define IS_GPIO_SPEED(SPEED) (((SPEED) == GPIO_Speed_10MHz) || ((SPEED) == GPIO_Speed_2MHz) || \ 00065 ((SPEED) == GPIO_Speed_50MHz)) 00066 00067 /** 00068 * @brief Configuration Mode enumeration 00069 */ 00070 00071 typedef enum 00072 { GPIO_Mode_AIN = 0x0, 00073 GPIO_Mode_IN_FLOATING = 0x04, 00074 GPIO_Mode_IPD = 0x28, 00075 GPIO_Mode_IPU = 0x48, 00076 GPIO_Mode_Out_OD = 0x14, 00077 GPIO_Mode_Out_PP = 0x10, 00078 GPIO_Mode_AF_OD = 0x1C, 00079 GPIO_Mode_AF_PP = 0x18 00080 }GPIOMode_TypeDef; 00081 00082 #define IS_GPIO_MODE(MODE) (((MODE) == GPIO_Mode_AIN) || ((MODE) == GPIO_Mode_IN_FLOATING) || \ 00083 ((MODE) == GPIO_Mode_IPD) || ((MODE) == GPIO_Mode_IPU) || \ 00084 ((MODE) == GPIO_Mode_Out_OD) || ((MODE) == GPIO_Mode_Out_PP) || \ 00085 ((MODE) == GPIO_Mode_AF_OD) || ((MODE) == GPIO_Mode_AF_PP)) 00086 00087 /** 00088 * @brief GPIO Init structure definition 00089 */ 00090 00091 typedef struct 00092 { 00093 uint16_t GPIO_Pin; /*!< Specifies the GPIO pins to be configured. 00094 This parameter can be any value of @ref GPIO_pins_define */ 00095 00096 GPIOSpeed_TypeDef GPIO_Speed; /*!< Specifies the speed for the selected pins. 00097 This parameter can be a value of @ref GPIOSpeed_TypeDef */ 00098 00099 GPIOMode_TypeDef GPIO_Mode; /*!< Specifies the operating mode for the selected pins. 00100 This parameter can be a value of @ref GPIOMode_TypeDef */ 00101 }GPIO_InitTypeDef; 00102 00103 00104 /** 00105 * @brief Bit_SET and Bit_RESET enumeration 00106 */ 00107 00108 typedef enum 00109 { Bit_RESET = 0, 00110 Bit_SET 00111 }BitAction; 00112 00113 #define IS_GPIO_BIT_ACTION(ACTION) (((ACTION) == Bit_RESET) || ((ACTION) == Bit_SET)) 00114 00115 /** 00116 * @} 00117 */ 00118 00119 /** @defgroup GPIO_Exported_Constants 00120 * @{ 00121 */ 00122 00123 /** @defgroup GPIO_pins_define 00124 * @{ 00125 */ 00126 00127 #define GPIO_Pin_0 ((uint16_t)0x0001) /*!< Pin 0 selected */ 00128 #define GPIO_Pin_1 ((uint16_t)0x0002) /*!< Pin 1 selected */ 00129 #define GPIO_Pin_2 ((uint16_t)0x0004) /*!< Pin 2 selected */ 00130 #define GPIO_Pin_3 ((uint16_t)0x0008) /*!< Pin 3 selected */ 00131 #define GPIO_Pin_4 ((uint16_t)0x0010) /*!< Pin 4 selected */ 00132 #define GPIO_Pin_5 ((uint16_t)0x0020) /*!< Pin 5 selected */ 00133 #define GPIO_Pin_6 ((uint16_t)0x0040) /*!< Pin 6 selected */ 00134 #define GPIO_Pin_7 ((uint16_t)0x0080) /*!< Pin 7 selected */ 00135 #define GPIO_Pin_8 ((uint16_t)0x0100) /*!< Pin 8 selected */ 00136 #define GPIO_Pin_9 ((uint16_t)0x0200) /*!< Pin 9 selected */ 00137 #define GPIO_Pin_10 ((uint16_t)0x0400) /*!< Pin 10 selected */ 00138 #define GPIO_Pin_11 ((uint16_t)0x0800) /*!< Pin 11 selected */ 00139 #define GPIO_Pin_12 ((uint16_t)0x1000) /*!< Pin 12 selected */ 00140 #define GPIO_Pin_13 ((uint16_t)0x2000) /*!< Pin 13 selected */ 00141 #define GPIO_Pin_14 ((uint16_t)0x4000) /*!< Pin 14 selected */ 00142 #define GPIO_Pin_15 ((uint16_t)0x8000) /*!< Pin 15 selected */ 00143 #define GPIO_Pin_All ((uint16_t)0xFFFF) /*!< All pins selected */ 00144 00145 #define IS_GPIO_PIN(PIN) ((((PIN) & (uint16_t)0x00) == 0x00) && ((PIN) != (uint16_t)0x00)) 00146 00147 #define IS_GET_GPIO_PIN(PIN) (((PIN) == GPIO_Pin_0) || \ 00148 ((PIN) == GPIO_Pin_1) || \ 00149 ((PIN) == GPIO_Pin_2) || \ 00150 ((PIN) == GPIO_Pin_3) || \ 00151 ((PIN) == GPIO_Pin_4) || \ 00152 ((PIN) == GPIO_Pin_5) || \ 00153 ((PIN) == GPIO_Pin_6) || \ 00154 ((PIN) == GPIO_Pin_7) || \ 00155 ((PIN) == GPIO_Pin_8) || \ 00156 ((PIN) == GPIO_Pin_9) || \ 00157 ((PIN) == GPIO_Pin_10) || \ 00158 ((PIN) == GPIO_Pin_11) || \ 00159 ((PIN) == GPIO_Pin_12) || \ 00160 ((PIN) == GPIO_Pin_13) || \ 00161 ((PIN) == GPIO_Pin_14) || \ 00162 ((PIN) == GPIO_Pin_15)) 00163 00164 /** 00165 * @} 00166 */ 00167 00168 /** @defgroup GPIO_Remap_define 00169 * @{ 00170 */ 00171 00172 #define GPIO_Remap_SPI1 ((uint32_t)0x00000001) /*!< SPI1 Alternate Function mapping */ 00173 #define GPIO_Remap_I2C1 ((uint32_t)0x00000002) /*!< I2C1 Alternate Function mapping */ 00174 #define GPIO_Remap_USART1 ((uint32_t)0x00000004) /*!< USART1 Alternate Function mapping */ 00175 #define GPIO_Remap_USART2 ((uint32_t)0x00000008) /*!< USART2 Alternate Function mapping */ 00176 #define GPIO_PartialRemap_USART3 ((uint32_t)0x00140010) /*!< USART3 Partial Alternate Function mapping */ 00177 #define GPIO_FullRemap_USART3 ((uint32_t)0x00140030) /*!< USART3 Full Alternate Function mapping */ 00178 #define GPIO_PartialRemap_TIM1 ((uint32_t)0x00160040) /*!< TIM1 Partial Alternate Function mapping */ 00179 #define GPIO_FullRemap_TIM1 ((uint32_t)0x001600C0) /*!< TIM1 Full Alternate Function mapping */ 00180 #define GPIO_PartialRemap1_TIM2 ((uint32_t)0x00180100) /*!< TIM2 Partial1 Alternate Function mapping */ 00181 #define GPIO_PartialRemap2_TIM2 ((uint32_t)0x00180200) /*!< TIM2 Partial2 Alternate Function mapping */ 00182 #define GPIO_FullRemap_TIM2 ((uint32_t)0x00180300) /*!< TIM2 Full Alternate Function mapping */ 00183 #define GPIO_PartialRemap_TIM3 ((uint32_t)0x001A0800) /*!< TIM3 Partial Alternate Function mapping */ 00184 #define GPIO_FullRemap_TIM3 ((uint32_t)0x001A0C00) /*!< TIM3 Full Alternate Function mapping */ 00185 #define GPIO_Remap_TIM4 ((uint32_t)0x00001000) /*!< TIM4 Alternate Function mapping */ 00186 #define GPIO_Remap1_CAN1 ((uint32_t)0x001D4000) /*!< CAN1 Alternate Function mapping */ 00187 #define GPIO_Remap2_CAN1 ((uint32_t)0x001D6000) /*!< CAN1 Alternate Function mapping */ 00188 #define GPIO_Remap_PD01 ((uint32_t)0x00008000) /*!< PD01 Alternate Function mapping */ 00189 #define GPIO_Remap_TIM5CH4_LSI ((uint32_t)0x00200001) /*!< LSI connected to TIM5 Channel4 input capture for calibration */ 00190 #define GPIO_Remap_ADC1_ETRGINJ ((uint32_t)0x00200002) /*!< ADC1 External Trigger Injected Conversion remapping */ 00191 #define GPIO_Remap_ADC1_ETRGREG ((uint32_t)0x00200004) /*!< ADC1 External Trigger Regular Conversion remapping */ 00192 #define GPIO_Remap_ADC2_ETRGINJ ((uint32_t)0x00200008) /*!< ADC2 External Trigger Injected Conversion remapping */ 00193 #define GPIO_Remap_ADC2_ETRGREG ((uint32_t)0x00200010) /*!< ADC2 External Trigger Regular Conversion remapping */ 00194 #define GPIO_Remap_ETH ((uint32_t)0x00200020) /*!< Ethernet remapping (only for Connectivity line devices) */ 00195 #define GPIO_Remap_CAN2 ((uint32_t)0x00200040) /*!< CAN2 remapping (only for Connectivity line devices) */ 00196 #define GPIO_Remap_SWJ_NoJTRST ((uint32_t)0x00300100) /*!< Full SWJ Enabled (JTAG-DP + SW-DP) but without JTRST */ 00197 #define GPIO_Remap_SWJ_JTAGDisable ((uint32_t)0x00300200) /*!< JTAG-DP Disabled and SW-DP Enabled */ 00198 #define GPIO_Remap_SWJ_Disable ((uint32_t)0x00300400) /*!< Full SWJ Disabled (JTAG-DP + SW-DP) */ 00199 #define GPIO_Remap_SPI3 ((uint32_t)0x00201100) /*!< SPI3/I2S3 Alternate Function mapping (only for Connectivity line devices) */ 00200 #define GPIO_Remap_TIM2ITR1_PTP_SOF ((uint32_t)0x00202000) /*!< Ethernet PTP output or USB OTG SOF (Start of Frame) connected 00201 to TIM2 Internal Trigger 1 for calibration 00202 (only for Connectivity line devices) */ 00203 #define GPIO_Remap_PTP_PPS ((uint32_t)0x00204000) /*!< Ethernet MAC PPS_PTS output on PB05 (only for Connectivity line devices) */ 00204 00205 #define GPIO_Remap_TIM15 ((uint32_t)0x80000001) /*!< TIM15 Alternate Function mapping (only for Value line devices) */ 00206 #define GPIO_Remap_TIM16 ((uint32_t)0x80000002) /*!< TIM16 Alternate Function mapping (only for Value line devices) */ 00207 #define GPIO_Remap_TIM17 ((uint32_t)0x80000004) /*!< TIM17 Alternate Function mapping (only for Value line devices) */ 00208 #define GPIO_Remap_CEC ((uint32_t)0x80000008) /*!< CEC Alternate Function mapping (only for Value line devices) */ 00209 #define GPIO_Remap_TIM1_DMA ((uint32_t)0x80000010) /*!< TIM1 DMA requests mapping (only for Value line devices) */ 00210 00211 #define GPIO_Remap_TIM9 ((uint32_t)0x80000020) /*!< TIM9 Alternate Function mapping (only for XL-density devices) */ 00212 #define GPIO_Remap_TIM10 ((uint32_t)0x80000040) /*!< TIM10 Alternate Function mapping (only for XL-density devices) */ 00213 #define GPIO_Remap_TIM11 ((uint32_t)0x80000080) /*!< TIM11 Alternate Function mapping (only for XL-density devices) */ 00214 #define GPIO_Remap_TIM13 ((uint32_t)0x80000100) /*!< TIM13 Alternate Function mapping (only for High density Value line and XL-density devices) */ 00215 #define GPIO_Remap_TIM14 ((uint32_t)0x80000200) /*!< TIM14 Alternate Function mapping (only for High density Value line and XL-density devices) */ 00216 #define GPIO_Remap_FSMC_NADV ((uint32_t)0x80000400) /*!< FSMC_NADV Alternate Function mapping (only for High density Value line and XL-density devices) */ 00217 00218 #define GPIO_Remap_TIM67_DAC_DMA ((uint32_t)0x80000800) /*!< TIM6/TIM7 and DAC DMA requests remapping (only for High density Value line devices) */ 00219 #define GPIO_Remap_TIM12 ((uint32_t)0x80001000) /*!< TIM12 Alternate Function mapping (only for High density Value line devices) */ 00220 #define GPIO_Remap_MISC ((uint32_t)0x80002000) /*!< Miscellaneous Remap (DMA2 Channel5 Position and DAC Trigger remapping, 00221 only for High density Value line devices) */ 00222 00223 #define IS_GPIO_REMAP(REMAP) (((REMAP) == GPIO_Remap_SPI1) || ((REMAP) == GPIO_Remap_I2C1) || \ 00224 ((REMAP) == GPIO_Remap_USART1) || ((REMAP) == GPIO_Remap_USART2) || \ 00225 ((REMAP) == GPIO_PartialRemap_USART3) || ((REMAP) == GPIO_FullRemap_USART3) || \ 00226 ((REMAP) == GPIO_PartialRemap_TIM1) || ((REMAP) == GPIO_FullRemap_TIM1) || \ 00227 ((REMAP) == GPIO_PartialRemap1_TIM2) || ((REMAP) == GPIO_PartialRemap2_TIM2) || \ 00228 ((REMAP) == GPIO_FullRemap_TIM2) || ((REMAP) == GPIO_PartialRemap_TIM3) || \ 00229 ((REMAP) == GPIO_FullRemap_TIM3) || ((REMAP) == GPIO_Remap_TIM4) || \ 00230 ((REMAP) == GPIO_Remap1_CAN1) || ((REMAP) == GPIO_Remap2_CAN1) || \ 00231 ((REMAP) == GPIO_Remap_PD01) || ((REMAP) == GPIO_Remap_TIM5CH4_LSI) || \ 00232 ((REMAP) == GPIO_Remap_ADC1_ETRGINJ) ||((REMAP) == GPIO_Remap_ADC1_ETRGREG) || \ 00233 ((REMAP) == GPIO_Remap_ADC2_ETRGINJ) ||((REMAP) == GPIO_Remap_ADC2_ETRGREG) || \ 00234 ((REMAP) == GPIO_Remap_ETH) ||((REMAP) == GPIO_Remap_CAN2) || \ 00235 ((REMAP) == GPIO_Remap_SWJ_NoJTRST) || ((REMAP) == GPIO_Remap_SWJ_JTAGDisable) || \ 00236 ((REMAP) == GPIO_Remap_SWJ_Disable)|| ((REMAP) == GPIO_Remap_SPI3) || \ 00237 ((REMAP) == GPIO_Remap_TIM2ITR1_PTP_SOF) || ((REMAP) == GPIO_Remap_PTP_PPS) || \ 00238 ((REMAP) == GPIO_Remap_TIM15) || ((REMAP) == GPIO_Remap_TIM16) || \ 00239 ((REMAP) == GPIO_Remap_TIM17) || ((REMAP) == GPIO_Remap_CEC) || \ 00240 ((REMAP) == GPIO_Remap_TIM1_DMA) || ((REMAP) == GPIO_Remap_TIM9) || \ 00241 ((REMAP) == GPIO_Remap_TIM10) || ((REMAP) == GPIO_Remap_TIM11) || \ 00242 ((REMAP) == GPIO_Remap_TIM13) || ((REMAP) == GPIO_Remap_TIM14) || \ 00243 ((REMAP) == GPIO_Remap_FSMC_NADV) || ((REMAP) == GPIO_Remap_TIM67_DAC_DMA) || \ 00244 ((REMAP) == GPIO_Remap_TIM12) || ((REMAP) == GPIO_Remap_MISC)) 00245 00246 /** 00247 * @} 00248 */ 00249 00250 /** @defgroup GPIO_Port_Sources 00251 * @{ 00252 */ 00253 00254 #define GPIO_PortSourceGPIOA ((uint8_t)0x00) 00255 #define GPIO_PortSourceGPIOB ((uint8_t)0x01) 00256 #define GPIO_PortSourceGPIOC ((uint8_t)0x02) 00257 #define GPIO_PortSourceGPIOD ((uint8_t)0x03) 00258 #define GPIO_PortSourceGPIOE ((uint8_t)0x04) 00259 #define GPIO_PortSourceGPIOF ((uint8_t)0x05) 00260 #define GPIO_PortSourceGPIOG ((uint8_t)0x06) 00261 #define IS_GPIO_EVENTOUT_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == GPIO_PortSourceGPIOA) || \ 00262 ((PORTSOURCE) == GPIO_PortSourceGPIOB) || \ 00263 ((PORTSOURCE) == GPIO_PortSourceGPIOC) || \ 00264 ((PORTSOURCE) == GPIO_PortSourceGPIOD) || \ 00265 ((PORTSOURCE) == GPIO_PortSourceGPIOE)) 00266 00267 #define IS_GPIO_EXTI_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == GPIO_PortSourceGPIOA) || \ 00268 ((PORTSOURCE) == GPIO_PortSourceGPIOB) || \ 00269 ((PORTSOURCE) == GPIO_PortSourceGPIOC) || \ 00270 ((PORTSOURCE) == GPIO_PortSourceGPIOD) || \ 00271 ((PORTSOURCE) == GPIO_PortSourceGPIOE) || \ 00272 ((PORTSOURCE) == GPIO_PortSourceGPIOF) || \ 00273 ((PORTSOURCE) == GPIO_PortSourceGPIOG)) 00274 00275 /** 00276 * @} 00277 */ 00278 00279 /** @defgroup GPIO_Pin_sources 00280 * @{ 00281 */ 00282 00283 #define GPIO_PinSource0 ((uint8_t)0x00) 00284 #define GPIO_PinSource1 ((uint8_t)0x01) 00285 #define GPIO_PinSource2 ((uint8_t)0x02) 00286 #define GPIO_PinSource3 ((uint8_t)0x03) 00287 #define GPIO_PinSource4 ((uint8_t)0x04) 00288 #define GPIO_PinSource5 ((uint8_t)0x05) 00289 #define GPIO_PinSource6 ((uint8_t)0x06) 00290 #define GPIO_PinSource7 ((uint8_t)0x07) 00291 #define GPIO_PinSource8 ((uint8_t)0x08) 00292 #define GPIO_PinSource9 ((uint8_t)0x09) 00293 #define GPIO_PinSource10 ((uint8_t)0x0A) 00294 #define GPIO_PinSource11 ((uint8_t)0x0B) 00295 #define GPIO_PinSource12 ((uint8_t)0x0C) 00296 #define GPIO_PinSource13 ((uint8_t)0x0D) 00297 #define GPIO_PinSource14 ((uint8_t)0x0E) 00298 #define GPIO_PinSource15 ((uint8_t)0x0F) 00299 00300 #define IS_GPIO_PIN_SOURCE(PINSOURCE) (((PINSOURCE) == GPIO_PinSource0) || \ 00301 ((PINSOURCE) == GPIO_PinSource1) || \ 00302 ((PINSOURCE) == GPIO_PinSource2) || \ 00303 ((PINSOURCE) == GPIO_PinSource3) || \ 00304 ((PINSOURCE) == GPIO_PinSource4) || \ 00305 ((PINSOURCE) == GPIO_PinSource5) || \ 00306 ((PINSOURCE) == GPIO_PinSource6) || \ 00307 ((PINSOURCE) == GPIO_PinSource7) || \ 00308 ((PINSOURCE) == GPIO_PinSource8) || \ 00309 ((PINSOURCE) == GPIO_PinSource9) || \ 00310 ((PINSOURCE) == GPIO_PinSource10) || \ 00311 ((PINSOURCE) == GPIO_PinSource11) || \ 00312 ((PINSOURCE) == GPIO_PinSource12) || \ 00313 ((PINSOURCE) == GPIO_PinSource13) || \ 00314 ((PINSOURCE) == GPIO_PinSource14) || \ 00315 ((PINSOURCE) == GPIO_PinSource15)) 00316 00317 /** 00318 * @} 00319 */ 00320 00321 /** @defgroup Ethernet_Media_Interface 00322 * @{ 00323 */ 00324 #define GPIO_ETH_MediaInterface_MII ((u32)0x00000000) 00325 #define GPIO_ETH_MediaInterface_RMII ((u32)0x00000001) 00326 00327 #define IS_GPIO_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == GPIO_ETH_MediaInterface_MII) || \ 00328 ((INTERFACE) == GPIO_ETH_MediaInterface_RMII)) 00329 00330 /** 00331 * @} 00332 */ 00333 /** 00334 * @} 00335 */ 00336 00337 /** @defgroup GPIO_Exported_Macros 00338 * @{ 00339 */ 00340 00341 /** 00342 * @} 00343 */ 00344 00345 /** @defgroup GPIO_Exported_Functions 00346 * @{ 00347 */ 00348 00349 void GPIO_DeInit(GPIO_TypeDef* GPIOx); 00350 void GPIO_AFIODeInit(void); 00351 void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct); 00352 void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct); 00353 uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin); 00354 uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx); 00355 uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin); 00356 uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx); 00357 void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin); 00358 void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin); 00359 void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal); 00360 void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal); 00361 void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin); 00362 void GPIO_EventOutputConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource); 00363 void GPIO_EventOutputCmd(FunctionalState NewState); 00364 void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState); 00365 void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource); 00366 void GPIO_ETH_MediaInterfaceConfig(uint32_t GPIO_ETH_MediaInterface); 00367 00368 #ifdef __cplusplus 00369 } 00370 #endif 00371 00372 #endif /* __STM32F10x_GPIO_H */ 00373 /** 00374 * @} 00375 */ 00376 00377 /** 00378 * @} 00379 */ 00380 00381 /** 00382 * @} 00383 */ 00384 00385 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 20:45:31 by
 1.7.2
 1.7.2