STM8L15x Standard Peripherals Drivers: stm8l15x_gpio.h File Reference

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

stm8l15x_gpio.h File Reference

This file contains all the functions prototypes for the GPIO firmware library. More...

#include "stm8l15x.h"

Go to the source code of this file.

Defines

#define IS_GPIO_MODE(MODE)
 Macro used by the assert function to check the different functions parameters.
#define IS_GPIO_PIN(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
}
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)
}

Functions

void GPIO_DeInit (GPIO_TypeDef *GPIOx)
 Deinitializes the GPIOx peripheral registers to their default reset values.
void GPIO_ExternalPullUpConfig (GPIO_TypeDef *GPIOx, uint8_t GPIO_Pin, FunctionalState NewState)
 Configures the external pull-up on GPIOx pins.
void GPIO_Init (GPIO_TypeDef *GPIOx, uint8_t 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_ReadInputDataBit (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.
BitStatus GPIO_ReadOutputDataBit (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin)
 Reads the specified GPIO Output data pin.
void GPIO_ResetBits (GPIO_TypeDef *GPIOx, uint8_t GPIO_Pin)
 Writes low level to the specified GPIO pins.
void GPIO_SetBits (GPIO_TypeDef *GPIOx, uint8_t GPIO_Pin)
 Writes high level to the specified GPIO pins.
void GPIO_ToggleBits (GPIO_TypeDef *GPIOx, uint8_t GPIO_Pin)
 Toggles the specified GPIO pins.
void GPIO_Write (GPIO_TypeDef *GPIOx, uint8_t GPIO_PortVal)
 Writes data to the specified GPIO data port.
void GPIO_WriteBit (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin, BitAction GPIO_BitVal)
 Sets or clears the selected data port bit.

Detailed Description

This file contains all the functions prototypes for the GPIO firmware library.

Author:
MCD Application Team
Version:
V1.5.0
Date:
13-May-2011
Attention:

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 2011 STMicroelectronics

Definition in file stm8l15x_gpio.h.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com