stm32f10x_gpio.c File Reference

This file provides all the GPIO firmware functions. More...

#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"

Go to the source code of this file.

Defines

#define AFIO_OFFSET   (AFIO_BASE - PERIPH_BASE)
#define DBGAFR_LOCATION_MASK   ((uint32_t)0x00200000)
#define DBGAFR_NUMBITS_MASK   ((uint32_t)0x00100000)
#define DBGAFR_POSITION_MASK   ((uint32_t)0x000F0000)
#define DBGAFR_SWJCFG_MASK   ((uint32_t)0xF0FFFFFF)
#define EVCR_EVOE_BB   (PERIPH_BB_BASE + (EVCR_OFFSET * 32) + (EVOE_BitNumber * 4))
#define EVCR_OFFSET   (AFIO_OFFSET + 0x00)
#define EVCR_PORTPINCONFIG_MASK   ((uint16_t)0xFF80)
#define EVOE_BitNumber   ((uint8_t)0x07)
#define LSB_MASK   ((uint16_t)0xFFFF)
#define MAPR_MII_RMII_SEL_BB   (PERIPH_BB_BASE + (MAPR_OFFSET * 32) + (MII_RMII_SEL_BitNumber * 4))
#define MAPR_OFFSET   (AFIO_OFFSET + 0x04)
#define MII_RMII_SEL_BitNumber   ((u8)0x17)

Functions

void GPIO_AFIODeInit (void)
 Deinitializes the Alternate Functions (remap, event control and EXTI configuration) registers to their default reset values.
void GPIO_DeInit (GPIO_TypeDef *GPIOx)
 Deinitializes the GPIOx peripheral registers to their default reset values.
void GPIO_ETH_MediaInterfaceConfig (uint32_t GPIO_ETH_MediaInterface)
 Selects the Ethernet media interface.
void GPIO_EventOutputCmd (FunctionalState NewState)
 Enables or disables the Event Output.
void GPIO_EventOutputConfig (uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
 Selects the GPIO pin used as Event output.
void GPIO_EXTILineConfig (uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
 Selects the GPIO pin used as EXTI Line.
void GPIO_Init (GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_InitStruct)
 Initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct.
void GPIO_PinLockConfig (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Locks GPIO Pins configuration registers.
void GPIO_PinRemapConfig (uint32_t GPIO_Remap, FunctionalState NewState)
 Changes the mapping of the specified pin.
uint16_t GPIO_ReadInputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO input data port.
uint8_t GPIO_ReadInputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Reads the specified input port pin.
uint16_t GPIO_ReadOutputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO output data port.
uint8_t GPIO_ReadOutputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Reads the specified output data port bit.
void GPIO_ResetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Clears the selected data port bits.
void GPIO_SetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Sets the selected data port bits.
void GPIO_StructInit (GPIO_InitTypeDef *GPIO_InitStruct)
 Fills each GPIO_InitStruct member with its default value.
void GPIO_Write (GPIO_TypeDef *GPIOx, uint16_t PortVal)
 Writes data to the specified GPIO data port.
void GPIO_WriteBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
 Sets or clears the selected data port bit.

Detailed Description

This file provides all the GPIO firmware functions.

Author:
MCD Application Team
Version:
V3.4.0
Date:
10/15/2010

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2010 STMicroelectronics

Definition in file stm32f10x_gpio.c.

STM32F10x Standard Peripherals Library: Footer

 

 

 

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