USB Device - Joystick/Mouse  1.0
Macros | Functions | Variables
stm324xg_eval_ioe.c File Reference

This file provides a set of functions needed to manage the STMPE811 IO Expander devices mounted on STM324xG-EVAL evaluation board. More...

#include "stm324xg_eval_ioe.h"

Macros

#define TIMEOUT_MAX   0x3000 /*<! The value of the maximal timeout for I2C waiting loops */
 

Functions

uint8_t IOE_Config (void)
 Initializes and Configures the two IO_Expanders Functionalities (IOs, Touch Screen ..) and configures all STM324xG_EVAL necessary hardware (GPIOs, APB clocks ..). More...
 
uint8_t IOE_ITConfig (uint32_t IOE_ITSRC_Source)
 Configures The selected interrupts on the IO Expanders. More...
 
uint8_t IOE_WriteIOPin (uint8_t IO_Pin, IOE_BitValue_TypeDef BitVal)
 Writes a bit value to an output IO pin. More...
 
uint8_t IOE_ReadIOPin (uint32_t IO_Pin)
 Returns the status of the selected input IO pin. More...
 
JOYState_TypeDef IOE_JoyStickGetState (void)
 Returns the current Joystick status. More...
 
TS_STATEIOE_TS_GetState (void)
 Returns Status and positions of the Touch screen. More...
 
uint32_t IOE_TempSens_GetData (void)
 Returns the temperature row value (in 16 bit format). More...
 
FlagStatus IOE_GetGITStatus (uint8_t DeviceAddr, uint8_t Global_IT)
 Checks the selected Global interrupt source pending bit. More...
 
uint8_t IOE_ClearGITPending (uint8_t DeviceAddr, uint8_t Global_IT)
 Clears the selected Global interrupt pending bit(s) More...
 
FlagStatus IOE_GetIOITStatus (uint8_t DeviceAddr, uint8_t IO_IT)
 Checks the status of the selected IO interrupt pending bit. More...
 
uint8_t IOE_ClearIOITPending (uint8_t DeviceAddr, uint8_t IO_IT)
 Clears the selected IO interrupt pending bit(s). More...
 
uint8_t IOE_IsOperational (uint8_t DeviceAddr)
 Checks if the selected device is correctly configured and communicates correctly ont the I2C bus. More...
 
uint8_t IOE_Reset (uint8_t DeviceAddr)
 Resets the IO Expander by Software (SYS_CTRL1, RESET bit). More...
 
uint16_t IOE_ReadID (uint8_t DeviceAddr)
 Reads the selected device's ID. More...
 
uint8_t IOE_FnctCmd (uint8_t DeviceAddr, uint8_t Fct, FunctionalState NewState)
 Configures the selected IO Expander functionalities. More...
 
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) More...
 
uint8_t IOE_GITCmd (uint8_t DeviceAddr, FunctionalState NewState)
 Enables or disables the Global interrupt. More...
 
uint8_t IOE_GITConfig (uint8_t DeviceAddr, uint8_t Global_IT, FunctionalState NewState)
 Configures the selected source to generate or not a global interrupt. More...
 
uint8_t IOE_IOITConfig (uint8_t DeviceAddr, uint8_t IO_IT, FunctionalState NewState)
 Configures the selected pins to generate an interrupt or not. More...
 
uint8_t IOE_TS_Config (void)
 Configures the touch Screen Controller (Single point detection) More...
 
uint8_t IOE_TempSens_Config (void)
 Configures and enables the Temperature sensor module. More...
 
uint8_t IOE_IOAFConfig (uint8_t DeviceAddr, uint8_t IO_Pin, FunctionalState NewState)
 Configures the selected pin to be in Alternate function or not. More...
 
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. More...
 
uint8_t IOE_ITOutConfig (uint8_t Polarity, uint8_t Type)
 Configures the Interrupt line active state and format (level/edge) More...
 
uint8_t I2C_WriteDeviceRegister (uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t RegisterValue)
 Writes a value in a register of the device through I2C. More...
 
uint8_t I2C_ReadDeviceRegister (uint8_t DeviceAddr, uint8_t RegisterAddr)
 Reads a register of the device through I2C. More...
 
uint16_t I2C_ReadDataBuffer (uint8_t DeviceAddr, uint32_t RegisterAddr)
 Reads a buffer of 2 bytes from the device registers. More...
 

Variables

TS_STATE TS_State
 
uint32_t IOE_TimeOut = TIMEOUT_MAX
 

Detailed Description

This file provides a set of functions needed to manage the STMPE811 IO Expander devices mounted on STM324xG-EVAL evaluation board.

Author
MCD Application Team
Version
V1.0.2
Date
05-March-2012
Attention

© COPYRIGHT 2012 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.