/* Return if there is touches detected or not. Try to detect new touches and forget the old ones (reset internal global variables).  */
uint8_t ft6x06_TS_DetectTouch(uint16_t DeviceAddr)
/* Return if there is touches detected or not. Try to detect new touches and forget the old ones (reset internal global variables).  */
uint8_t ft6x06_TS_DetectTouch(uint16_t DeviceAddr)
{
  volatile uint8_t nbTouch = 0;
  nbTouch = TS_IO_Read(DeviceAddr, FT6206_TD_STAT_REG);
  nbTouch &= FT6206_TD_STAT_MASK;
  if(nbTouch > FT6206_MAX_DETECTABLE_TOUCH)
  {
    nbTouch = 0;
  }
  ft6x06_handle.currActiveTouchNb = nbTouch;
  ft6x06_handle.currActiveTouchIdx = 0;
  return(nbTouch);
}