/* Read the state of the selected IO pin(s).  */
uint32_t stmpe1600_IO_ReadPin(uint16_t DeviceAddr, uint32_t IO_Pin)
/* Read the state of the selected IO pin(s).  */
uint32_t stmpe1600_IO_ReadPin(uint16_t DeviceAddr, uint32_t IO_Pin)
{
  uint8_t tmpData[2] = {0 , 0};
  IOE_ReadMultiple(DeviceAddr, STMPE1600_REG_GPMR, tmpData, 2);
  tmp = ((uint16_t)tmpData[0] | (((uint16_t)tmpData[1]) << 8));
  return(tmp & IO_Pin);  
}