stm32f469_fw/src/hw/driver/ts.c
static err_code_t drvTsUpdateGestureId(void)
{
  uint32_t gesture_id = 0;
  err_code_t  ts_status = OK;

  /* Get gesture Id */
  ft6x06_TS_GetGestureID(i2c_addr, &gesture_id);

  /* Remap gesture Id to a TS_GestureIdTypeDef value */
  switch(gesture_id)
  {
    case FT6206_GEST_ID_NO_GESTURE :
      ts_data.gesture_id = GEST_ID_NO_GESTURE;
      break;
    case FT6206_GEST_ID_MOVE_UP :
      ts_data.gesture_id = GEST_ID_MOVE_UP;
      break;
    case FT6206_GEST_ID_MOVE_RIGHT :
      ts_data.gesture_id = GEST_ID_MOVE_RIGHT;
      break;
    case FT6206_GEST_ID_MOVE_DOWN :
      ts_data.gesture_id = GEST_ID_MOVE_DOWN;
      break;
    case FT6206_GEST_ID_MOVE_LEFT :
      ts_data.gesture_id = GEST_ID_MOVE_LEFT;
      break;
    case FT6206_GEST_ID_ZOOM_IN :
      ts_data.gesture_id = GEST_ID_ZOOM_IN;
      break;
    case FT6206_GEST_ID_ZOOM_OUT :
      ts_data.gesture_id = GEST_ID_ZOOM_OUT;
      break;
    default :
      ts_status = ERR_TS;
      break;
  } /* of switch(gesture_id) */

  return(ts_status);
}
/**
  * @brief  Update gesture Id following a touch detected.
  * @param  ts_data: Pointer to touch screen current state structure
  * @retval OK if all initializations are OK. Other value if error.
  */
@brief  Update gesture Id following a touch detected.
@param  ts_data: Pointer to touch screen current state structure
@retval OK if all initializations are OK. Other value if error.
@brief Update gesture Id following a touch detected . @param ts_data : Pointer to touch screen current state structure @retval OK if all initializations are OK . Other value if error .
static err_code_t drvTsUpdateGestureId(void)
{
  uint32_t gesture_id = 0;
  err_code_t  ts_status = OK;
  ft6x06_TS_GetGestureID(i2c_addr, &gesture_id);
  switch(gesture_id)
  {
    case FT6206_GEST_ID_NO_GESTURE :
      ts_data.gesture_id = GEST_ID_NO_GESTURE;
      break;
    case FT6206_GEST_ID_MOVE_UP :
      ts_data.gesture_id = GEST_ID_MOVE_UP;
      break;
    case FT6206_GEST_ID_MOVE_RIGHT :
      ts_data.gesture_id = GEST_ID_MOVE_RIGHT;
      break;
    case FT6206_GEST_ID_MOVE_DOWN :
      ts_data.gesture_id = GEST_ID_MOVE_DOWN;
      break;
    case FT6206_GEST_ID_MOVE_LEFT :
      ts_data.gesture_id = GEST_ID_MOVE_LEFT;
      break;
    case FT6206_GEST_ID_ZOOM_IN :
      ts_data.gesture_id = GEST_ID_ZOOM_IN;
      break;
    case FT6206_GEST_ID_ZOOM_OUT :
      ts_data.gesture_id = GEST_ID_ZOOM_OUT;
      break;
    default :
      ts_status = ERR_TS;
      break;
  } 
  return(ts_status);
}
static err_code_t drvTsUpdateGestureId ( void ) { uint32_t gesture_id = 0 ; err_code_t ts_status = OK ; ft6x06_TS_GetGestureID ( i2c_addr , & gesture_id ) ; switch ( gesture_id ) { case FT6206_GEST_ID_NO_GESTURE : ts_data . gesture_id = GEST_ID_NO_GESTURE ; break ; case FT6206_GEST_ID_MOVE_UP : ts_data . gesture_id = GEST_ID_MOVE_UP ; break ; case FT6206_GEST_ID_MOVE_RIGHT : ts_data . gesture_id = GEST_ID_MOVE_RIGHT ; break ; case FT6206_GEST_ID_MOVE_DOWN : ts_data . gesture_id = GEST_ID_MOVE_DOWN ; break ; case FT6206_GEST_ID_MOVE_LEFT : ts_data . gesture_id = GEST_ID_MOVE_LEFT ; break ; case FT6206_GEST_ID_ZOOM_IN : ts_data . gesture_id = GEST_ID_ZOOM_IN ; break ; case FT6206_GEST_ID_ZOOM_OUT : ts_data . gesture_id = GEST_ID_ZOOM_OUT ; break ; default : ts_status = ERR_TS ; break ; } return ( ts_status ) ; }
@brief  Update gesture Id following a touch detected.
@brief Update gesture Id following a touch detected .
/* Get gesture Id */ /* Remap gesture Id to a TS_GestureIdTypeDef value */ /* of switch(gesture_id) */