Functions
stm32f30x_gpio.c File Reference

This file provides firmware functions to manage the following functionalities of the GPIO peripheral: More...

#include "stm32f30x_gpio.h"
#include "stm32f30x_rcc.h"
Include dependency graph for stm32f30x_gpio.c:

Go to the source code of this file.

Functions

void GPIO_DeInit (GPIO_TypeDef *GPIOx)
 De-initializes the GPIOx peripheral registers to their default reset values. More...
 
void GPIO_Init (GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_InitStruct)
 Initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct. More...
 
void GPIO_PinAFConfig (GPIO_TypeDef *GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF)
 Changes the mapping of the specified pin. More...
 
void GPIO_PinLockConfig (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Locks GPIO Pins configuration registers. More...
 
uint16_t GPIO_ReadInputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO input data port. More...
 
uint8_t GPIO_ReadInputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Reads the specified input port pin. More...
 
uint16_t GPIO_ReadOutputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO output data port. More...
 
uint8_t GPIO_ReadOutputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Reads the specified output data port bit. More...
 
void GPIO_ResetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Clears the selected data port bits. More...
 
void GPIO_SetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Sets the selected data port bits. More...
 
void GPIO_StructInit (GPIO_InitTypeDef *GPIO_InitStruct)
 Fills each GPIO_InitStruct member with its default value. More...
 
void GPIO_Write (GPIO_TypeDef *GPIOx, uint16_t PortVal)
 Writes data to the specified GPIO data port. More...
 
void GPIO_WriteBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
 Sets or clears the selected data port bit. More...
 

Detailed Description

This file provides firmware functions to manage the following functionalities of the GPIO peripheral:

Author
MCD Application Team
Version
V1.1.1
Date
04-April-2014
  • Initialization and Configuration functions
  • GPIO Read and Write functions
  • GPIO Alternate functions configuration functions
===============================================================================
                     ##### How to use this driver #####
===============================================================================
   [..]
   (#) Enable the GPIO AHB clock using RCC_AHBPeriphClockCmd()
   (#) Configure the GPIO pin(s) using GPIO_Init()
       Four possible configuration are available for each pin:
       (++) Input: Floating, Pull-up, Pull-down.
       (++) Output: Push-Pull (Pull-up, Pull-down or no Pull),
                    Open Drain (Pull-up, Pull-down or no Pull).
            In output mode, the speed is configurable: Low, Medium, Fast or High.
       (++) Alternate Function: Push-Pull (Pull-up, Pull-down or no Pull), 
                                Open Drain (Pull-up, Pull-down or no Pull).
       (++) Analog: required mode when a pin is to be used as ADC channel,
            DAC output or comparator input.
   (#) Peripherals alternate function:
       (++) For ADC, DAC and comparators, configure the desired pin in 
            analog mode using GPIO_InitStruct->GPIO_Mode = GPIO_Mode_AN
       (++) For other peripherals (TIM, USART...):
            (+++) Connect the pin to the desired peripherals' Alternate 
                  Function (AF) using GPIO_PinAFConfig() function.
            (+++) Configure the desired pin in alternate function mode using
                  GPIO_InitStruct->GPIO_Mode = GPIO_Mode_AF
            (+++) Select the type, pull-up/pull-down and output speed via 
                  GPIO_PuPd, GPIO_OType and GPIO_Speed members.
            (+++) Call GPIO_Init() function.
   (#) To get the level of a pin configured in input mode use GPIO_ReadInputDataBit()
   (#) To set/reset the level of a pin configured in output mode use
       GPIO_SetBits()/GPIO_ResetBits()
   (#) During and just after reset, the alternate functions are not active 
       and the GPIO pins are configured in input floating mode (except JTAG pins).
   (#) The LSE oscillator pins OSC32_IN and OSC32_OUT can be used as 
       general-purpose (PC14 and PC15, respectively) when the LSE
       oscillator is off. The LSE has priority over the GPIO function.
   (#) The HSE oscillator pins OSC_IN/OSC_OUT can be used as general-purpose 
       (PF0 and PF1 respectively) when the HSE oscillator is off. The HSE has 
       the priority over the GPIO function.  
Attention

© COPYRIGHT 2014 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file stm32f30x_gpio.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:21