stm32f10x_gpio.h

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

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32