MG32F10x Standard Peripherals Firmware Library
|
This file contains all the functions prototypes for the GPIO firmware library. More...
#include "mg32f10x.h"
Go to the source code of this file.
Macros | |
#define | IS_GPIO_ALL_PERIPH(PERIPH) |
#define | IS_GPIO_BIT_ACTION(ACTION) (((ACTION) == Bit_RESET) || ((ACTION) == Bit_SET)) |
#define | GPIO_Pin_0 ((uint16_t)0x0001) |
#define | GPIO_Pin_1 ((uint16_t)0x0002) |
#define | GPIO_Pin_2 ((uint16_t)0x0004) |
#define | GPIO_Pin_3 ((uint16_t)0x0008) |
#define | GPIO_Pin_4 ((uint16_t)0x0010) |
#define | GPIO_Pin_5 ((uint16_t)0x0020) |
#define | GPIO_Pin_6 ((uint16_t)0x0040) |
#define | GPIO_Pin_7 ((uint16_t)0x0080) |
#define | GPIO_Pin_8 ((uint16_t)0x0100) |
#define | GPIO_Pin_9 ((uint16_t)0x0200) |
#define | GPIO_Pin_10 ((uint16_t)0x0400) |
#define | GPIO_Pin_11 ((uint16_t)0x0800) |
#define | GPIO_Pin_12 ((uint16_t)0x1000) |
#define | GPIO_Pin_13 ((uint16_t)0x2000) |
#define | GPIO_Pin_14 ((uint16_t)0x4000) |
#define | GPIO_Pin_15 ((uint16_t)0x8000) |
#define | GPIO_Pin_All ((uint16_t)0xFFFF) |
#define | IS_GPIO_PIN(PIN) (((PIN) & 0x0000FFFF) != (uint32_t)0x00) |
#define | IS_GET_GPIO_PIN(PIN) |
#define | GPIO_PortSourceGPIOA ((uint8_t)0x00) |
#define | GPIO_PortSourceGPIOB ((uint8_t)0x01) |
#define | GPIO_PortSourceGPIOC ((uint8_t)0x02) |
#define | GPIO_PortSourceGPIOD ((uint8_t)0x03) |
#define | GPIO_PinSource0 ((uint8_t)0x00) |
#define | GPIO_PinSource1 ((uint8_t)0x01) |
#define | GPIO_PinSource2 ((uint8_t)0x02) |
#define | GPIO_PinSource3 ((uint8_t)0x03) |
#define | GPIO_PinSource4 ((uint8_t)0x04) |
#define | GPIO_PinSource5 ((uint8_t)0x05) |
#define | GPIO_PinSource6 ((uint8_t)0x06) |
#define | GPIO_PinSource7 ((uint8_t)0x07) |
#define | GPIO_PinSource8 ((uint8_t)0x08) |
#define | GPIO_PinSource9 ((uint8_t)0x09) |
#define | GPIO_PinSource10 ((uint8_t)0x0A) |
#define | GPIO_PinSource11 ((uint8_t)0x0B) |
#define | GPIO_PinSource12 ((uint8_t)0x0C) |
#define | GPIO_PinSource13 ((uint8_t)0x0D) |
#define | GPIO_PinSource14 ((uint8_t)0x0E) |
#define | GPIO_PinSource15 ((uint8_t)0x0F) |
#define | IS_GPIO_PIN_SOURCE(PINSOURCE) |
#define | GPIO_MODE_IN 0x00000000U |
#define | GPIO_MODE_OUT 0x10000000U |
#define | GPIO_MODE_AF 0x20000000U |
#define | GPIO_MODE_ANA 0x30000000U |
#define | GPIO_OTYPE_PP 0x00000000U |
#define | GPIO_OTYPE_OD 0x01000000U |
#define | GPIO_SPEED_LOW 0x00100000U |
#define | GPIO_SPEED_HIGH 0x00000000U |
#define | GPIO_PUPD_NOPULL 0x00000000U |
#define | GPIO_PUPD_UP 0x00010000U |
#define | GPIO_PUPD_DOWN 0x00020000U |
#define | GPIO_AF0 0 |
#define | GPIO_AF1 1 |
#define | GPIO_AF2 2 |
#define | GPIO_AF3 3 |
#define | GPIO_AF4 4 |
#define | GPIO_AF5 5 |
#define | GPIO_AF6 6 |
#define | GPIO_AF7 7 |
#define | GPIO_AF8 8 |
#define | GPIO_AF9 9 |
#define | GPIO_AF10 10 |
#define | GPIO_AF11 11 |
#define | GPIO_AF12 12 |
#define | GPIO_AF13 13 |
#define | GPIO_AF14 14 |
#define | GPIO_AF15 15 |
Enumerations | |
enum | BitAction { Bit_RESET = 0, Bit_SET } |
GPIO Bit SET and Bit RESET enumeration. | |
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, uint16_t GPIO_Pin, uint32_t PinConfig) |
Initializes the GPIOx peripheral according to the PinConfig. More... | |
void | GPIO_SetAFPin_0_7 (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, uint32_t Alternate) |
Configure gpio alternate function of a dedicated pin from 0 to 7 for a dedicated port. More... | |
void | GPIO_SetAFPin_8_15 (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, uint32_t Alternate) |
Configure gpio alternate function of a dedicated pin from 8 to 15 for a dedicated port. More... | |
void | GPIO_SetAFPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, uint32_t Alternate) |
Configure gpio alternate function of any pins for a dedicated port. More... | |
uint8_t | GPIO_ReadInputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Reads the specified input port pin. More... | |
uint16_t | GPIO_ReadInputData (GPIO_TypeDef *GPIOx) |
Reads the specified GPIO input data port. More... | |
uint8_t | GPIO_ReadOutputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Reads the specified output data port bit. More... | |
uint16_t | GPIO_ReadOutputData (GPIO_TypeDef *GPIOx) |
Reads the specified GPIO output data port. More... | |
void | GPIO_SetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Sets the selected data port bits. More... | |
void | GPIO_ResetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Clears the selected data port bits. More... | |
void | GPIO_WriteBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, BitAction BitVal) |
Sets or clears the selected data port bit. More... | |
void | GPIO_Write (GPIO_TypeDef *GPIOx, uint16_t PortVal) |
Writes data to the specified GPIO data port. More... | |
void | GPIO_ToggleBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Toggle data value for several pin of specified port. More... | |
void | GPIO_LockPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Lock configuration of several pins for a specified port. More... | |
uint32_t | GPIO_IsPinLocked (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Return 1 if all pins passed as parameter, of a specified port, are locked. else Return 0. More... | |
void | GPIO_SchmittTriggerCmd (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, FunctionalState NewState) |
Enables or disables the schmitt trigger of several pins for a specified port. More... | |
void | GPIO_DriveCurrentConfig (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, uint32_t Current) |
Configure the drive current of several pins for a specified port. More... | |
void | GPIO_EXTILineConfig (uint8_t GPIO_PortSource, uint8_t GPIO_PinSource) |
Selects the GPIO pin used as EXTI Line. More... | |
This file contains all the functions prototypes for the GPIO firmware library.