/* Return if there is touch detected or not.  */
uint8_t mfxstm32l152_TS_DetectTouch(uint16_t DeviceAddr)
/* Return if there is touch detected or not.  */
uint8_t mfxstm32l152_TS_DetectTouch(uint16_t DeviceAddr)
{
  uint8_t state;
  uint8_t ret = 0;
  state = MFX_IO_Read(DeviceAddr, MFXSTM32L152_TS_FIFO_STA);
  state = ((state & (uint8_t)MFXSTM32L152_TS_CTRL_STATUS) == (uint8_t)MFXSTM32L152_TS_CTRL_STATUS);
  if(state > 0)
  {
    if(MFX_IO_Read(DeviceAddr, MFXSTM32L152_TS_FIFO_LEVEL) > 0)
    {
      ret = 1;
    }
  }
  return ret;
}