stm3210c_eval_ioe.c File Reference

This file includes the IO Expander driver for STMPE811 IO Expander devices. More...

#include "stm3210c_eval_ioe.h"
#include "stm32f10x.h"

Go to the source code of this file.

Defines

#define TIMEOUT_MAX   0x1000
#define TS_CONVERSION_DELAY   0x10000

Functions

static void delay (__IO uint32_t nCount)
 Inserts a delay time.
uint16_t I2C_ReadDataBuffer (uint8_t DeviceAddr, uint32_t RegisterAddr)
 Reads a buffer of 2 bytes from the device registers.
uint8_t I2C_ReadDeviceRegister (uint8_t DeviceAddr, uint8_t RegisterAddr)
 Reads a register of the device through I2C.
uint8_t I2C_WriteDeviceRegister (uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t RegisterValue)
 Writes a value in a register of the device through I2C.
uint8_t IOE_ClearGITPending (uint8_t DeviceAddr, uint8_t Global_IT)
 Clears the selected Global interrupt pending bit(s).
uint8_t IOE_ClearIOITPending (uint8_t DeviceAddr, uint8_t IO_IT)
 Clears the selected IO interrupt pending bit(s).
uint8_t IOE_Config (void)
 Initializes and Configures the two IO_Expanders Functionalities (IOs, Touch Screen .
static void IOE_DMA_Config (IOE_DMADirection_TypeDef Direction, uint8_t *buffer)
 Configure the DMA Peripheral used to handle communication via I2C.
static void IOE_EXTI_Config (void)
 Configures the IO expander Interrupt line and GPIO in EXTI mode.
uint8_t IOE_FnctCmd (uint8_t DeviceAddr, uint8_t Fct, FunctionalState NewState)
 Configures the selcted IO Expander functionalities.
FlagStatus IOE_GetGITStatus (uint8_t DeviceAddr, uint8_t Global_IT)
 Checks the selected Global interrupt source pending bit.
FlagStatus IOE_GetIOITStatus (uint8_t DeviceAddr, uint8_t IO_IT)
 Checks the status of the selected IO interrupt pending bit.
uint8_t IOE_GITCmd (uint8_t DeviceAddr, FunctionalState NewState)
 Enables or disables the Global interrupt.
uint8_t IOE_GITConfig (uint8_t DeviceAddr, uint8_t Global_IT, FunctionalState NewState)
 Configures the selected source to generate or not a global interrupt.
static void IOE_GPIO_Config (void)
 Initializes the GPIO pins used by the IO expander.
static void IOE_I2C_Config (void)
 Configure the I2C Peripheral used to communicate with IO_Expanders.
uint8_t IOE_IOAFConfig (uint8_t DeviceAddr, uint8_t IO_Pin, FunctionalState NewState)
 Configures the selected pin to be in Alternate function or not.
uint8_t IOE_IOEdgeConfig (uint8_t DeviceAddr, uint8_t IO_Pin, uint8_t Edge)
 Configures the Edge for which a transition is detectable for the the selected pin.
uint8_t IOE_IOITConfig (uint8_t DeviceAddr, uint8_t IO_IT, FunctionalState NewState)
 Configures the selected pins to generate an interrupt or not.
uint8_t IOE_IOPinConfig (uint8_t DeviceAddr, uint8_t IO_Pin, uint8_t Direction)
 Configures the selected pin direction (to be an input or an output).
uint8_t IOE_IsOperational (uint8_t DeviceAddr)
 Checks if the selected device is correctly configured and communicates correctly ont the I2C bus.
uint8_t IOE_ITConfig (uint32_t IOE_ITSRC_Source)
 Configures The selected interrupts on the IO Expanders.
uint8_t IOE_ITOutConfig (uint8_t Polarity, uint8_t Type)
 Configures the Interrupt line active state and format (level/edge).
JOYState_TypeDef IOE_JoyStickGetState (void)
 Returns the current Joystick status.
uint16_t IOE_ReadID (uint8_t DeviceAddr)
 Reads the selected device's ID.
uint8_t IOE_ReadIOPin (uint32_t IO_Pin)
 Returns the status of the selected input IO pin.
uint8_t IOE_Reset (uint8_t DeviceAddr)
 Resets the IO Expander by Software (SYS_CTRL1, RESET bit).
uint8_t IOE_TempSens_Config (void)
 Configures and enables the Temperature sensor module.
uint32_t IOE_TempSens_GetData (void)
 Returns the temperature row value (in 16 bit format).
uint8_t IOE_TS_Config (void)
 Configures the touch Screen Controller (Single point detection).
TS_STATEIOE_TS_GetState (void)
 Returns Status and positions of the Touch screen.
static uint16_t IOE_TS_Read_X (void)
 Return Touch Screen X position value.
static uint16_t IOE_TS_Read_Y (void)
 Return Touch Screen Y position value.
static uint16_t IOE_TS_Read_Z (void)
 Return Touch Screen Z position value.
uint8_t IOE_WriteIOPin (uint8_t IO_Pin, IOE_BitValue_TypeDef BitVal)
 Writes a bit value to an output IO pin.

Variables

uint32_t IOE_TimeOut = TIMEOUT_MAX
TS_STATE TS_State

Detailed Description

This file includes the IO Expander driver for STMPE811 IO Expander devices.

Author:
MCD Application Team
Version:
V4.3.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 stm3210c_eval_ioe.c.

STM32F10x Standard Peripherals Library: Footer

 

 

 

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