STM8S/A Standard Peripherals Firmware Library: stm8s_gpio.h File Reference

STM8S/A

stm8s_gpio.h File Reference

This file contains all functions prototype and macros for the GPIO peripheral. More...

#include "stm8s.h"

Go to the source code of this file.

Defines

#define IS_GPIO_MODE_OK(MODE)
 Macro used by the assert function to check the different functions parameters.
#define IS_GPIO_PIN_OK(PIN)   ((PIN) != (uint8_t)0x00)
 Macro used by the assert function in order to check the different values of GPIO_Pins.

Enumerations

enum  GPIO_Mode_TypeDef {
  GPIO_MODE_IN_FL_NO_IT = (uint8_t)0x00, GPIO_MODE_IN_PU_NO_IT = (uint8_t)0x40, GPIO_MODE_IN_FL_IT = (uint8_t)0x20, GPIO_MODE_IN_PU_IT = (uint8_t)0x60,
  GPIO_MODE_OUT_OD_LOW_FAST = (uint8_t)0xA0, GPIO_MODE_OUT_PP_LOW_FAST = (uint8_t)0xE0, GPIO_MODE_OUT_OD_LOW_SLOW = (uint8_t)0x80, GPIO_MODE_OUT_PP_LOW_SLOW = (uint8_t)0xC0,
  GPIO_MODE_OUT_OD_HIZ_FAST = (uint8_t)0xB0, GPIO_MODE_OUT_PP_HIGH_FAST = (uint8_t)0xF0, GPIO_MODE_OUT_OD_HIZ_SLOW = (uint8_t)0x90, GPIO_MODE_OUT_PP_HIGH_SLOW = (uint8_t)0xD0
}
 GPIO modes. More...
enum  GPIO_Pin_TypeDef {
  GPIO_PIN_0 = ((uint8_t)0x01), GPIO_PIN_1 = ((uint8_t)0x02), GPIO_PIN_2 = ((uint8_t)0x04), GPIO_PIN_3 = ((uint8_t)0x08),
  GPIO_PIN_4 = ((uint8_t)0x10), GPIO_PIN_5 = ((uint8_t)0x20), GPIO_PIN_6 = ((uint8_t)0x40), GPIO_PIN_7 = ((uint8_t)0x80),
  GPIO_PIN_LNIB = ((uint8_t)0x0F), GPIO_PIN_HNIB = ((uint8_t)0xF0), GPIO_PIN_ALL = ((uint8_t)0xFF)
}
 Definition of the GPIO pins. More...

Functions

void GPIO_DeInit (GPIO_TypeDef *GPIOx)
 Deinitializes the GPIOx peripheral registers to their default reset values.
void GPIO_ExternalPullUpConfig (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin, FunctionalState NewState)
 Configures the external pull-up on GPIOx pins.
void GPIO_Init (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin, GPIO_Mode_TypeDef GPIO_Mode)
 Initializes the GPIOx according to the specified parameters.
uint8_t GPIO_ReadInputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO input data port.
BitStatus GPIO_ReadInputPin (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin)
 Reads the specified GPIO input data pin.
uint8_t GPIO_ReadOutputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO output data port.
void GPIO_Write (GPIO_TypeDef *GPIOx, uint8_t PortVal)
 Writes data to the specified GPIO data port.
void GPIO_WriteHigh (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef PortPins)
 Writes high level to the specified GPIO pins.
void GPIO_WriteLow (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef PortPins)
 Writes low level to the specified GPIO pins.
void GPIO_WriteReverse (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef PortPins)
 Writes reverse level to the specified GPIO pins.

Detailed Description

This file contains all functions prototype and macros for the GPIO peripheral.

Author:
MCD Application Team
Version:
V2.2.0
Date:
30-September-2014
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 stm8s_gpio.h.

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com